From c81315c3dd6c819976e5de03539f75cbccaf2188 Mon Sep 17 00:00:00 2001 From: Mickael ADAM Date: Wed, 1 Oct 2014 17:35:56 +0200 Subject: 445844: [Diagram] Activity diagram shapes shall be refactored Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445844 Patch set 1 -Apply RoundedRectancle to BroadCastSignalAction AddVariableValueAction ActivityPartition(No external label) InterruptibleActivityRegion(No external label) -Add borderStyle CSS property to set the style of the border(dash, dashDot, dashDotDot, dot, solid) Patch set 2 -Fix on InterruptibleActivityRegion Patch set 3 -Apply RoundedRectancle to ExpansionRegionEditPart (No external label) ConditionalNodeEditPart (No external label) LoopNodeEditPart (No external label) SequenceNodeEditPart (No external label) StructuredActivityNodeEditPart (No external label) CallBehaviorActionEditPart AddStructuralFeatureValueAction CallOperationAction CreateObjectAction DestroyObjectAction OpaqueAction ReadSelfAction ReadStructuralFeatureAction ReadVariableAction SendObjectAction ValueSpecificationAction Patch set 3 -Apply RoundedRectancle to CentralBufferNode DataStoreNode =>bug to fix feedback of selection don't fallow SVGNodePlate Patch set 4 -Apply RoundedRectancle to ActivityParameterNode(No external label) Patch set 5 -Apply RoundedRectancle to Activity(No external label) ActivityCN(No external label) Note: tried to delete generated NOT for CentralBufferNode, DataStoreNode, and ActivityParameterNode Change-Id: I34a0fbcd55d33012780c5061bb4cef5727dd30d7 Signed-off-by: Mickael ADAM --- .../infra/gmfdiag/generator/CSSGenerator.java | 3 +- .../figure/node/IRoundedRectangleFigure.java | 214 +- .../node/RoundedRectangleNodePlateFigure.java | 42 +- .../figure/node/RoundedRectangleShadowBorder.java | 75 +- .../draw2d/StructuredActivityNodeFigure.java | 332 +- .../activity/edit/part/CustomActivityEditPart.java | 119 + .../edit/part/CustomActivityEditPartCN.java | 119 + .../part/CustomActivityParameterNodeEditPart.java | 80 + .../edit/part/CustomActivityPartitionEditPart.java | 41 + ...tomAddStructuralFeatureValueActionEditPart.java | 110 + .../part/CustomAddVariableValueActionEditPart.java | 113 + .../part/CustomBroadcastSignalActionEditPart.java | 109 + .../part/CustomCallBehaviorActionEditPart.java | 83 + .../part/CustomCallOperationActionEditPart.java | 109 + .../edit/part/CustomCentralBufferNodeEditPart.java | 103 + .../edit/part/CustomConditionalNodeEditPart.java | 127 + .../part/CustomCreateObjectActionEditPart.java | 109 + .../edit/part/CustomDataStoreNodeEditPart.java | 103 + .../part/CustomDestroyObjectActionEditPart.java | 109 + .../edit/part/CustomExpansionRegionEditPart.java | 127 + .../CustomInterruptibleActivityRegionEditPart.java | 115 + .../activity/edit/part/CustomLoopNodeEditPart.java | 127 + .../edit/part/CustomOpaqueActionEditPart.java | 109 + .../edit/part/CustomReadSelfActionEditPart.java | 109 + .../CustomReadStructuralFeatureActionEditPart.java | 109 + .../part/CustomReadVariableActionEditPart.java | 109 + .../edit/part/CustomSendObjectActionEditPart.java | 109 + .../edit/part/CustomSequenceNodeEditPart.java | 127 + .../part/CustomStructuredActivityNodeEditPart.java | 127 + .../edit/part/CustomUMLEditPartFactory.java | 371 +- .../CustomValueSpecificationActionEditPart.java | 109 + .../activity/edit/part/RoundedUMLNodeEditPart.java | 287 + .../diagram/activity/figures/ActivityFigure.java | 968 +- .../activity/figures/ActivityPartitionFigure.java | 112 +- .../activity/figures/CallBehaviorActionFigure.java | 118 +- .../figures/InterruptibleActivityRegionFigure.java | 493 +- .../model/activityDiagram.gmfgen | 21551 +++++++++++++++---- .../plugin.xml | 3408 +-- .../activity/edit/parts/ActivityEditPart.java | 966 +- .../activity/edit/parts/ActivityEditPartCN.java | 950 +- .../edit/parts/ActivityParameterNodeEditPart.java | 2587 ++- .../edit/parts/ActivityPartitionEditPart.java | 783 +- .../AddStructuralFeatureValueActionEditPart.java | 3124 +-- ...uralFeatureValueActionFloatingNameEditPart.java | 805 + .../edit/parts/AddVariableValueActionEditPart.java | 3081 +-- ...AddVariableValueActionFloatingNameEditPart.java | 805 + .../edit/parts/BroadcastSignalActionEditPart.java | 2950 +-- .../BroadcastSignalActionFloatingNameEditPart.java | 805 + .../edit/parts/CallBehaviorActionEditPart.java | 3153 +-- .../CallBehaviorActionFloatingNameEditPart.java | 805 + .../edit/parts/CallOperationActionEditPart.java | 3102 +-- .../CallOperationActionFloatingNameEditPart.java | 805 + .../edit/parts/CentralBufferNodeEditPart.java | 2526 +-- .../CentralBufferNodeFloatingNameEditPart.java | 805 + .../edit/parts/ConditionalNodeEditPart.java | 2930 +-- .../edit/parts/CreateObjectActionEditPart.java | 2990 +-- .../CreateObjectActionFloatingNameEditPart.java | 805 + .../activity/edit/parts/DataStoreNodeEditPart.java | 2558 ++- .../parts/DataStoreNodeFloatingNameEditPart.java | 805 + .../edit/parts/DestroyObjectActionEditPart.java | 2916 +-- .../DestroyObjectActionFloatingNameEditPart.java | 805 + .../edit/parts/ExpansionRegionEditPart.java | 3000 +-- .../parts/InterruptibleActivityRegionEditPart.java | 620 +- .../activity/edit/parts/LoopNodeEditPart.java | 3040 +-- .../activity/edit/parts/OpaqueActionEditPart.java | 3036 +-- .../parts/OpaqueActionFloatingNameEditPart.java | 805 + .../edit/parts/ReadSelfActionEditPart.java | 2948 +-- .../parts/ReadSelfActionFloatingNameEditPart.java | 805 + .../parts/ReadStructuralFeatureActionEditPart.java | 3070 +-- ...tructuralFeatureActionFloatingNameEditPart.java | 805 + .../edit/parts/ReadVariableActionEditPart.java | 3014 +-- .../ReadVariableActionFloatingNameEditPart.java | 805 + .../edit/parts/SendObjectActionEditPart.java | 3082 +-- .../SendObjectActionFloatingNameEditPart.java | 805 + .../activity/edit/parts/SequenceNodeEditPart.java | 2920 +-- .../edit/parts/StructuredActivityNodeEditPart.java | 2920 +-- .../activity/edit/parts/UMLEditPartFactory.java | 1490 +- .../parts/ValueSpecificationActionEditPart.java | 2974 +-- ...lueSpecificationActionFloatingNameEditPart.java | 805 + .../diagram/activity/part/UMLVisualIDRegistry.java | 8676 ++++---- .../activity/providers/UMLParserProvider.java | 6942 +++--- .../activity/providers/UMLViewProvider.java | 6928 +++--- .../RoundedBorderNamedElementEditPart.java | 271 + .../editparts/RoundedCompartmentEditPart.java | 248 +- .../node/AutomaticCompartmentLayoutManager.java | 21 +- .../figure/node/RoundedCompartmentFigure.java | 86 +- .../figures/ActivityAsInteractionFigure.java | 390 +- .../figures/InteractionUseFigure.java | 274 +- .../figures/InteractionWithSnapshotFigure.java | 254 +- .../generator/UmlCollaborationUseGenerator.java | 5 +- .../common/xtext/generator/UmlCommonGenerator.java | 5 +- .../UMLConnectionPointReferenceGenerator.java | 5 +- .../xtext/generator/UmlMessageGenerator.java | 5 +- .../xtext/generator/UmlParameterGenerator.java | 5 +- .../port/xtext/generator/UmlPortGenerator.java | 7 +- .../xtext/generator/UmlPropertyGenerator.java | 11 +- .../state/xtext/generator/UmlStateGenerator.java | 5 +- .../AppliedStereotypePropertyGenerator.java | 5 +- 98 files changed, 81604 insertions(+), 52029 deletions(-) create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext/xtend-gen/org/eclipse/papyrus/infra/gmfdiag/generator/CSSGenerator.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext/xtend-gen/org/eclipse/papyrus/infra/gmfdiag/generator/CSSGenerator.java index a076db98ff3..6c408b5849f 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext/xtend-gen/org/eclipse/papyrus/infra/gmfdiag/generator/CSSGenerator.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext/xtend-gen/org/eclipse/papyrus/infra/gmfdiag/generator/CSSGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class CSSGenerator implements IGenerator { - @Override -public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { } } diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java index bd2644eeab0..f45f8527e09 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java @@ -1,106 +1,108 @@ -/***************************************************************************** - * Copyright (c) 2010, 2014 CEA LIST and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.common.figure.node; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Rectangle; - -/** - * An interface for figures which have a rounded rectangle shape and need to - * provide a connection anchor and a floating Name. - * - */ -public interface IRoundedRectangleFigure extends IFigure { - - /** - * Returns the rounded rectangles corner dimensions. - * - * @return the corner dimensions - */ - Dimension getCornerDimensions(); - - /** - * Sets the rounded rectangles corner dimensions. - * - * @param CornerDimension - * the new corner dimensions - */ - void setCornerDimensions(Dimension CornerDimension); - - // /** - // * Sets the height of rounded rectangles corner dimensions. - // * - // */ - // void setRadiusWidth(int width); - // - // /** - // * Sets the height of rounded rectangles corner dimensions. - // * - // */ - // void setRadiusHeight(int height); - - /** - * Returns the rounded rectangles bounds. - * - * @return the bounds - */ - Rectangle getRoundedRectangleBounds(); - - /** - * Sets if the shape must be oval. - * - * @param isOval - * the new oval - */ - void setOval(boolean isOval); - - /** - * Returns true if the shape is forced to be oval. - * - * @return isOval - */ - boolean isOval(); - - /** - * Sets true if the floating name must be constrained. - * - * @param isConstrained - * the new floating name constrained - */ - void setFloatingNameConstrained(boolean isConstrained); - - /** - * Returns true if the floating name is constrained. - * - * @return isAttached - */ - boolean isFloatingNameConstrained(); - - /** - * Sets the floating Name offset for not constrained case. - * - * @param offset - * the new floating name offset - */ - void setFloatingNameOffset(Dimension offset); - - - /** - * Returns the offset of the floating Name offset for not constrained case. - * - * @return the offset - */ - Dimension getFloatingNameOffset(); - -} +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.common.figure.node; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; + +/** + * An interface for figures which have a rounded rectangle shape and need to + * provide a connection anchor and a floating Name. + * + */ +public interface IRoundedRectangleFigure extends IFigure { + + /** + * Returns the rounded rectangles corner dimensions. + * + * @return the corner dimensions + */ + Dimension getCornerDimensions(); + + /** + * Sets the rounded rectangles corner dimensions. + * + * @param CornerDimension + * the new corner dimensions + */ + void setCornerDimensions(Dimension CornerDimension); + + // /** + // * Sets the height of rounded rectangles corner dimensions. + // * + // */ + // void setRadiusWidth(int width); + // + // /** + // * Sets the height of rounded rectangles corner dimensions. + // * + // */ + // void setRadiusHeight(int height); + + /** + * Returns the rounded rectangles bounds. + * + * @return the bounds + */ + Rectangle getRoundedRectangleBounds(); + + /** + * Sets if the shape must be oval. + * + * @param isOval + * the new oval + */ + void setOval(boolean isOval); + + /** + * Returns true if the shape is forced to be oval. + * + * @return isOval + */ + boolean isOval(); + + /** + * Sets true if the floating name must be constrained. + * + * @param isConstrained + * the new floating name constrained + */ + void setFloatingNameConstrained(boolean isConstrained); + + /** + * Returns true if the floating name is constrained. + * + * @return isAttached + */ + boolean isFloatingNameConstrained(); + + /** + * Sets the floating Name offset for not constrained case. + * + * @param offset + * the new floating name offset + */ + void setFloatingNameOffset(Dimension offset); + + + /** + * Returns the offset of the floating Name offset for not constrained case. + * + * @return the offset + */ + Dimension getFloatingNameOffset(); + + public void setBorderStyle(int borderStyle); + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java index cac0889713e..e1ce608ccbc 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java @@ -32,7 +32,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * Instantiates a new rounded rectangle node plate figure. * * @param defSize - * the def size + * the def size */ public RoundedRectangleNodePlateFigure(Dimension defSize) { super(defSize); @@ -42,9 +42,9 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * Instantiates a new rounded rectangle node plate figure. * * @param width - * the width + * the width * @param height - * the height + * the height */ public RoundedRectangleNodePlateFigure(int width, int height) { super(width, height); @@ -56,11 +56,11 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @return the RoundedCompartment figure */ public IRoundedRectangleFigure getRoundedCompartmentFigure() { - if(getChildren().size() > 0 && getChildren().get(0) instanceof IRoundedRectangleFigure) { - return (IRoundedRectangleFigure)getChildren().get(0); + if (getChildren().size() > 0 && getChildren().get(0) instanceof IRoundedRectangleFigure) { + return (IRoundedRectangleFigure) getChildren().get(0); } - if(svgNodePlateFigure != null && svgNodePlateFigure.getChildren().size() > 0 && svgNodePlateFigure.getChildren().get(0) instanceof IRoundedRectangleFigure) { - return (IRoundedRectangleFigure)svgNodePlateFigure.getChildren().get(0); + if (svgNodePlateFigure != null && svgNodePlateFigure.getChildren().size() > 0 && svgNodePlateFigure.getChildren().get(0) instanceof IRoundedRectangleFigure) { + return (IRoundedRectangleFigure) svgNodePlateFigure.getChildren().get(0); } return null; } @@ -91,7 +91,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * Sets the SVG node plate container. * * @param svgNodePlateFigure - * the new SVG node plate container + * the new SVG node plate container * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ICustomNodePlate#setSVGNodePlateContainer(org.eclipse.papyrus.uml.diagram.common.figure.node.SVGNodePlateFigure) */ @Override @@ -115,12 +115,12 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * reference's coordinates and bounds of the figure. * * @param p - * - relative reference for the SlidableAnchor + * - relative reference for the SlidableAnchor * @return a SlidableAnchor for this figure with relative reference at p */ @Override protected ConnectionAnchor createAnchor(PrecisionPoint p) { - if(p == null) + 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(); @@ -144,7 +144,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @param dimension */ @Override - //unused + // unused public void setCornerDimensions(Dimension dimension) { getRoundedCompartmentFigure().setCornerDimensions(dimension); } @@ -155,7 +155,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @param booleanValue */ @Override - //unused + // unused public void setOval(boolean booleanValue) { getRoundedCompartmentFigure().setOval(booleanValue); } @@ -166,7 +166,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @return */ @Override - //unused + // unused public boolean isOval() { return getRoundedCompartmentFigure().isOval(); } @@ -177,7 +177,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @param booleanValue */ @Override - //unused + // unused public void setFloatingNameConstrained(boolean booleanValue) { } @@ -187,7 +187,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @return */ @Override - //unused + // unused public boolean isFloatingNameConstrained() { return false; } @@ -198,7 +198,7 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple * @param offset */ @Override - //unused + // unused public void setFloatingNameOffset(Dimension offset) { } @@ -212,4 +212,14 @@ public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure imple public Dimension getFloatingNameOffset() { return null; } + + /** + * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setBorderStyle(int) + * + * @param borderStyle + */ + @Override + public void setBorderStyle(int borderStyle) { + // unused + } } diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java index 1ff9d6a9970..8d50ff6531f 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java @@ -38,9 +38,9 @@ public class RoundedRectangleShadowBorder extends RectangularShadowBorder { * Instantiates a new rounded rectangle shadow border. * * @param color - * the color + * the color * @param cornerDimension - * the corner dimension + * the corner dimension */ public RoundedRectangleShadowBorder(Color color, Dimension cornerDimension) { super(3, color); @@ -53,7 +53,7 @@ public class RoundedRectangleShadowBorder extends RectangularShadowBorder { * Method for determining the inset the border will take up on the shape. * * @param figure - * Figure that will be inset from the border + * Figure that will be inset from the border * @return Insets the Insets for the border on the given figure. */ @Override @@ -70,36 +70,39 @@ public class RoundedRectangleShadowBorder extends RectangularShadowBorder { * Paint the figure on the graphics. * * @param figure - * the figure + * the figure * @param graphics - * the graphics + * the graphics * @param insets - * the insets + * the insets * @see org.eclipse.draw2d.Border#paint(IFigure, Graphics, Insets) */ @Override public void paint(IFigure figure, Graphics graphics, Insets insets) { graphics.pushState(); + // draw the normal line border tempRect.setBounds(getPaintRectangle(figure, insets)); - //Take into account the line width + // Take into account the line width tempRect.x += getWidth() / 2; tempRect.y += getWidth() / 2; tempRect.width -= getWidth(); tempRect.height -= getWidth(); - //Set the arc dimension from the corner dimension of the figure - if(figure instanceof IRoundedRectangleFigure) { - cornerDimension.width = ((IRoundedRectangleFigure)figure).getCornerDimensions().width; - cornerDimension.height = ((IRoundedRectangleFigure)figure).getCornerDimensions().height; + // Set the arc dimension from the corner dimension of the figure + if (figure instanceof IRoundedRectangleFigure) { + cornerDimension.width = ((IRoundedRectangleFigure) figure).getCornerDimensions().width; + cornerDimension.height = ((IRoundedRectangleFigure) figure).getCornerDimensions().height; } graphics.setLineWidth(getWidth()); - //Set the color of the shadow - if(getColor() != null) { + // Set the color of the shadow + if (getColor() != null) { graphics.setBackgroundColor(getColor()); } else { graphics.setBackgroundColor(ColorConstants.black); } + graphics.setLineStyle(getStyle()); graphics.drawRoundRectangle(tempRect, cornerDimension.width, cornerDimension.height); + graphics.setLineStyle(Graphics.LINE_SOLID); // draw the shadow // first expand the clip rectangle Rectangle newRect = new Rectangle(tempRect); @@ -108,36 +111,38 @@ public class RoundedRectangleShadowBorder extends RectangularShadowBorder { newRect.x += borderwidth; newRect.y += borderwidth; graphics.setClip(newRect); - if(cornerDimension.width != 0 || cornerDimension.height != 0) { - //Adapt arc width - if(cornerDimension.width > tempRect.width) + if (cornerDimension.width != 0 || cornerDimension.height != 0) { + // Adapt arc width + if (cornerDimension.width > tempRect.width) cornerDimension.width = tempRect.width; - //Adapt arc height - if(cornerDimension.height > tempRect.height) + // Adapt arc height + if (cornerDimension.height > tempRect.height) cornerDimension.height = tempRect.height; - //Right Top corner - graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 1, cornerDimension.height, -5, 45); //-5,70); - graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 2, cornerDimension.height, -5, 45); //-5,70); - graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 3, cornerDimension.height, -5, 45); //-5,70); + // Right Top corner + graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 1, cornerDimension.height, -5, 45); // -5,70); + graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 2, cornerDimension.height, -5, 45); // -5,70); + graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 3, cornerDimension.height, -5, 45); // -5,70); // Left Bottom corner - graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 1, 210, 65); //210, 65); - graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 2, 210, 65); //210, 65); - graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 3, 210, 65); //210, 65); - //Right bottom corner + graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 1, 210, 65); // 210, 65); + graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 2, 210, 65); // 210, 65); + graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 3, 210, 65); // 210, 65); + // Right bottom corner int tmpWidth = getWidth(); - graphics.setLineWidthFloat((float)(borderwidth - 0.5)); - //graphics.drawArc(tempRect.x + tempRect.width - arc.width + borderwidth, tempRect.y + borderwidth + tempRect.height - arc.height, arc.width - 1, arc.height - 1, 270, 90); - graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y + borderwidth + tempRect.height - cornerDimension.height + getWidth() / 2, cornerDimension.width - 2 + getWidth() / 2, cornerDimension.height - 2, 270, 95); + graphics.setLineWidthFloat((float) (borderwidth - 0.5)); + // graphics.drawArc(tempRect.x + tempRect.width - arc.width + borderwidth, tempRect.y + borderwidth + tempRect.height - arc.height, arc.width - 1, arc.height - 1, 270, 90); + graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y + borderwidth + tempRect.height - cornerDimension.height + getWidth() / 2, cornerDimension.width - 2 + getWidth() / 2, cornerDimension.height - 2, 270, + 95); graphics.setLineWidth(tmpWidth); - graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y + borderwidth + tempRect.height - cornerDimension.height + getWidth() / 2, cornerDimension.width - 3 + getWidth() / 2, cornerDimension.height - 3, 270, 95); - //Right rectangle shadow - if((tempRect.height - cornerDimension.height) > 0) + graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y + borderwidth + tempRect.height - cornerDimension.height + getWidth() / 2, cornerDimension.width - 3 + getWidth() / 2, cornerDimension.height - 3, 270, + 95); + // Right rectangle shadow + if ((tempRect.height - cornerDimension.height) > 0) graphics.fillRectangle(tempRect.x + tempRect.width + getWidth() / 2, tempRect.y + cornerDimension.height / 2, borderwidth, tempRect.height - cornerDimension.height + borderwidth); - //Bottom rectangle shadow - if((tempRect.width - cornerDimension.width) > 0) + // Bottom rectangle shadow + if ((tempRect.width - cornerDimension.width) > 0) graphics.fillRectangle(tempRect.x + cornerDimension.width / 2, tempRect.y + tempRect.height + getWidth() / 2, tempRect.width - cornerDimension.width + borderwidth, borderwidth); } else { - //If there is no rounded corner + // If there is no rounded corner PointList plt = new PointList(); plt.addPoint(tempRect.x + tempRect.width, tempRect.y + borderwidth); plt.addPoint(tempRect.x + tempRect.width, tempRect.y + tempRect.height); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java index ceecbffc4bf..bfb5df5e0f2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java @@ -1,186 +1,146 @@ -/***************************************************************************** - * Copyright (c) 2011 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.draw2d; - -import org.eclipse.draw2d.Border; -import org.eclipse.draw2d.Graphics; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.LayoutManager; -import org.eclipse.draw2d.OrderedLayout; -import org.eclipse.draw2d.RoundedRectangle; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; -import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityConstrainedFlowLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityDirectionType; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; -import org.eclipse.gmf.runtime.notation.MeasurementUnit; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.preferences.IActivityPreferenceConstants; -import org.eclipse.papyrus.uml.diagram.common.draw2d.RoundedRectangleDashedBorder; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.swt.graphics.Color; - -/** - * Figure for structured activity node and its derived element - * - * @author arthur daussy - * - */ -public class StructuredActivityNodeFigure extends PapyrusRoundedNodeFigure { - - /** - * Since the Activity diagram is using Pixel unit we can use this as constant - */ - private static IMapMode mapNode = MeasurementUnitHelper.getMapMode(MeasurementUnit.PIXEL_LITERAL); - - /** - * Compartment for activity node - */ - private RoundedRectangle fStructuredActivityNodeCompartment; - - /** - * Compartment for label - */ - private RoundedRectangle fFigureCompartmentLabelStructuredActivityNode; - - /** - * Preferences Store - */ - protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - - /** - * Constructor - */ - public StructuredActivityNodeFigure() { - super(); - corner = 8; - this.shadowborder = createBorder0(); - setBorder(getBorderedFigure(), this.shadowborder); - createContentPane(); - } - - @Override - protected Border getDefaultBorder(Color borderColor) { - return createBorder0(); - } - - /** - * Custom border (Used to avoid the alpha setting affect the border) - * - * @return - */ - private org.eclipse.draw2d.LineBorder createBorder0() { - RoundedRectangleDashedBorder result = new RoundedRectangleDashedBorder(8, 8); - result.setWidth(1); - result.setStyle(Graphics.LINE_DASH); - return result; - } - - @Override - public LayoutManager getLayoutManager() { - FlowLayoutAdvanced layoutThis = new FlowLayoutAdvanced(); - layoutThis.setStretchMinorAxis(true); - layoutThis.setMinorAlignment(OrderedLayout.ALIGN_CENTER); - layoutThis.setMajorAlignment(OrderedLayout.ALIGN_TOPLEFT); - layoutThis.setMajorSpacing(0); - layoutThis.setMinorSpacing(0); - layoutThis.setHorizontal(false); - return layoutThis; - } - - /** - * Create compartment for activity node - */ - protected void createContentPane() { - /* - * Compartment - */ - this.setLayoutManager(getLayoutManager()); - fStructuredActivityNodeCompartment = new RoundedRectangle(); - fStructuredActivityNodeCompartment.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8))); - fStructuredActivityNodeCompartment.setFill(false); - fStructuredActivityNodeCompartment.setOutline(false); - fStructuredActivityNodeCompartment.setLineWidth(0); - FlowLayoutAdvancedConstraint constraintFStructuredActivityNodeCompartment = new FlowLayoutAdvancedConstraint(); - constraintFStructuredActivityNodeCompartment.setFull(true); - this.add(fStructuredActivityNodeCompartment, constraintFStructuredActivityNodeCompartment); - } - - @Override - protected Object getDefaultLabelsConstraint() { - GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout(); - layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST); - fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode); - return super.getDefaultLabelsConstraint(); - } - - @Override - protected Object getNameLabelConstraint() { - GravityConstrainedFlowLayoutConstraint constraintFKeyword = new GravityConstrainedFlowLayoutConstraint(); - constraintFKeyword.setAlign(OrderedLayout.ALIGN_TOPLEFT); - return constraintFKeyword; - } - - @Override - protected IFigure getDefaultLabelsContainer() { - if (fFigureCompartmentLabelStructuredActivityNode == null) { - fFigureCompartmentLabelStructuredActivityNode = new RoundedRectangle(); - fFigureCompartmentLabelStructuredActivityNode.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8))); - fFigureCompartmentLabelStructuredActivityNode.setFill(false); - fFigureCompartmentLabelStructuredActivityNode.setOutline(false); - fFigureCompartmentLabelStructuredActivityNode.setLineWidth(0); - FlowLayoutAdvancedConstraint constraintFFigureCompartmentLabelStructuredActivityNode = new FlowLayoutAdvancedConstraint(); - constraintFFigureCompartmentLabelStructuredActivityNode.setHasMinsize(true); - this.add(fFigureCompartmentLabelStructuredActivityNode, constraintFFigureCompartmentLabelStructuredActivityNode); - GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout(); - layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST); - layoutFFigureCompartmentLabelStructuredActivityNode.setSpacing(10); - fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode); - } - return fFigureCompartmentLabelStructuredActivityNode; - } - - /** - * Override in order to use alpha component - */ - @Override - public void paintFigure(Graphics graphics) { - int transparency = getTransparency(); - if (transparency == 0) { - transparency = UMLDiagramEditorPlugin.getInstance().getPreferenceStore().getInt(IActivityPreferenceConstants.PREF_STRUCTURED_NODE_ALPHA); - } else { - transparency = 100 - getTransparency(); - } - graphics.setAlpha(transparency); - super.paintFigure(graphics); - } - - /** - * Compartment for activity node - */ - public RoundedRectangle getStructuredActivityNodeCompartment() { - return fStructuredActivityNodeCompartment; - } - - /** - * Get the keywork compartment - * - * @return - */ - public WrappingLabel getKeyword() { - return getNameLabel(); - } -} +/***************************************************************************** + * Copyright (c) 2011 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.draw2d; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.LayoutManager; +import org.eclipse.draw2d.OrderedLayout; +import org.eclipse.draw2d.RoundedRectangle; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; +import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityConstrainedFlowLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityDirectionType; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; +import org.eclipse.gmf.runtime.notation.MeasurementUnit; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; + +/** + * Figure for structured activity node and its derived element + * + * @author arthur daussy + * + */ +public class StructuredActivityNodeFigure extends RoundedCompartmentFigure { + + /** + * Since the Activity diagram is using Pixel unit we can use this as constant + */ + private static IMapMode mapNode = MeasurementUnitHelper.getMapMode(MeasurementUnit.PIXEL_LITERAL); + + /** + * Compartment for activity node + */ + private RoundedRectangle fStructuredActivityNodeCompartment; + + /** + * Compartment for label + */ + private RoundedRectangle fFigureCompartmentLabelStructuredActivityNode; + + /** + * Preferences Store + */ + protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + + /** + * Constructor + */ + public StructuredActivityNodeFigure() { + super(); + createContentPane(); + } + + @Override + public LayoutManager getLayoutManager() { + FlowLayoutAdvanced layoutThis = new FlowLayoutAdvanced(); + layoutThis.setStretchMinorAxis(true); + layoutThis.setMinorAlignment(OrderedLayout.ALIGN_CENTER); + layoutThis.setMajorAlignment(OrderedLayout.ALIGN_TOPLEFT); + layoutThis.setMajorSpacing(0); + layoutThis.setMinorSpacing(0); + layoutThis.setHorizontal(false); + return layoutThis; + } + + /** + * Create compartment for activity node + */ + protected void createContentPane() { + /* + * Compartment + */ + this.setLayoutManager(getLayoutManager()); + fStructuredActivityNodeCompartment = new RoundedRectangle(); + fStructuredActivityNodeCompartment.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8))); + fStructuredActivityNodeCompartment.setFill(false); + fStructuredActivityNodeCompartment.setOutline(false); + fStructuredActivityNodeCompartment.setLineWidth(0); + FlowLayoutAdvancedConstraint constraintFStructuredActivityNodeCompartment = new FlowLayoutAdvancedConstraint(); + constraintFStructuredActivityNodeCompartment.setFull(true); + this.add(fStructuredActivityNodeCompartment, constraintFStructuredActivityNodeCompartment); + } + + @Override + protected Object getDefaultLabelsConstraint() { + GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout(); + layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST); + fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode); + return super.getDefaultLabelsConstraint(); + } + + @Override + protected Object getNameLabelConstraint() { + GravityConstrainedFlowLayoutConstraint constraintFKeyword = new GravityConstrainedFlowLayoutConstraint(); + constraintFKeyword.setAlign(OrderedLayout.ALIGN_TOPLEFT); + return constraintFKeyword; + } + + @Override + protected IFigure getDefaultLabelsContainer() { + if (fFigureCompartmentLabelStructuredActivityNode == null) { + fFigureCompartmentLabelStructuredActivityNode = new RoundedRectangle(); + fFigureCompartmentLabelStructuredActivityNode.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8))); + fFigureCompartmentLabelStructuredActivityNode.setFill(false); + fFigureCompartmentLabelStructuredActivityNode.setOutline(false); + fFigureCompartmentLabelStructuredActivityNode.setLineWidth(0); + FlowLayoutAdvancedConstraint constraintFFigureCompartmentLabelStructuredActivityNode = new FlowLayoutAdvancedConstraint(); + constraintFFigureCompartmentLabelStructuredActivityNode.setHasMinsize(true); + this.add(fFigureCompartmentLabelStructuredActivityNode, constraintFFigureCompartmentLabelStructuredActivityNode); + GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout(); + layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST); + layoutFFigureCompartmentLabelStructuredActivityNode.setSpacing(10); + fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode); + } + return fFigureCompartmentLabelStructuredActivityNode; + } + + /** + * Compartment for activity node + */ + public RoundedRectangle getStructuredActivityNodeCompartment() { + return fStructuredActivityNodeCompartment; + } + + /** + * Get the keywork compartment + * + * @return + */ + public WrappingLabel getKeyword() { + return getNameLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java new file mode 100644 index 00000000000..98625cd6a4b --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java @@ -0,0 +1,119 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomActivityEditPart extends ActivityEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomActivityEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "Activity"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + + // DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, -20); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java new file mode 100644 index 00000000000..17f3e5b1535 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java @@ -0,0 +1,119 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPartCN; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomActivityEditPartCN extends ActivityEditPartCN { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomActivityEditPartCN(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "Activity"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + + // DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, -20); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java new file mode 100644 index 00000000000..a7fc3664a8c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java @@ -0,0 +1,80 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomActivityParameterNodeEditPart extends ActivityParameterNodeEditPart { + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomActivityParameterNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + // installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return super.createNodePlate();// result; + + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java new file mode 100644 index 00000000000..d7376e09729 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java @@ -0,0 +1,41 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionEditPart; + +public class CustomActivityPartitionEditPart extends ActivityPartitionEditPart { + + public CustomActivityPartitionEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, -20); + return result; + } + + // @Override + // protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + // if (borderItemEditPart instanceof FloatingLabelEditPart) { + // // Create specific locator + // RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // // Offset from the parent for the attached case + // locator.setBorderItemOffset(new Dimension(-20, -20)); + // borderItemContainer.add(borderItemEditPart.getFigure(), locator); + // } else { + // super.addBorderItem(borderItemContainer, borderItemEditPart); + // } + // } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java new file mode 100644 index 00000000000..dd3f1638c08 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java @@ -0,0 +1,110 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomAddStructuralFeatureValueActionEditPart extends AddStructuralFeatureValueActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomAddStructuralFeatureValueActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java new file mode 100644 index 00000000000..a2ac6d04a57 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java @@ -0,0 +1,113 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +/** + * The Class CustomAddVariableValueActionEditPart. + */ +public class CustomAddVariableValueActionEditPart extends AddVariableValueActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomAddVariableValueActionEditPart(View view) { + super(view); + // TODO Auto-generated constructor stub + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java new file mode 100644 index 00000000000..ec350b04a54 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomBroadcastSignalActionEditPart extends BroadcastSignalActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomBroadcastSignalActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java new file mode 100644 index 00000000000..2ac34349a57 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java @@ -0,0 +1,83 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomCallBehaviorActionEditPart extends CallBehaviorActionEditPart { + + /** + * + */ + private static final int CORNER_HEIGHT = 15; + + /** + * + */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + */ + public CustomCallBehaviorActionEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + * + * @return + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + * + * @return + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java new file mode 100644 index 00000000000..b689d6e1f75 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomCallOperationActionEditPart extends CallOperationActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomCallOperationActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java new file mode 100644 index 00000000000..6a5a051a45b --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java @@ -0,0 +1,103 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeSelectionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomCentralBufferNodeEditPart extends CentralBufferNodeEditPart { + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomCentralBufferNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshLabelDisplay() + * + */ + @Override + protected void refreshLabelDisplay() { + // TODO Auto-generated method stub + super.refreshLabelDisplay(); + // Allow multiline + getPrimaryShape().getNameLabel().setTextWrap(true); + // Center text + getPrimaryShape().getNameLabel().setTextJustification(PositionConstants.CENTER); + getPrimaryShape().getNameLabel().setAlignment(PositionConstants.CENTER); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(40, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof CentralBufferNodeSelectionEditPart) { + // use custom locator + BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java new file mode 100644 index 00000000000..c00795412c5 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java @@ -0,0 +1,127 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +/** + * The Class CustomConditionalNodeEditPart. + */ +public class CustomConditionalNodeEditPart extends ConditionalNodeEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 8; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 8; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomConditionalNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + + /** + * Gets the default border style. + * + * @return the default border style + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle() + */ + @Override + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java new file mode 100644 index 00000000000..870f79cdd96 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomCreateObjectActionEditPart extends CreateObjectActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomCreateObjectActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java new file mode 100644 index 00000000000..6a82a7ec139 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java @@ -0,0 +1,103 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreSelectionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomDataStoreNodeEditPart extends DataStoreNodeEditPart { + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomDataStoreNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshLabelDisplay() + * + */ + @Override + protected void refreshLabelDisplay() { + // TODO Auto-generated method stub + super.refreshLabelDisplay(); + // Allow multiline + getPrimaryShape().getNameLabel().setTextWrap(true); + // Center text + getPrimaryShape().getNameLabel().setTextJustification(PositionConstants.CENTER); + getPrimaryShape().getNameLabel().setAlignment(PositionConstants.CENTER); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(40, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof DataStoreSelectionEditPart) { + // use custom locator + BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java new file mode 100644 index 00000000000..aa4c1cb7bff --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomDestroyObjectActionEditPart extends DestroyObjectActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomDestroyObjectActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java new file mode 100644 index 00000000000..e4b0b7c202b --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java @@ -0,0 +1,127 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +/** + * The Class CustomExpansionRegionEditPart. + */ +public class CustomExpansionRegionEditPart extends ExpansionRegionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 8; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 8; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomExpansionRegionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + + /** + * Gets the default border style. + * + * @return the default border style + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle() + */ + @Override + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java new file mode 100644 index 00000000000..7419634519e --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java @@ -0,0 +1,115 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart; + +// TODO: Auto-generated Javadoc +/** + * The Class CustomInterruptibleActivityRegionEditPart. + */ +public class CustomInterruptibleActivityRegionEditPart extends InterruptibleActivityRegionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 8; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 8; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomInterruptibleActivityRegionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(40, 40); + return result; + } + + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart#createNodeFigure() + * + * @return + */ + @Override + protected NodeFigure createNodeFigure() { + return new SelectableBorderedNodeFigure(createMainFigureWithSVG()); + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + + /** + * Gets the default border style. + * + * @return the default border style + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle() + */ + @Override + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java new file mode 100644 index 00000000000..29e0ddf8606 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java @@ -0,0 +1,127 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +/** + * The Class CustomLoopNodeEditPart. + */ +public class CustomLoopNodeEditPart extends LoopNodeEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 8; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 8; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomLoopNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + + /** + * Gets the default border style. + * + * @return the default border style + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle() + */ + @Override + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java new file mode 100644 index 00000000000..23edcf9740d --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomOpaqueActionEditPart extends OpaqueActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomOpaqueActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java new file mode 100644 index 00000000000..be9b2358a3a --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomReadSelfActionEditPart extends ReadSelfActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomReadSelfActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java new file mode 100644 index 00000000000..c66d9247b64 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomReadStructuralFeatureActionEditPart extends ReadStructuralFeatureActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomReadStructuralFeatureActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java new file mode 100644 index 00000000000..f3a09cd46d3 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomReadVariableActionEditPart extends ReadVariableActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomReadVariableActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java new file mode 100644 index 00000000000..328e32b477d --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomSendObjectActionEditPart extends SendObjectActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomSendObjectActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java new file mode 100644 index 00000000000..b557ab91114 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java @@ -0,0 +1,127 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +/** + * The Class CustomSequenceNodeEditPart. + */ +public class CustomSequenceNodeEditPart extends SequenceNodeEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 8; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 8; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomSequenceNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + + /** + * Gets the default border style. + * + * @return the default border style + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle() + */ + @Override + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java new file mode 100644 index 00000000000..bf53aea18e7 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java @@ -0,0 +1,127 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +/** + * The Class CustomStructuredActivityNodeEditPart. + */ +public class CustomStructuredActivityNodeEditPart extends StructuredActivityNodeEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 8; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 8; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomStructuredActivityNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + + /** + * Gets the default border style. + * + * @return the default border style + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle() + */ + @Override + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java index 68ea69629e4..42acfed7ab2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java @@ -1,148 +1,223 @@ -/***************************************************************************** - * Copyright (c) 2011 Atos. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos - Initial API and implementation - * Arthur Daussy Bug 366026 - [ActivityDiagram] Refactoring in order to try respect Generation Gap Pattern - * Bug 366159 - [ActivityDiagram] Activity Diagram should be able to handle correctly Interruptible Edge - * Bug 367279 - [Activity Diagram] Activity Diagram should be able to handle correctly Exception Handler element - * Bug 368932 - [ActivitiyDiagram] Prevent Compartment of Activity group to be selected - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.part; - -import org.eclipse.gef.EditPart; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomActivityPartitionActivityPartitionContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptTimeEventActionAppliedStereotypeEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionActivityPartitionContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowInterruptibleIconEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExceptionHandlerIconEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowInterruptibleIconEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowSelectionEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowTransformationEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.UMLEditPartFactory; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; - -public class CustomUMLEditPartFactory extends UMLEditPartFactory { - - @Override - public EditPart createEditPart(EditPart context, Object model) { - if (model instanceof View) { - View view = (View) model; - switch (UMLVisualIDRegistry.getVisualID(view)) { - case ControlFlowEditPart.VISUAL_ID: - /* - * To implement InterruptibleEdge interface - */ - return new CustomControlFlowEditPart(view); - case ObjectFlowSelectionEditPart.VISUAL_ID: - /* - * Customization to handle special image label - */ - return new CustomObjectFlowSelectionEditPart(view); - case ObjectFlowTransformationEditPart.VISUAL_ID: - /* - * Customization to handle special image label - */ - return new CustomObjectFlowTransformationEditPart(view); - case ControlFlowInterruptibleIconEditPart.VISUAL_ID: - /* - * Customization to handle special image label - */ - return new CustomControlFlowInterruptibleIconEditPart(view); - case ObjectFlowEditPart.VISUAL_ID: - /* - * To implement InterruptibleEdge interface - */ - return new CustomObjectFlowEditPart(view); - case ObjectFlowInterruptibleIconEditPart.VISUAL_ID: - /* - * Customization to handle special image label - */ - return new CustomObjectFlowInterruptibleIconEditPart(view); - case ExceptionHandlerIconEditPart.VISUAL_ID: - /* - * Customization to handle special image label - */ - return new CustomExceptionHandlerIconEditPart(view); - case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomActivityPartitionActivityPartitionContentCompartmentEditPart(view); - case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view); - case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view); - case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart(view); - case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart(view); - case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view); - case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view); - case ActivityActivityContentCompartmentEditPart.VISUAL_ID: - /* - * Customization in order to make this compartment not selectable - * Custom figure - */ - return new CustomActivityActivityContentCompartmentEditPart(view); - case AcceptEventActionEditPart.VISUAL_ID: - return new CustomAcceptEventActionEditPart(view); - case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID: - return new CustomAcceptTimeEventActionAppliedStereotypeEditPart(view); - - } - } - return super.createEditPart(context, model); - } -} +/***************************************************************************** + * Copyright (c) 2011 Atos. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos - Initial API and implementation + * Arthur Daussy Bug 366026 - [ActivityDiagram] Refactoring in order to try respect Generation Gap Pattern + * Bug 366159 - [ActivityDiagram] Activity Diagram should be able to handle correctly Interruptible Edge + * Bug 367279 - [Activity Diagram] Activity Diagram should be able to handle correctly Exception Handler element + * Bug 368932 - [ActivitiyDiagram] Prevent Compartment of Activity group to be selected + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomActivityPartitionActivityPartitionContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptTimeEventActionAppliedStereotypeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPartCN; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionActivityPartitionContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowInterruptibleIconEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExceptionHandlerIconEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowInterruptibleIconEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowSelectionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowTransformationEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.UMLEditPartFactory; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; + +public class CustomUMLEditPartFactory extends UMLEditPartFactory { + + @Override + public EditPart createEditPart(EditPart context, Object model) { + if (model instanceof View) { + View view = (View) model; + switch (UMLVisualIDRegistry.getVisualID(view)) { + case ControlFlowEditPart.VISUAL_ID: + /* + * To implement InterruptibleEdge interface + */ + return new CustomControlFlowEditPart(view); + case ObjectFlowSelectionEditPart.VISUAL_ID: + /* + * Customization to handle special image label + */ + return new CustomObjectFlowSelectionEditPart(view); + case ObjectFlowTransformationEditPart.VISUAL_ID: + /* + * Customization to handle special image label + */ + return new CustomObjectFlowTransformationEditPart(view); + case ControlFlowInterruptibleIconEditPart.VISUAL_ID: + /* + * Customization to handle special image label + */ + return new CustomControlFlowInterruptibleIconEditPart(view); + case ObjectFlowEditPart.VISUAL_ID: + /* + * To implement InterruptibleEdge interface + */ + return new CustomObjectFlowEditPart(view); + case ObjectFlowInterruptibleIconEditPart.VISUAL_ID: + /* + * Customization to handle special image label + */ + return new CustomObjectFlowInterruptibleIconEditPart(view); + case ExceptionHandlerIconEditPart.VISUAL_ID: + /* + * Customization to handle special image label + */ + return new CustomExceptionHandlerIconEditPart(view); + case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomActivityPartitionActivityPartitionContentCompartmentEditPart(view); + case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view); + case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view); + case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart(view); + case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart(view); + case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view); + case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view); + case ActivityActivityContentCompartmentEditPart.VISUAL_ID: + /* + * Customization in order to make this compartment not selectable + * Custom figure + */ + return new CustomActivityActivityContentCompartmentEditPart(view); + case AcceptEventActionEditPart.VISUAL_ID: + return new CustomAcceptEventActionEditPart(view); + case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID: + return new CustomAcceptTimeEventActionAppliedStereotypeEditPart(view); + case ActivityPartitionEditPart.VISUAL_ID: + return new CustomActivityPartitionEditPart(view); + case BroadcastSignalActionEditPart.VISUAL_ID: + return new CustomBroadcastSignalActionEditPart(view); + case AddVariableValueActionEditPart.VISUAL_ID: + return new CustomAddVariableValueActionEditPart(view); + case InterruptibleActivityRegionEditPart.VISUAL_ID: + return new CustomInterruptibleActivityRegionEditPart(view); + case ExpansionRegionEditPart.VISUAL_ID: + return new CustomExpansionRegionEditPart(view); + case ConditionalNodeEditPart.VISUAL_ID: + return new CustomConditionalNodeEditPart(view); + case LoopNodeEditPart.VISUAL_ID: + return new CustomLoopNodeEditPart(view); + case SequenceNodeEditPart.VISUAL_ID: + return new CustomSequenceNodeEditPart(view); + case StructuredActivityNodeEditPart.VISUAL_ID: + return new CustomStructuredActivityNodeEditPart(view); + case CallBehaviorActionEditPart.VISUAL_ID: + return new CustomCallBehaviorActionEditPart(view); + case AddStructuralFeatureValueActionEditPart.VISUAL_ID: + return new CustomAddStructuralFeatureValueActionEditPart(view); + case CallOperationActionEditPart.VISUAL_ID: + return new CustomCallOperationActionEditPart(view); + case CreateObjectActionEditPart.VISUAL_ID: + return new CustomCreateObjectActionEditPart(view); + case DestroyObjectActionEditPart.VISUAL_ID: + return new CustomDestroyObjectActionEditPart(view); + case OpaqueActionEditPart.VISUAL_ID: + return new CustomOpaqueActionEditPart(view); + case ReadSelfActionEditPart.VISUAL_ID: + return new CustomReadSelfActionEditPart(view); + case ReadStructuralFeatureActionEditPart.VISUAL_ID: + return new CustomReadStructuralFeatureActionEditPart(view); + case ReadVariableActionEditPart.VISUAL_ID: + return new CustomReadVariableActionEditPart(view); + case SendObjectActionEditPart.VISUAL_ID: + return new CustomSendObjectActionEditPart(view); + case ValueSpecificationActionEditPart.VISUAL_ID: + return new CustomValueSpecificationActionEditPart(view); + case CentralBufferNodeEditPart.VISUAL_ID: + return new CustomCentralBufferNodeEditPart(view); + case DataStoreNodeEditPart.VISUAL_ID: + return new CustomDataStoreNodeEditPart(view); + case ActivityParameterNodeEditPart.VISUAL_ID: + return new CustomActivityParameterNodeEditPart(view); + case ActivityEditPart.VISUAL_ID: + return new CustomActivityEditPart(view); + case ActivityEditPartCN.VISUAL_ID: + return new CustomActivityEditPartCN(view); + + } + } + return super.createEditPart(context, model); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java new file mode 100644 index 00000000000..0f0cf848e4a --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator; + +public class CustomValueSpecificationActionEditPart extends ValueSpecificationActionEditPart { + + /** The Constant CORNER_HEIGHT. */ + private static final int CORNER_HEIGHT = 15; + + /** The Constant CORNER_WIDTH. */ + private static final int CORNER_WIDTH = 15; + + /** + * Constructor. + * + * @param view + * the view + */ + public CustomValueSpecificationActionEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy()); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate() + * + * @return + */ + @Override + protected NodeFigure createNodePlate() { + DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40); + return result; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) + * + * @param borderItemContainer + * @param borderItemEditPart + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof FloatingLabelEditPart) { + // Create specific locator + RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH); + // Offset from the parent for the attached case + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * Gets the default corner height. + * + * @return the default corner height + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight() + */ + @Override + protected int getDefaultCornerHeight() { + return CORNER_HEIGHT; + } + + /** + * Gets the default corner width. + * + * @return the default corner width + * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth() + */ + @Override + protected int getDefaultCornerWidth() { + return CORNER_WIDTH; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java new file mode 100644 index 00000000000..234417a19fa --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java @@ -0,0 +1,287 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.part; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gmf.runtime.notation.BooleanValueStyle; +import org.eclipse.gmf.runtime.notation.IntValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.StringValueStyle; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure; +import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; + +/** + * The Class RoundedCompartmentEditPart. + */ +public abstract class RoundedUMLNodeEditPart extends UMLNodeEditPart { + + /** The Constant BORDER_STYLE. */ + protected static final String BORDER_STYLE = "borderStyle"; + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_SOLID; + + /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */ + public static final String FLOATING_LABEL_OFFSET_HEIGHT = "floatingLabelOffsetHeight"; + + /** The Constant FLOATING_NAME_OFFSET_WIDTH. */ + public static final String FLOATING_LABEL_OFFSET_WIDTH = "floatingLabelOffsetWidth"; + + /** CSS boolean property controlling whether label should be constrained. */ + public static final String FLOATING_LABEL_CONSTRAINED = "isFloatingLabelConstrained"; + + /** CSS boolean property controlling whether. */ + public static final String RADIUS_WIDTH = "radiusWidth"; + + /** CSS boolean property controlling whether. */ + public static final String RADIUS_HEIGHT = "radiusHeight"; + + /** CSS boolean property controlling whether. */ + public static final String IS_OVAL = "isOval"; + + /** The Constant DEFAULT_IS_FLOATING_LABEL_CONSTRAINED. */ + private static final boolean DEFAULT_IS_FLOATING_LABEL_CONSTRAINED = false; + + /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_WIDTH. */ + private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0; + + /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT. */ + private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0; + + /** The Constant DEFAULT_CORNER_WIDTH. */ + private static final int DEFAULT_CORNER_WIDTH = 0; + + /** The Constant DEFAULT_CORNER_HEIGHT. */ + private static final int DEFAULT_CORNER_HEIGHT = 0; + + /** The Constant DEFAULT_IS_OVAL. */ + private static final boolean DEFAULT_IS_OVAL = false; + + /** + * Instantiates a new rounded compartment edit part. + * + * @param view + * the view + */ + public RoundedUMLNodeEditPart(View view) { + super(view); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + // Install Edit Policy to Hide/show compartment, in particular for the symbol compartment + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + } + + /** + * Refresh visuals. + * + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals() + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshRadius(); + refreshOval(); + refreshFloatingName(); + refreshBorderStyle(); + } + + /** + * Refresh border style. + */ + private void refreshBorderStyle() { + // get the Figure + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + // get CSS the value of radius Width + StringValueStyle borderValueStyle = (StringValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), BORDER_STYLE); + + // change style to int from string + int borderStyle = getDefaultBorderStyle(); + ; + if (borderValueStyle != null) { + if ("dash".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASH; + } + if ("dashDot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASHDOT; + } + if ("dashDotDot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASHDOTDOT; + } + if ("dot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DOT; + } + if ("solid".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_SOLID; + } + } + // set the border style of the figure + roundedRectangleFigure.setBorderStyle(borderStyle); + } + + } + + /** + * Gets the default border style. + * + * @return the default border style + */ + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + + + /** + * Refresh floating name. + */ + protected void refreshFloatingName() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + // Get CSS value for the name attached properties + BooleanValueStyle isNameConstrainedValue = (BooleanValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), FLOATING_LABEL_CONSTRAINED); + boolean isNameConstrained; + // if no css property set to default value + if (isNameConstrainedValue == null) { + isNameConstrained = getDefaultIsFloatingNameConstrained(); + } else { + isNameConstrained = isNameConstrainedValue.isBooleanValue(); + } + // Set the name attached properties in figure + roundedRectangleFigure.setFloatingNameConstrained(isNameConstrained); + + // get Offset + // get CSS the value of offset Width + IntValueStyle offsetWidth = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), FLOATING_LABEL_OFFSET_WIDTH); + int width = offsetWidth != null ? offsetWidth.getIntValue() : getDefaultFloatingNameOffsetWidth(); + + // get CSS the value of offset Height + IntValueStyle offsetHeight = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), FLOATING_LABEL_OFFSET_HEIGHT); + int height = offsetHeight != null ? offsetHeight.getIntValue() : getDefaultFloatingNameOffsetHeight(); + + // Set the floating name offset + roundedRectangleFigure.setFloatingNameOffset(new Dimension(width, height)); + + } + + } + + /** + * Gets the default is name constrained. + * + * @return the default is name constrained + */ + protected boolean getDefaultIsFloatingNameConstrained() { + return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED; + } + + /** + * Gets the default floating name offset height. + * + * @return the default floating name offset height + */ + protected int getDefaultFloatingNameOffsetHeight() { + return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT; + } + + /** + * Gets the default floating name offset width. + * + * @return the default floating name offset width + */ + protected int getDefaultFloatingNameOffsetWidth() { + return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH; + } + + /** + * Refresh radius. + */ + protected void refreshRadius() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + Dimension radiusDimension = new Dimension(); + + // get CSS the value of radius Width + IntValueStyle radiusWidth = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), RADIUS_WIDTH); + radiusDimension.width = radiusWidth != null ? radiusWidth.getIntValue() : getDefaultCornerWidth(); + + // get CSS the value of radius Height + IntValueStyle radiusHeight = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), RADIUS_HEIGHT); + radiusDimension.height = radiusHeight != null ? radiusHeight.getIntValue() : getDefaultCornerHeight(); + + // Set the corner dimension + roundedRectangleFigure.setCornerDimensions(radiusDimension); + } + } + + /** + * Gets the default corner height value. + * + * @return the default corner height value + */ + protected int getDefaultCornerHeight() { + return DEFAULT_CORNER_HEIGHT; + } + + /** + * Gets the default corner width value. + * + * @return the default corner width value + */ + protected int getDefaultCornerWidth() { + return DEFAULT_CORNER_WIDTH; + } + + /** + * Refresh oval. + */ + protected void refreshOval() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + // get the CSS value of isOval + BooleanValueStyle isOvalValue = (BooleanValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), IS_OVAL); + boolean isOval; + if (isOvalValue == null) { + isOval = getDefaultIsOvalValue(); + } else { + isOval = isOvalValue.isBooleanValue(); + } + // Set isOval + roundedRectangleFigure.setOval(isOval); + } + } + + /** + * Gets the default is oval value. + * + * @return the default is oval value + */ + protected boolean getDefaultIsOvalValue() { + return DEFAULT_IS_OVAL; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java index 5406d5ae114..8ff972a6dd9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java @@ -1,484 +1,484 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.activity.figures; - -import java.util.List; - -import org.eclipse.draw2d.AbstractLayout; -import org.eclipse.draw2d.BorderLayout; -import org.eclipse.draw2d.ColorConstants; -import org.eclipse.draw2d.GridData; -import org.eclipse.draw2d.GridLayout; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.RectangleFigure; -import org.eclipse.draw2d.RoundedRectangle; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; - -/** - * Activity figure for the activity diagram - * - * @author PT202707 - * - */ -public class ActivityFigure extends PapyrusRoundedNodeFigure { - - /** - * gap in x to display name stereotypes and qualified name - */ - protected final int GAP_X = 10; - - /** - * gap in y to display the first label at the top of the package - */ - protected final int GAP_Y = 5; - - /** - * this is the layout manager in charge to place element in the enumeration - * - */ - private class ActivityLayoutManager extends AbstractLayout { - - /** - * ---------------------------------------------------| |sterotypeLabel| - * precondition | |--------------| | |QualifiedName - * |-----------------------------------| |--------------| | |name | - * postcondition | |--------------------------------------------------| - * | stereotype compartment | - * |--------------------------------------------------| |parameter | | - * |----------- | | activity content | - * ---------------------------------------------------- - * - * {@inheritDoc} - */ - @Override - protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) { - int minimumWith = 0; - int minimumHeight = 0; - // take in account the content of the figure activity - if ((getContentFigure().getChildren().size() > 0)) { - IFigure content = (IFigure) getContentFigure().getChildren().get(0); - minimumWith = content.getPreferredSize().width + 50; - minimumHeight = content.getPreferredSize().height + 50; - } - // display name - if (getNameLabel() != null) { - if (getNameLabel().getPreferredSize().width > minimumWith) { - minimumWith = getNameLabel().getPreferredSize().width; - } - minimumHeight += getNameLabel().getPreferredSize().height; - } - if (getHeaderSingleExecution() != null) { - if (getHeaderSingleExecution().getBounds().getTopRight().x > minimumWith) { - minimumWith = getHeaderSingleExecution().getBounds().getTopRight().x; - } - } - return new Dimension(minimumWith, minimumHeight); - } - - /** - * - * {@inheritDoc} - */ - @Override - public void layout(IFigure container) { - List childrenList = container.getChildren(); - for (int i = 0; i < container.getChildren().size(); i++) { - Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); - bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); - if (i > 0) { - bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; - bound.x = getBounds().x + GAP_X; - } else { - bound.x = getBounds().x + GAP_X; - bound.y = getBounds().y + GAP_Y; - } - ((IFigure) childrenList.get(i)).setBounds(bound); - } - // container - Rectangle lastRectangle = getContentFigure().getBounds(); - lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y; - lastRectangle.x = container.getBounds().x; - lastRectangle.width = getBounds().width; - getContentFigure().setBounds(lastRectangle); - if (getGMFContentContainer() != null) { - getGMFContentContainer().setBounds(lastRectangle); - } - // place precondition - // setX - Rectangle preconditionBound = getPreconditionFigure().getBounds().getCopy(); - preconditionBound.x = getNameLabel().getBounds().getTopRight().x + GAP_X; - // take in account stereotype label - if (getStereotypesLabel() != null) { - int posStererotypeLabel = getStereotypesLabel().getBounds().getTopRight().x + GAP_X; - if (posStererotypeLabel > preconditionBound.x) { - preconditionBound.x = posStererotypeLabel; - } - } - // take in account qualified name - if (getQualifiedNameLabel() != null) { - int posqualifiedName = getQualifiedNameLabel().getBounds().getTopRight().x + GAP_X; - if (posqualifiedName > preconditionBound.x) { - preconditionBound.x = posqualifiedName; - } - } - // take in account stereotype properties - if (stereotypePropertiesInBraceContent != null) { - int possterotypeInBrace = stereotypePropertiesInBraceContent.getBounds().getTopRight().x + GAP_X; - if (possterotypeInBrace > preconditionBound.x) { - preconditionBound.x = possterotypeInBrace; - } - } - // take in account parameter figure - if (getParameterFigure() != null) { - int posparameter = getParameterFigure().getBounds().getTopRight().x + GAP_X; - if (posparameter > preconditionBound.x) { - preconditionBound.x = posparameter; - } - } - // setY - preconditionBound.y = ((IFigure) container.getChildren().get(0)).getBounds().y; - getPreconditionFigure().setBounds(preconditionBound); - if (getPreconditionFigure().getChildren().size() > 0) { - ((IFigure) getPreconditionFigure().getChildren().get(0)).setBounds(preconditionBound); - ; - } - // setPoscondtion - Rectangle postconditionBound = getPostconditionFigure().getBounds().getCopy(); - postconditionBound.x = getPreconditionFigure().getBounds().x; - postconditionBound.y = getPreconditionFigure().getBounds().y + getPreconditionFigure().getBounds().height + GAP_Y; - getPostconditionFigure().setBounds(postconditionBound); - if (getPostconditionFigure().getChildren().size() > 0) { - ((IFigure) getPostconditionFigure().getChildren().get(0)).setBounds(postconditionBound); - ; - } - // setPoscondtion - Rectangle singleExecutionBound = getHeaderSingleExecution().getBounds().getCopy(); - singleExecutionBound.x = getPreconditionFigure().getBounds().x + getPreconditionFigure().getBounds().width + GAP_X; - ; - singleExecutionBound.y = getPreconditionFigure().getBounds().y; - getHeaderSingleExecution().setBounds(singleExecutionBound); - // replace compartment stereotype properties - if (getStereotypePropertiesContent() != null) { - Rectangle pscontainer = getStereotypePropertiesContent().getBounds().getCopy(); - if (getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y > pscontainer.y) { - pscontainer.y = getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y; - } - getStereotypePropertiesContent().setBounds(pscontainer); - } - // place parameter - // replace compartment stereotype properties - if (getStereotypePropertiesContent() != null) { - Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy(); - paramBoundcontainer.y = getStereotypePropertiesContent().getBounds().getBottomLeft().y; - getParameterFigure().setBounds(paramBoundcontainer); - if (getParameterFigure().getChildren().size() > 0) { - ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer); - } - } else { - Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy(); - paramBoundcontainer.y = getNameLabel().getBounds().getBottomLeft().y; - getParameterFigure().setBounds(paramBoundcontainer); - if (getParameterFigure().getChildren().size() > 0) { - ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer); - ; - } - } - } - } - - /** - * @generated - */ - private WrappingLabel fHeaderLabel; - - /** - * @generated - */ - private RectangleFigure fActivityParametersCompartment; - - /** - * @generated - */ - private RectangleFigure fActivityPreconditionsCompartment; - - /** - * @generated - */ - private RectangleFigure fActivityPostconditionsCompartment; - - /** - * @generated - */ - protected WrappingLabel fHeaderSingleExecution; - - /** - * @generated - */ - private RectangleFigure fCompartmentFigure; - - private RectangleFigure shapeCompartment; - - private RectangleFigure preconditionFigure; - - private RectangleFigure postconditionFigure; - - private RectangleFigure parameterFigure; - - /** - * @generated - */ - public ActivityFigure() { - super(); - setLayoutManager(new ActivityLayoutManager()); - shapeCompartment = new RectangleFigure(); - shapeCompartment.setOpaque(false); - shapeCompartment.setFill(false); - shapeCompartment.setOutline(false); - shapeCompartment.setLineWidth(0); - add(shapeCompartment); - preconditionFigure = new RectangleFigure(); - preconditionFigure.setOpaque(false); - preconditionFigure.setFill(false); - preconditionFigure.setOutline(false); - preconditionFigure.setLineWidth(10); - preconditionFigure.setBorder(null); - preconditionFigure.setForegroundColor(ColorConstants.red); - add(preconditionFigure); - parameterFigure = new RectangleFigure(); - parameterFigure.setOpaque(false); - parameterFigure.setFill(false); - parameterFigure.setOutline(false); - parameterFigure.setLineWidth(0); - add(parameterFigure); - postconditionFigure = new RectangleFigure(); - postconditionFigure.setOpaque(false); - postconditionFigure.setFill(false); - postconditionFigure.setOutline(false); - postconditionFigure.setLineWidth(0); - add(postconditionFigure); - fHeaderSingleExecution = new WrappingLabel(); - add(fHeaderSingleExecution); - // createContents(); - } - - public RectangleFigure getPreconditionFigure() { - return preconditionFigure; - } - - public RectangleFigure getPostconditionFigure() { - return postconditionFigure; - } - - public RectangleFigure getParameterFigure() { - return parameterFigure; - } - - public RectangleFigure getContentFigure() { - return shapeCompartment; - } - - /** - * get the gmf container figure of the package - * - * @return the gmf container - */ - public ShapeCompartmentFigure getGMFContentContainer() { - if (shapeCompartment.getChildren().size() > 0) { - return (ShapeCompartmentFigure) shapeCompartment.getChildren().get(0); - } - return null; - } - - /** - * @generated - */ - private void createContents() { - RoundedRectangle activityBorderFigure0 = new RoundedRectangle(); - this.add(activityBorderFigure0, BorderLayout.CENTER); - // to remove - activityBorderFigure0.setBackgroundColor(ColorConstants.red); - GridLayout layoutActivityBorderFigure0 = new GridLayout(); - layoutActivityBorderFigure0.numColumns = 3; - layoutActivityBorderFigure0.makeColumnsEqualWidth = false; - layoutActivityBorderFigure0.horizontalSpacing = 0; - layoutActivityBorderFigure0.verticalSpacing = 0; - layoutActivityBorderFigure0.marginWidth = 0; - layoutActivityBorderFigure0.marginHeight = 0; - activityBorderFigure0.setLayoutManager(layoutActivityBorderFigure0); - RectangleFigure labelAndParameter1 = new RectangleFigure(); - labelAndParameter1.setFill(false); - labelAndParameter1.setOutline(false); - labelAndParameter1.setLineWidth(0); - // to remove - labelAndParameter1.setBackgroundColor(ColorConstants.blue); - GridData constraintLabelAndParameter1 = new GridData(); - constraintLabelAndParameter1.verticalAlignment = GridData.CENTER; - constraintLabelAndParameter1.horizontalAlignment = GridData.BEGINNING; - constraintLabelAndParameter1.horizontalIndent = 0; - constraintLabelAndParameter1.horizontalSpan = 1; - constraintLabelAndParameter1.verticalSpan = 1; - constraintLabelAndParameter1.grabExcessHorizontalSpace = true; - constraintLabelAndParameter1.grabExcessVerticalSpace = false; - activityBorderFigure0.add(labelAndParameter1, constraintLabelAndParameter1); - GridLayout layoutLabelAndParameter1 = new GridLayout(); - layoutLabelAndParameter1.numColumns = 1; - layoutLabelAndParameter1.makeColumnsEqualWidth = true; - labelAndParameter1.setLayoutManager(layoutLabelAndParameter1); - fHeaderLabel = new WrappingLabel(); - fHeaderLabel.setText("ActivityName"); - GridData constraintFHeaderLabel = new GridData(); - constraintFHeaderLabel.verticalAlignment = GridData.CENTER; - constraintFHeaderLabel.horizontalAlignment = GridData.BEGINNING; - constraintFHeaderLabel.horizontalIndent = 4; - constraintFHeaderLabel.horizontalSpan = 1; - constraintFHeaderLabel.verticalSpan = 1; - constraintFHeaderLabel.grabExcessHorizontalSpace = true; - constraintFHeaderLabel.grabExcessVerticalSpace = false; - labelAndParameter1.add(fHeaderLabel, constraintFHeaderLabel); - fActivityParametersCompartment = new RectangleFigure(); - // to remove - fActivityParametersCompartment.setBackgroundColor(ColorConstants.green); - fActivityParametersCompartment.setFill(false); - fActivityParametersCompartment.setOutline(false); - fActivityParametersCompartment.setLineWidth(0); - GridData constraintFActivityParametersCompartment = new GridData(); - constraintFActivityParametersCompartment.verticalAlignment = GridData.CENTER; - constraintFActivityParametersCompartment.horizontalAlignment = GridData.BEGINNING; - constraintFActivityParametersCompartment.horizontalIndent = 0; - constraintFActivityParametersCompartment.horizontalSpan = 1; - constraintFActivityParametersCompartment.verticalSpan = 1; - constraintFActivityParametersCompartment.grabExcessHorizontalSpace = true; - constraintFActivityParametersCompartment.grabExcessVerticalSpace = false; - labelAndParameter1.add(fActivityParametersCompartment, constraintFActivityParametersCompartment); - fActivityParametersCompartment.setLayoutManager(new StackLayout()); - RectangleFigure prePostContions1 = new RectangleFigure(); - // to remove - prePostContions1.setBackgroundColor(ColorConstants.cyan); - prePostContions1.setFill(false); - prePostContions1.setOutline(false); - prePostContions1.setLineWidth(0); - GridData constraintPrePostContions1 = new GridData(); - constraintPrePostContions1.verticalAlignment = GridData.CENTER; - constraintPrePostContions1.horizontalAlignment = GridData.BEGINNING; - constraintPrePostContions1.horizontalIndent = 0; - constraintPrePostContions1.horizontalSpan = 1; - constraintPrePostContions1.verticalSpan = 1; - constraintPrePostContions1.grabExcessHorizontalSpace = true; - constraintPrePostContions1.grabExcessVerticalSpace = false; - activityBorderFigure0.add(prePostContions1, constraintPrePostContions1); - GridLayout layoutPrePostContions1 = new GridLayout(); - layoutPrePostContions1.numColumns = 1; - layoutPrePostContions1.makeColumnsEqualWidth = true; - prePostContions1.setLayoutManager(layoutPrePostContions1); - fActivityPreconditionsCompartment = new RectangleFigure(); - fActivityPreconditionsCompartment.setBackgroundColor(ColorConstants.darkBlue); - fActivityPreconditionsCompartment.setFill(false); - fActivityPreconditionsCompartment.setOutline(false); - fActivityPreconditionsCompartment.setLineWidth(0); - GridData constraintFActivityPreconditionsCompartment = new GridData(); - constraintFActivityPreconditionsCompartment.verticalAlignment = GridData.CENTER; - constraintFActivityPreconditionsCompartment.horizontalAlignment = GridData.BEGINNING; - constraintFActivityPreconditionsCompartment.horizontalIndent = 0; - constraintFActivityPreconditionsCompartment.horizontalSpan = 1; - constraintFActivityPreconditionsCompartment.verticalSpan = 1; - constraintFActivityPreconditionsCompartment.grabExcessHorizontalSpace = true; - constraintFActivityPreconditionsCompartment.grabExcessVerticalSpace = false; - prePostContions1.add(fActivityPreconditionsCompartment, constraintFActivityPreconditionsCompartment); - fActivityPreconditionsCompartment.setLayoutManager(new StackLayout()); - fActivityPostconditionsCompartment = new RectangleFigure(); - fActivityPostconditionsCompartment.setFill(false); - fActivityPostconditionsCompartment.setOutline(false); - fActivityPostconditionsCompartment.setLineWidth(0); - GridData constraintFActivityPostconditionsCompartment = new GridData(); - constraintFActivityPostconditionsCompartment.verticalAlignment = GridData.CENTER; - constraintFActivityPostconditionsCompartment.horizontalAlignment = GridData.BEGINNING; - constraintFActivityPostconditionsCompartment.horizontalIndent = 0; - constraintFActivityPostconditionsCompartment.horizontalSpan = 1; - constraintFActivityPostconditionsCompartment.verticalSpan = 1; - constraintFActivityPostconditionsCompartment.grabExcessHorizontalSpace = true; - constraintFActivityPostconditionsCompartment.grabExcessVerticalSpace = false; - prePostContions1.add(fActivityPostconditionsCompartment, constraintFActivityPostconditionsCompartment); - fActivityPostconditionsCompartment.setLayoutManager(new StackLayout()); - fHeaderSingleExecution = new WrappingLabel(); - fHeaderSingleExecution.setText(""); - GridData constraintFHeaderSingleExecution = new GridData(); - constraintFHeaderSingleExecution.verticalAlignment = GridData.CENTER; - constraintFHeaderSingleExecution.horizontalAlignment = GridData.BEGINNING; - constraintFHeaderSingleExecution.horizontalIndent = 0; - constraintFHeaderSingleExecution.horizontalSpan = 1; - constraintFHeaderSingleExecution.verticalSpan = 2; - constraintFHeaderSingleExecution.grabExcessHorizontalSpace = false; - constraintFHeaderSingleExecution.grabExcessVerticalSpace = false; - activityBorderFigure0.add(fHeaderSingleExecution, constraintFHeaderSingleExecution); - fCompartmentFigure = new RectangleFigure(); - fCompartmentFigure.setFill(false); - fCompartmentFigure.setOutline(false); - fCompartmentFigure.setLineWidth(0); - GridData constraintFCompartmentFigure = new GridData(); - constraintFCompartmentFigure.verticalAlignment = GridData.FILL; - constraintFCompartmentFigure.horizontalAlignment = GridData.FILL; - constraintFCompartmentFigure.horizontalIndent = 0; - constraintFCompartmentFigure.horizontalSpan = 3; - constraintFCompartmentFigure.verticalSpan = 1; - constraintFCompartmentFigure.grabExcessHorizontalSpace = true; - constraintFCompartmentFigure.grabExcessVerticalSpace = true; - activityBorderFigure0.add(fCompartmentFigure, constraintFCompartmentFigure); - } - - /** - * @generated - */ - public WrappingLabel getHeaderLabel() { - return fHeaderLabel; - } - - /** - * @generated - */ - public RectangleFigure getActivityParametersCompartment() { - return fActivityParametersCompartment; - } - - /** - * @generated - */ - public RectangleFigure getActivityPreconditionsCompartment() { - return fActivityPreconditionsCompartment; - } - - /** - * @generated - */ - public RectangleFigure getActivityPostconditionsCompartment() { - return fActivityPostconditionsCompartment; - } - - /** - * @generated - */ - public WrappingLabel getHeaderSingleExecution() { - return fHeaderSingleExecution; - } - - /** - * @generated - */ - public RectangleFigure getCompartmentFigure() { - return fCompartmentFigure; - } -} +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.uml.diagram.activity.figures; + +import java.util.List; + +import org.eclipse.draw2d.AbstractLayout; +import org.eclipse.draw2d.BorderLayout; +import org.eclipse.draw2d.ColorConstants; +import org.eclipse.draw2d.GridData; +import org.eclipse.draw2d.GridLayout; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.draw2d.RoundedRectangle; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; + +/** + * Activity figure for the activity diagram + * + * @author PT202707 + * + */ +public class ActivityFigure extends RoundedCompartmentFigure { // PapyrusRoundedNodeFigure RoundedCompartmentFigure + + /** + * gap in x to display name stereotypes and qualified name + */ + protected final int GAP_X = 10; + + /** + * gap in y to display the first label at the top of the package + */ + protected final int GAP_Y = 5; + + /** + * this is the layout manager in charge to place element in the enumeration + * + */ + private class ActivityLayoutManager extends AbstractLayout { + + /** + * ---------------------------------------------------| |sterotypeLabel| + * precondition | |--------------| | |QualifiedName + * |-----------------------------------| |--------------| | |name | + * postcondition | |--------------------------------------------------| + * | stereotype compartment | + * |--------------------------------------------------| |parameter | | + * |----------- | | activity content | + * ---------------------------------------------------- + * + * {@inheritDoc} + */ + @Override + protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) { + int minimumWith = 0; + int minimumHeight = 0; + // take in account the content of the figure activity + if ((getContentFigure().getChildren().size() > 0)) { + IFigure content = (IFigure) getContentFigure().getChildren().get(0); + minimumWith = content.getPreferredSize().width + 50; + minimumHeight = content.getPreferredSize().height + 50; + } + // display name + if (getNameLabel() != null) { + if (getNameLabel().getPreferredSize().width > minimumWith) { + minimumWith = getNameLabel().getPreferredSize().width; + } + minimumHeight += getNameLabel().getPreferredSize().height; + } + if (getHeaderSingleExecution() != null) { + if (getHeaderSingleExecution().getBounds().getTopRight().x > minimumWith) { + minimumWith = getHeaderSingleExecution().getBounds().getTopRight().x; + } + } + return new Dimension(minimumWith, minimumHeight); + } + + /** + * + * {@inheritDoc} + */ + @Override + public void layout(IFigure container) { + List childrenList = container.getChildren(); + for (int i = 0; i < container.getChildren().size(); i++) { + Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); + bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); + if (i > 0) { + bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; + bound.x = getBounds().x + GAP_X; + } else { + bound.x = getBounds().x + GAP_X; + bound.y = getBounds().y + GAP_Y; + } + ((IFigure) childrenList.get(i)).setBounds(bound); + } + // container + Rectangle lastRectangle = getContentFigure().getBounds(); + lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y; + lastRectangle.x = container.getBounds().x; + lastRectangle.width = getBounds().width; + getContentFigure().setBounds(lastRectangle); + if (getGMFContentContainer() != null) { + getGMFContentContainer().setBounds(lastRectangle); + } + // place precondition + // setX + Rectangle preconditionBound = getPreconditionFigure().getBounds().getCopy(); + preconditionBound.x = getNameLabel().getBounds().getTopRight().x + GAP_X; + // take in account stereotype label + if (getStereotypesLabel() != null) { + int posStererotypeLabel = getStereotypesLabel().getBounds().getTopRight().x + GAP_X; + if (posStererotypeLabel > preconditionBound.x) { + preconditionBound.x = posStererotypeLabel; + } + } + // take in account qualified name + if (getQualifiedNameLabel() != null) { + int posqualifiedName = getQualifiedNameLabel().getBounds().getTopRight().x + GAP_X; + if (posqualifiedName > preconditionBound.x) { + preconditionBound.x = posqualifiedName; + } + } + // take in account stereotype properties + if (stereotypePropertiesInBraceContent != null) { + int possterotypeInBrace = stereotypePropertiesInBraceContent.getBounds().getTopRight().x + GAP_X; + if (possterotypeInBrace > preconditionBound.x) { + preconditionBound.x = possterotypeInBrace; + } + } + // take in account parameter figure + if (getParameterFigure() != null) { + int posparameter = getParameterFigure().getBounds().getTopRight().x + GAP_X; + if (posparameter > preconditionBound.x) { + preconditionBound.x = posparameter; + } + } + // setY + preconditionBound.y = ((IFigure) container.getChildren().get(0)).getBounds().y; + getPreconditionFigure().setBounds(preconditionBound); + if (getPreconditionFigure().getChildren().size() > 0) { + ((IFigure) getPreconditionFigure().getChildren().get(0)).setBounds(preconditionBound); + ; + } + // setPoscondtion + Rectangle postconditionBound = getPostconditionFigure().getBounds().getCopy(); + postconditionBound.x = getPreconditionFigure().getBounds().x; + postconditionBound.y = getPreconditionFigure().getBounds().y + getPreconditionFigure().getBounds().height + GAP_Y; + getPostconditionFigure().setBounds(postconditionBound); + if (getPostconditionFigure().getChildren().size() > 0) { + ((IFigure) getPostconditionFigure().getChildren().get(0)).setBounds(postconditionBound); + ; + } + // setPoscondtion + Rectangle singleExecutionBound = getHeaderSingleExecution().getBounds().getCopy(); + singleExecutionBound.x = getPreconditionFigure().getBounds().x + getPreconditionFigure().getBounds().width + GAP_X; + ; + singleExecutionBound.y = getPreconditionFigure().getBounds().y; + getHeaderSingleExecution().setBounds(singleExecutionBound); + // replace compartment stereotype properties + if (getStereotypePropertiesContent() != null) { + Rectangle pscontainer = getStereotypePropertiesContent().getBounds().getCopy(); + if (getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y > pscontainer.y) { + pscontainer.y = getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y; + } + getStereotypePropertiesContent().setBounds(pscontainer); + } + // place parameter + // replace compartment stereotype properties + if (getStereotypePropertiesContent() != null) { + Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy(); + paramBoundcontainer.y = getStereotypePropertiesContent().getBounds().getBottomLeft().y; + getParameterFigure().setBounds(paramBoundcontainer); + if (getParameterFigure().getChildren().size() > 0) { + ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer); + } + } else { + Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy(); + paramBoundcontainer.y = getNameLabel().getBounds().getBottomLeft().y; + getParameterFigure().setBounds(paramBoundcontainer); + if (getParameterFigure().getChildren().size() > 0) { + ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer); + ; + } + } + } + } + + /** + * @generated + */ + private WrappingLabel fHeaderLabel; + + /** + * @generated + */ + private RectangleFigure fActivityParametersCompartment; + + /** + * @generated + */ + private RectangleFigure fActivityPreconditionsCompartment; + + /** + * @generated + */ + private RectangleFigure fActivityPostconditionsCompartment; + + /** + * @generated + */ + protected WrappingLabel fHeaderSingleExecution; + + /** + * @generated + */ + private RectangleFigure fCompartmentFigure; + + private RectangleFigure shapeCompartment; + + private RectangleFigure preconditionFigure; + + private RectangleFigure postconditionFigure; + + private RectangleFigure parameterFigure; + + /** + * @generated + */ + public ActivityFigure() { + super(); + setLayoutManager(new ActivityLayoutManager()); + shapeCompartment = new RectangleFigure(); + shapeCompartment.setOpaque(false); + shapeCompartment.setFill(false); + shapeCompartment.setOutline(false); + shapeCompartment.setLineWidth(0); + add(shapeCompartment); + preconditionFigure = new RectangleFigure(); + preconditionFigure.setOpaque(false); + preconditionFigure.setFill(false); + preconditionFigure.setOutline(false); + preconditionFigure.setLineWidth(10); + preconditionFigure.setBorder(null); + preconditionFigure.setForegroundColor(ColorConstants.red); + add(preconditionFigure); + parameterFigure = new RectangleFigure(); + parameterFigure.setOpaque(false); + parameterFigure.setFill(false); + parameterFigure.setOutline(false); + parameterFigure.setLineWidth(0); + add(parameterFigure); + postconditionFigure = new RectangleFigure(); + postconditionFigure.setOpaque(false); + postconditionFigure.setFill(false); + postconditionFigure.setOutline(false); + postconditionFigure.setLineWidth(0); + add(postconditionFigure); + fHeaderSingleExecution = new WrappingLabel(); + add(fHeaderSingleExecution); + // createContents(); + } + + public RectangleFigure getPreconditionFigure() { + return preconditionFigure; + } + + public RectangleFigure getPostconditionFigure() { + return postconditionFigure; + } + + public RectangleFigure getParameterFigure() { + return parameterFigure; + } + + public RectangleFigure getContentFigure() { + return shapeCompartment; + } + + /** + * get the gmf container figure of the package + * + * @return the gmf container + */ + public ShapeCompartmentFigure getGMFContentContainer() { + if (shapeCompartment.getChildren().size() > 0) { + return (ShapeCompartmentFigure) shapeCompartment.getChildren().get(0); + } + return null; + } + + /** + * @generated + */ + private void createContents() { + RoundedRectangle activityBorderFigure0 = new RoundedRectangle(); + this.add(activityBorderFigure0, BorderLayout.CENTER); + // to remove + activityBorderFigure0.setBackgroundColor(ColorConstants.red); + GridLayout layoutActivityBorderFigure0 = new GridLayout(); + layoutActivityBorderFigure0.numColumns = 3; + layoutActivityBorderFigure0.makeColumnsEqualWidth = false; + layoutActivityBorderFigure0.horizontalSpacing = 0; + layoutActivityBorderFigure0.verticalSpacing = 0; + layoutActivityBorderFigure0.marginWidth = 0; + layoutActivityBorderFigure0.marginHeight = 0; + activityBorderFigure0.setLayoutManager(layoutActivityBorderFigure0); + RectangleFigure labelAndParameter1 = new RectangleFigure(); + labelAndParameter1.setFill(false); + labelAndParameter1.setOutline(false); + labelAndParameter1.setLineWidth(0); + // to remove + labelAndParameter1.setBackgroundColor(ColorConstants.blue); + GridData constraintLabelAndParameter1 = new GridData(); + constraintLabelAndParameter1.verticalAlignment = GridData.CENTER; + constraintLabelAndParameter1.horizontalAlignment = GridData.BEGINNING; + constraintLabelAndParameter1.horizontalIndent = 0; + constraintLabelAndParameter1.horizontalSpan = 1; + constraintLabelAndParameter1.verticalSpan = 1; + constraintLabelAndParameter1.grabExcessHorizontalSpace = true; + constraintLabelAndParameter1.grabExcessVerticalSpace = false; + activityBorderFigure0.add(labelAndParameter1, constraintLabelAndParameter1); + GridLayout layoutLabelAndParameter1 = new GridLayout(); + layoutLabelAndParameter1.numColumns = 1; + layoutLabelAndParameter1.makeColumnsEqualWidth = true; + labelAndParameter1.setLayoutManager(layoutLabelAndParameter1); + fHeaderLabel = new WrappingLabel(); + fHeaderLabel.setText("ActivityName"); + GridData constraintFHeaderLabel = new GridData(); + constraintFHeaderLabel.verticalAlignment = GridData.CENTER; + constraintFHeaderLabel.horizontalAlignment = GridData.BEGINNING; + constraintFHeaderLabel.horizontalIndent = 4; + constraintFHeaderLabel.horizontalSpan = 1; + constraintFHeaderLabel.verticalSpan = 1; + constraintFHeaderLabel.grabExcessHorizontalSpace = true; + constraintFHeaderLabel.grabExcessVerticalSpace = false; + labelAndParameter1.add(fHeaderLabel, constraintFHeaderLabel); + fActivityParametersCompartment = new RectangleFigure(); + // to remove + fActivityParametersCompartment.setBackgroundColor(ColorConstants.green); + fActivityParametersCompartment.setFill(false); + fActivityParametersCompartment.setOutline(false); + fActivityParametersCompartment.setLineWidth(0); + GridData constraintFActivityParametersCompartment = new GridData(); + constraintFActivityParametersCompartment.verticalAlignment = GridData.CENTER; + constraintFActivityParametersCompartment.horizontalAlignment = GridData.BEGINNING; + constraintFActivityParametersCompartment.horizontalIndent = 0; + constraintFActivityParametersCompartment.horizontalSpan = 1; + constraintFActivityParametersCompartment.verticalSpan = 1; + constraintFActivityParametersCompartment.grabExcessHorizontalSpace = true; + constraintFActivityParametersCompartment.grabExcessVerticalSpace = false; + labelAndParameter1.add(fActivityParametersCompartment, constraintFActivityParametersCompartment); + fActivityParametersCompartment.setLayoutManager(new StackLayout()); + RectangleFigure prePostContions1 = new RectangleFigure(); + // to remove + prePostContions1.setBackgroundColor(ColorConstants.cyan); + prePostContions1.setFill(false); + prePostContions1.setOutline(false); + prePostContions1.setLineWidth(0); + GridData constraintPrePostContions1 = new GridData(); + constraintPrePostContions1.verticalAlignment = GridData.CENTER; + constraintPrePostContions1.horizontalAlignment = GridData.BEGINNING; + constraintPrePostContions1.horizontalIndent = 0; + constraintPrePostContions1.horizontalSpan = 1; + constraintPrePostContions1.verticalSpan = 1; + constraintPrePostContions1.grabExcessHorizontalSpace = true; + constraintPrePostContions1.grabExcessVerticalSpace = false; + activityBorderFigure0.add(prePostContions1, constraintPrePostContions1); + GridLayout layoutPrePostContions1 = new GridLayout(); + layoutPrePostContions1.numColumns = 1; + layoutPrePostContions1.makeColumnsEqualWidth = true; + prePostContions1.setLayoutManager(layoutPrePostContions1); + fActivityPreconditionsCompartment = new RectangleFigure(); + fActivityPreconditionsCompartment.setBackgroundColor(ColorConstants.darkBlue); + fActivityPreconditionsCompartment.setFill(false); + fActivityPreconditionsCompartment.setOutline(false); + fActivityPreconditionsCompartment.setLineWidth(0); + GridData constraintFActivityPreconditionsCompartment = new GridData(); + constraintFActivityPreconditionsCompartment.verticalAlignment = GridData.CENTER; + constraintFActivityPreconditionsCompartment.horizontalAlignment = GridData.BEGINNING; + constraintFActivityPreconditionsCompartment.horizontalIndent = 0; + constraintFActivityPreconditionsCompartment.horizontalSpan = 1; + constraintFActivityPreconditionsCompartment.verticalSpan = 1; + constraintFActivityPreconditionsCompartment.grabExcessHorizontalSpace = true; + constraintFActivityPreconditionsCompartment.grabExcessVerticalSpace = false; + prePostContions1.add(fActivityPreconditionsCompartment, constraintFActivityPreconditionsCompartment); + fActivityPreconditionsCompartment.setLayoutManager(new StackLayout()); + fActivityPostconditionsCompartment = new RectangleFigure(); + fActivityPostconditionsCompartment.setFill(false); + fActivityPostconditionsCompartment.setOutline(false); + fActivityPostconditionsCompartment.setLineWidth(0); + GridData constraintFActivityPostconditionsCompartment = new GridData(); + constraintFActivityPostconditionsCompartment.verticalAlignment = GridData.CENTER; + constraintFActivityPostconditionsCompartment.horizontalAlignment = GridData.BEGINNING; + constraintFActivityPostconditionsCompartment.horizontalIndent = 0; + constraintFActivityPostconditionsCompartment.horizontalSpan = 1; + constraintFActivityPostconditionsCompartment.verticalSpan = 1; + constraintFActivityPostconditionsCompartment.grabExcessHorizontalSpace = true; + constraintFActivityPostconditionsCompartment.grabExcessVerticalSpace = false; + prePostContions1.add(fActivityPostconditionsCompartment, constraintFActivityPostconditionsCompartment); + fActivityPostconditionsCompartment.setLayoutManager(new StackLayout()); + fHeaderSingleExecution = new WrappingLabel(); + fHeaderSingleExecution.setText(""); + GridData constraintFHeaderSingleExecution = new GridData(); + constraintFHeaderSingleExecution.verticalAlignment = GridData.CENTER; + constraintFHeaderSingleExecution.horizontalAlignment = GridData.BEGINNING; + constraintFHeaderSingleExecution.horizontalIndent = 0; + constraintFHeaderSingleExecution.horizontalSpan = 1; + constraintFHeaderSingleExecution.verticalSpan = 2; + constraintFHeaderSingleExecution.grabExcessHorizontalSpace = false; + constraintFHeaderSingleExecution.grabExcessVerticalSpace = false; + activityBorderFigure0.add(fHeaderSingleExecution, constraintFHeaderSingleExecution); + fCompartmentFigure = new RectangleFigure(); + fCompartmentFigure.setFill(false); + fCompartmentFigure.setOutline(false); + fCompartmentFigure.setLineWidth(0); + GridData constraintFCompartmentFigure = new GridData(); + constraintFCompartmentFigure.verticalAlignment = GridData.FILL; + constraintFCompartmentFigure.horizontalAlignment = GridData.FILL; + constraintFCompartmentFigure.horizontalIndent = 0; + constraintFCompartmentFigure.horizontalSpan = 3; + constraintFCompartmentFigure.verticalSpan = 1; + constraintFCompartmentFigure.grabExcessHorizontalSpace = true; + constraintFCompartmentFigure.grabExcessVerticalSpace = true; + activityBorderFigure0.add(fCompartmentFigure, constraintFCompartmentFigure); + } + + /** + * @generated + */ + public WrappingLabel getHeaderLabel() { + return fHeaderLabel; + } + + /** + * @generated + */ + public RectangleFigure getActivityParametersCompartment() { + return fActivityParametersCompartment; + } + + /** + * @generated + */ + public RectangleFigure getActivityPreconditionsCompartment() { + return fActivityPreconditionsCompartment; + } + + /** + * @generated + */ + public RectangleFigure getActivityPostconditionsCompartment() { + return fActivityPostconditionsCompartment; + } + + /** + * @generated + */ + public WrappingLabel getHeaderSingleExecution() { + return fHeaderSingleExecution; + } + + /** + * @generated + */ + public RectangleFigure getCompartmentFigure() { + return fCompartmentFigure; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java index 79200705816..1fcc2c82b53 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java @@ -1,64 +1,48 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * Arthur Daussy - 372745: [ActivityDiagram] Major refactoring group framework - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.figures; - -import java.util.Collections; -import java.util.List; - -import org.eclipse.draw2d.Graphics; -import org.eclipse.draw2d.LineBorder; -import org.eclipse.draw2d.RectangleFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure; - -/** - * Figure an activity partition - */ -public class ActivityPartitionFigure extends CompartmentFigure { - - /** - * TODO set those to constants into preference store - */ - private static final int TRANSPARENCY = 50; - - private static final int APLPHA = 50; - - private static final String ACTIVITY_CONTENT_COMPARTMENT = "ActivityContentCompartment"; - - public ActivityPartitionFigure(List compartmentFigure) { - super(compartmentFigure); - } - - public ActivityPartitionFigure() { - super(Collections.singletonList(ACTIVITY_CONTENT_COMPARTMENT)); - this.setOpaque(false); - getActivityPartitionCompartment().setOpaque(false); - getActivityPartitionCompartment().setBorder(new LineBorder()); - } - - @Override - public void paintFigure(Graphics graphics) { - setTransparency(TRANSPARENCY); - graphics.setAlpha(APLPHA); - super.paintFigure(graphics); - } - - public RectangleFigure getActivityPartitionCompartment() { - return getCompartment(ACTIVITY_CONTENT_COMPARTMENT); - } - - public WrappingLabel getPartitionLabel() { - return getNameLabel(); - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * Arthur Daussy - 372745: [ActivityDiagram] Major refactoring group framework + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.figures; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.gmf.runtime.draw2d.ui.figures.OneLineBorder; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; + +/** + * Figure an activity partition + */ +public class ActivityPartitionFigure extends RoundedCompartmentFigure { + + private static final String ACTIVITY_CONTENT_COMPARTMENT = "ActivityContentCompartment"; + + public ActivityPartitionFigure(List compartmentFigure) { + super(compartmentFigure); + } + + public ActivityPartitionFigure() { + super(Collections.singletonList(ACTIVITY_CONTENT_COMPARTMENT)); + getActivityPartitionCompartment().setBorder(new OneLineBorder(1, PositionConstants.TOP)); + } + + public RectangleFigure getActivityPartitionCompartment() { + return getCompartment(ACTIVITY_CONTENT_COMPARTMENT); + } + + public WrappingLabel getPartitionLabel() { + return getNameLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java index 113faed5b7a..28a62ac64d6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java @@ -1,59 +1,59 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.figures; - -import org.eclipse.draw2d.Graphics; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.common.Activator; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.swt.graphics.Image; - -/** - * this is a specific figure to display the rake of this action - * - */ -public class CallBehaviorActionFigure extends PapyrusRoundedNodeFigure { - - protected static final String IMAGE_PATH = "/icons/obj16/rake.gif"; - - protected static final int margin = 5; - - protected boolean isDisplayedRake = false; - - /** - * set true to display the rake - * - * @param displayRake - * true to display the rake - */ - public void displayRake(boolean displayRake) { - this.isDisplayedRake = displayRake; - } - - @Override - public void paint(Graphics graphics) { - // TODO Auto-generated method stub - super.paint(graphics); - if (isDisplayedRake) { - Activator.getDefault(); - Image image = Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, IMAGE_PATH); - org.eclipse.draw2d.geometry.Rectangle rect = getBounds(); - Point pt = rect.getBottomRight(); - pt.x = pt.x - image.getBounds().width - margin; - pt.y = pt.y - image.getBounds().height - margin; - graphics.drawImage(image, pt); - } - } -} +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.figures; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.common.Activator; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.swt.graphics.Image; + +/** + * this is a specific figure to display the rake of this action + * + */ +public class CallBehaviorActionFigure extends RoundedCompartmentFigure { + + protected static final String IMAGE_PATH = "/icons/obj16/rake.gif"; + + protected static final int margin = 5; + + protected boolean isDisplayedRake = false; + + /** + * set true to display the rake + * + * @param displayRake + * true to display the rake + */ + public void displayRake(boolean displayRake) { + this.isDisplayedRake = displayRake; + } + + @Override + public void paint(Graphics graphics) { + // TODO Auto-generated method stub + super.paint(graphics); + if (isDisplayedRake) { + Activator.getDefault(); + Image image = Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, IMAGE_PATH); + org.eclipse.draw2d.geometry.Rectangle rect = getBounds(); + Point pt = rect.getBottomRight(); + pt.x = pt.x - image.getBounds().width - margin; + pt.y = pt.y - image.getBounds().height - margin; + graphics.drawImage(image, pt); + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java index 633bb9040ad..1e0e55796e6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java @@ -1,125 +1,368 @@ -/***************************************************************************** - * Copyright (c) 2010, 2014 Atos Origin, CEA, and others. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * Christian W. Damus (CEA) - bug 392301 - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.figures; - -import org.eclipse.draw2d.Graphics; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.Label; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; -import org.eclipse.gmf.runtime.notation.GradientStyle; -import org.eclipse.papyrus.uml.diagram.common.draw2d.RoundedRectangleDashedBorder; -import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedRectangleDashedShadowBorder; -import org.eclipse.swt.graphics.Image; - -/** - * This figure handles a rounded dashed rectangle Papyrus node, with no - * displayed label. - * - * @author vhemery - */ -public class InterruptibleActivityRegionFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure, IFigure { - - /** the size of the rounded corner */ - private static int ROUNDED_CORNER_SIZE = 8; - - /** the size of the rounded corner */ - private static int BORDER_SIZE = 3; - - /** - * Default Constructor. - */ - public InterruptibleActivityRegionFigure() { - shadowborder = new RoundedRectangleDashedShadowBorder(BORDER_SIZE, getForegroundColor(), ROUNDED_CORNER_SIZE, ROUNDED_CORNER_SIZE); - setBorder(shadowborder); - } - - /** - * Paint figure. - * - * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#paintFigure(org.eclipse.draw2d.Graphics) - * @param graphics - * the graphics - */ - @Override - public void paintFigure(Graphics graphics) { - paintBackground(graphics, getBounds()); - shadowborder.setColor(getForegroundColor()); - } - - /** - * Paint the background of the figure. If this figure uses gradient, then it - * will paint the background with the gradient informations. Otherwise it - * will use the background color. - * - * @param graphics - * the graphics - * @param rectangle - * the rectangle where the background needs to be fill. - */ - @Override - protected void paintBackground(Graphics graphics, Rectangle rectangle) { - if (isUsingGradient()) { - applyTransparency(graphics); - boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false; - graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); - graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); - graphics.fillGradient(rectangle, isVertical); - } else { - graphics.setBackgroundColor(getBackgroundColor()); - graphics.setForegroundColor(getForegroundColor()); - // let the figure unfilled to see behind it - // graphics.fillRectangle(rectangle); - } - } - - /** - * set the shadow - * - * @param shadow - * a boolean true if we want to display the shadow - */ - @Override - public void setShadow(boolean shadow) { - super.setShadow(shadow); - if (!shadow) { - RoundedRectangleDashedBorder bord = new RoundedRectangleDashedBorder(ROUNDED_CORNER_SIZE, ROUNDED_CORNER_SIZE); - this.setBorder(bord); - } - } - - @Override - public void setStereotypeDisplay(String stereotypes, Image image) { - // TODO Auto-generated method stub - } - - @Override - public void setStereotypePropertiesInBrace(String stereotypeProperties) { - // TODO Auto-generated method stub - } - - @Override - public void setStereotypePropertiesInCompartment(String stereotypeProperties) { - // TODO Auto-generated method stub - } - - @Override - public Label getStereotypesLabel() { - // TODO Auto-generated method stub - return null; - } -} +/***************************************************************************** + * Copyright (c) 2010, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.activity.figures; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Insets; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; +import org.eclipse.gmf.runtime.notation.GradientStyle; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleShadowBorder; +import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager; +import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.SubCompartmentLayoutManager; +import org.eclipse.swt.graphics.Image; + +/** + * This figure handles a rounded dashed rectangle Papyrus node, with no + * displayed label. + * + * @author madam + */ +public class InterruptibleActivityRegionFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure, IFigure, IRoundedRectangleFigure { + + /** The container figures. */ + private Map containerFigures; + + /** The corner dimension. */ + private Dimension cornerDimension = new Dimension(); + + /** The is oval. */ + private boolean isOval; + + /** The is label constrained. */ + private boolean isLabelConstrained; + + private Dimension floatingNameOffset = new Dimension(); + + private int borderStyle = Graphics.LINE_SOLID; + + /** + * @param borderStyle + * the borderStyle to set + */ + public void setBorderStyle(int borderStyle) { + this.borderStyle = borderStyle; + if (shadowborder != null) { + shadowborder.setStyle(borderStyle); + } + } + + /** + * Instantiates a new rounded compartment figure. + */ + public InterruptibleActivityRegionFigure() { + this(null, null); + } + + /** + * Constructor. + * + * @param compartmentFigure + * the compartment figure + */ + public InterruptibleActivityRegionFigure(List compartmentFigure) { + this(compartmentFigure, null); + } + + /** + * Constructor with a tagged value. + * + * @param compartmentFigure + * a list of id for the compartment figure + * @param taggedLabelValue + * the value to display as tagged value + */ + public InterruptibleActivityRegionFigure(List compartmentFigure, String taggedLabelValue) { + super(); + setOpaque(false); + shadowborder = new RoundedRectangleShadowBorder(getForegroundColor(), cornerDimension); + + if (compartmentFigure != null) { + setLayoutManager(new AutomaticCompartmentLayoutManager()); + createContentPane(compartmentFigure); + } + } + + /** + * Creates the content pane. + * + * @param compartmentFigure + * the compartment figure + */ + protected void createContentPane(List compartmentFigure) { + containerFigures = new HashMap(); + for (String id : compartmentFigure) { + RectangleFigure newFigure = new RectangleFigure(); + newFigure.setLayoutManager(new SubCompartmentLayoutManager()); + // to debug graphically: newFigure.setFill(true); + newFigure.setFill(false); + newFigure.setBorder(null); + newFigure.setOutline(false); + newFigure.setOpaque(false); + this.add(newFigure); + containerFigures.put(id, newFigure); + } + } + + /** + * Get the RectangleFigure containing the wanted compartment. + * + * @param id + * the id to find the right compartment + * @return the RectangleFigure + */ + public RectangleFigure getCompartment(String id) { + return containerFigures.get(id); + } + + /** + * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getCornerDimensions() + * + * @return + */ + @Override + public Dimension getCornerDimensions() { + return cornerDimension; + } + + /** + * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getRoundedRectangleBounds() + * + * @return + */ + @Override + public Rectangle getRoundedRectangleBounds() { + return getBounds(); + } + + /** + * {@inheritDoc} + */ + @Override + public void paintFigure(Graphics graphics) { + shadowborder.setColor(getForegroundColor()); + graphics.pushState(); + Rectangle rectangle = getBounds().getCopy(); + // Set the corner dimension if is oval in case of resizing + if (isOval) { + cornerDimension.width = rectangle.width; + cornerDimension.height = rectangle.height; + } + // paintBackground: + applyTransparency(graphics); + if (isUsingGradient()) { + boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false; + if (isVertical && rectangle.height > ((3 * cornerDimension.height) / 2)) { + Rectangle upperBounds = getBounds().getCopy(); + upperBounds.height = cornerDimension.height - getLineWidth() / 2; + upperBounds.y += getLineWidth() / 2; + Rectangle upperClip = upperBounds.getCopy().shrink(new Insets(0, 0, cornerDimension.height / 2, 0)); + Rectangle lowerBounds = getBounds().getCopy(); + lowerBounds.y = lowerBounds.bottom() - cornerDimension.height; + lowerBounds.height = cornerDimension.height - getLineWidth() / 2; + Rectangle lowerClip = lowerBounds.getCopy().shrink(new Insets(cornerDimension.height / 2, 0, 0, 0)); + Rectangle innerBounds = getBounds().getCopy(); + innerBounds.y = upperClip.bottom(); + innerBounds.height = lowerClip.y - upperClip.bottom() + 1; + // fill the upper part + graphics.pushState(); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + graphics.clipRect(upperClip); + graphics.fillRoundRectangle(upperBounds, cornerDimension.width, cornerDimension.height); + graphics.popState(); + // fill the inner part + graphics.pushState(); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.fillGradient(innerBounds, true); + graphics.popState(); + // fill the lower part + graphics.pushState(); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.clipRect(lowerClip); + graphics.fillRoundRectangle(lowerBounds, cornerDimension.width, cornerDimension.height); + graphics.popState(); + } else if (!isVertical && rectangle.width > ((3 * cornerDimension.width) / 2)) { + Rectangle leftBounds = getBounds().getCopy(); + leftBounds.width = cornerDimension.width - getLineWidth() / 2; + leftBounds.x += getLineWidth() / 2; + Rectangle leftClip = leftBounds.getCopy().shrink(new Insets(0, 0, 0, cornerDimension.width / 2)); + Rectangle rightBounds = getBounds().getCopy(); + rightBounds.x = rightBounds.right() - cornerDimension.width; + rightBounds.width = cornerDimension.width - getLineWidth() / 2; + Rectangle rightClip = rightBounds.getCopy().shrink(new Insets(0, cornerDimension.width / 2, 0, 0)); + Rectangle innerBounds = getBounds().getCopy(); + innerBounds.x = leftClip.right();// - getLineWidth(); + innerBounds.width = rightClip.x - leftClip.right() + 1;// + 2 * getLineWidth(); + // fill the left part + graphics.pushState(); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + graphics.clipRect(leftClip); + graphics.fillRoundRectangle(leftBounds, cornerDimension.width, cornerDimension.height); + graphics.popState(); + // fill the inner part + graphics.pushState(); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + graphics.fillGradient(innerBounds, false); + graphics.popState(); + // fill the right part + graphics.pushState(); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.clipRect(rightClip); + graphics.fillRoundRectangle(rightBounds, cornerDimension.width, cornerDimension.height); + graphics.popState(); + } else { + graphics.pushState(); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + graphics.fillRoundRectangle(rectangle, cornerDimension.width, cornerDimension.height); + graphics.popState(); + } + } else { + graphics.pushState(); + graphics.setBackgroundColor(getBackgroundColor()); + graphics.setForegroundColor(getForegroundColor()); + graphics.fillRoundRectangle(rectangle, cornerDimension.width, cornerDimension.height); + graphics.popState(); + } + graphics.popState(); + // Force to repaint the border thought setShadow() + setShadow(isShadow()); + repaint(); + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#setShadow(boolean) + * + * @param shadow + */ + @Override + public void setShadow(boolean shadow) { + super.setShadow(shadow); + if (!shadow) { + // If shadow is set to false on CSS file we set the border + if (getBorder() != null) { + RoundedRectangleBorder border = new RoundedRectangleBorder(cornerDimension.width, cornerDimension.height); + border.setWidth(getLineWidth()); + border.setStyle(borderStyle); + this.setBorder(border); + } + } + } + + /** + * Sets the corner dimension. + * + * @param cornerDimension + * the new corner dimension + */ + @Override + public void setCornerDimensions(Dimension cornerDimension) { + this.cornerDimension = cornerDimension; + } + + @Override + public void setOval(boolean booleanValue) { + isOval = booleanValue; + if (booleanValue) { + Rectangle rectangle = getBounds().getCopy(); + cornerDimension.width = rectangle.width; + cornerDimension.height = rectangle.height; + } + } + + @Override + public boolean isOval() { + return isOval; + } + + @Override + public void setFloatingNameConstrained(boolean booleanValue) { + isLabelConstrained = booleanValue; + } + + @Override + public boolean isFloatingNameConstrained() { + return isLabelConstrained; + } + + @Override + public void setFloatingNameOffset(Dimension offset) { + this.floatingNameOffset = offset; + + } + + @Override + public Dimension getFloatingNameOffset() { + return floatingNameOffset; + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image) + * + * @param stereotypes + * @param image + */ + @Override + public void setStereotypeDisplay(String stereotypes, Image image) { + // TODO Auto-generated method stub + + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure#setStereotypePropertiesInBrace(java.lang.String) + * + * @param stereotypeProperties + */ + @Override + public void setStereotypePropertiesInBrace(String stereotypeProperties) { + // TODO Auto-generated method stub + + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure#setStereotypePropertiesInCompartment(java.lang.String) + * + * @param stereotypeProperties + */ + @Override + public void setStereotypePropertiesInCompartment(String stereotypeProperties) { + // TODO Auto-generated method stub + + } + + /** + * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure#getStereotypesLabel() + * + * @return + */ + @Override + public Label getStereotypesLabel() { + // TODO Auto-generated method stub + return null; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen index 5aa284933f9..5e858dc842f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen @@ -1,5180 +1,18329 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - - - - - - - - + + + + + + + + + + - - + + - - - - - - + + + + + + - + - - - - + + + + - - + + - - - - - - + + + + + + - - + + - - - - + + + + - - + + - - - - - - + + + + + + - - + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + + + + + + + - - - - - + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - + + - - - - + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - + + + + - - + + - - - - + + + + - + - - - - + + + + - - + + - - - - + + + + - - + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - + + + + - - + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - - - - - + + + + + + + - - - - + + + + - + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - + + + - - + + - - - - - + + + + + - + org.eclipse.draw2d org.eclipse.papyrus.uml.diagram.common org.eclipse.gmf.runtime.draw2d.ui - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + org.eclipse.gmf.runtime.notation.View org.eclipse.gef.EditPart abstractNavigatorItem - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml index ba5ea39ced4..ba484664442 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml @@ -1,20 +1,20 @@ - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - + @@ -168,18 +168,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -204,7 +204,7 @@ - + @@ -1360,7 +1360,7 @@ - + @@ -1528,19 +1528,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -1717,8 +1717,8 @@ name="validateNotUnique" mode="Batch" severity="ERROR" statusCode="200"> - @@ -1729,9 +1729,9 @@ true name="validateSelectionBehavior" mode="Batch" severity="ERROR" statusCode="200"> - @@ -1742,7 +1742,7 @@ true name="validateObjectFlowEdges" mode="Batch" severity="ERROR" statusCode="200"> - @@ -1791,7 +1791,7 @@ true name="validateOneOutputPin" mode="Batch" severity="ERROR" statusCode="200"> - size() = 1]]> @@ -1802,7 +1802,7 @@ self.fromAction.output->size() = 1]]> name="validateInputPin" mode="Batch" severity="ERROR" statusCode="200"> - forAll(oclIsKindOf(ActionInputPin))]]> @@ -1813,9 +1813,9 @@ self.fromAction.input->forAll(oclIsKindOf(ActionInputPin))]]> name="validateNoControlOrDataFlow" mode="Batch" severity="ERROR" statusCode="200"> - isEmpty() and self.fromAction.outgoing->isEmpty() -and self.fromAction.input->forAll(incoming->isEmpty() and outgoing->isEmpty()) + isEmpty() and self.fromAction.outgoing->isEmpty() +and self.fromAction.input->forAll(incoming->isEmpty() and outgoing->isEmpty()) and self.fromAction.output->forAll(incoming->isEmpty() and outgoing->isEmpty()))]]> @@ -1872,7 +1872,7 @@ and self.fromAction.output->forAll(incoming->isEmpty() and outgoing->isEmpty())) name="validateOwned" mode="Batch" severity="ERROR" statusCode="200"> - @@ -1883,7 +1883,7 @@ or self.owner.oclIsKindOf(ActivityGroup)]]> name="validateStructuredNode" mode="Batch" severity="ERROR" statusCode="200"> - @@ -1894,8 +1894,8 @@ or self.owner.oclIsKindOf(ActivityGroup)]]> name="validateHasSourceAndTarget" mode="Batch" severity="ERROR" statusCode="200"> - @@ -1918,7 +1918,7 @@ not self.source.oclIsUndefined() and not self.target.oclIsUndefined()]]> name="validateNoActions" mode="Batch" severity="ERROR" statusCode="200"> - @@ -2001,13 +2001,13 @@ and (self.target.oclIsUndefined() or not self.target.oclIsKindOf(Action))]]> name="validateObjectNodes" mode="Batch" severity="ERROR" statusCode="200"> - @@ -2020,8 +2020,8 @@ and (self.target.oclIsUndefined() or not self.target.oclIsKindOf(Action))]]> name="validateIncomingOutgoingEdges" mode="Batch" severity="ERROR" statusCode="200"> - size() > 0 and -self.incoming->size() > 0 and + size() > 0 and +self.incoming->size() > 0 and self.incoming->size() <= 2]]> @@ -2032,9 +2032,9 @@ self.incoming->size() <= 2]]> name="validateEdges" mode="Batch" severity="ERROR" statusCode="200"> - reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ObjectFlow)) and - self.outgoing->forAll(oclIsKindOf(ObjectFlow)) ) or -(self.incoming->reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ControlFlow)) and + reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ObjectFlow)) and + self.outgoing->forAll(oclIsKindOf(ObjectFlow)) ) or +(self.incoming->reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ControlFlow)) and self.outgoing->forAll(oclIsKindOf(ControlFlow)) )]]> @@ -2045,7 +2045,7 @@ self.incoming->size() <= 2]]> name="validateDecisionInputFlowIncoming" mode="Batch" severity="ERROR" statusCode="200"> - includes(self.decisionInputFlow)]]> @@ -2056,12 +2056,12 @@ self.incoming->includes(self.decisionInputFlow)]]> name="validateParameters" mode="Batch" severity="ERROR" statusCode="200"> - select( - direction = ParameterDirectionKind::out or - direction = ParameterDirectionKind::inout)->size() = 0 -and self.decisionInput.ownedParameter->select( - direction = ParameterDirectionKind::return)->size() = 1 + select( + direction = ParameterDirectionKind::out or + direction = ParameterDirectionKind::inout)->size() = 0 +and self.decisionInput.ownedParameter->select( + direction = ParameterDirectionKind::return)->size() = 1 )]]> @@ -2072,12 +2072,12 @@ and self.decisionInput.ownedParameter->select( name="validateZeroInputParameters" mode="Batch" severity="ERROR" statusCode="200"> - select(i | i.oclIsKindOf(ControlFlow))->size() = 1 - ) implies - self.decisionInput.ownedParameter->select( - direction = ParameterDirectionKind::_in)->size() = 0 + select(i | i.oclIsKindOf(ControlFlow))->size() = 1 + ) implies + self.decisionInput.ownedParameter->select( + direction = ParameterDirectionKind::_in)->size() = 0 )]]> @@ -2130,9 +2130,9 @@ and self.decisionInput.ownedParameter->select( name="validateEdges" mode="Batch" severity="ERROR" statusCode="200"> - exists(e | e.oclIsKindOf(ObjectFlow)) implies - self.incoming->forAll(e | e.oclIsKindOf(ObjectFlow))) and -(self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)) implies + exists(e | e.oclIsKindOf(ObjectFlow)) implies + self.incoming->forAll(e | e.oclIsKindOf(ObjectFlow))) and +(self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)) implies self.incoming->forAll(e | e.oclIsKindOf(ControlFlow)))]]> @@ -2155,9 +2155,9 @@ and self.decisionInput.ownedParameter->select( name="validateEdges" mode="Batch" severity="ERROR" statusCode="200"> - exists(e | e.oclIsKindOf(ObjectFlow)) implies - self.outgoing->forAll(e | e.oclIsKindOf(ObjectFlow))) and -(self.incoming->exists(e | e.oclIsKindOf(ControlFlow)) implies + exists(e | e.oclIsKindOf(ObjectFlow)) implies + self.outgoing->forAll(e | e.oclIsKindOf(ObjectFlow))) and +(self.incoming->exists(e | e.oclIsKindOf(ControlFlow)) implies self.outgoing->forAll(e | e.oclIsKindOf(ControlFlow)))]]> @@ -2180,9 +2180,9 @@ and self.decisionInput.ownedParameter->select( name="validateIncomingObjectFlow" mode="Batch" severity="ERROR" statusCode="200"> - select(e | e.oclIsKindOf(ObjectFlow))->notEmpty() implies - self.outgoing->exists(e | e.oclIsKindOf(ObjectFlow))) and -(self.incoming->select(e | e.oclIsKindOf(ObjectFlow))->isEmpty() implies + select(e | e.oclIsKindOf(ObjectFlow))->notEmpty() implies + self.outgoing->exists(e | e.oclIsKindOf(ObjectFlow))) and +(self.incoming->select(e | e.oclIsKindOf(ObjectFlow))->isEmpty() implies self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)))]]> @@ -2195,7 +2195,7 @@ and self.decisionInput.ownedParameter->select( name="validateIncomingOrOutgoing" mode="Batch" severity="ERROR" statusCode="200"> - notEmpty() implies self.outgoing->isEmpty()) and + notEmpty() implies self.outgoing->isEmpty()) and (self.outgoing->notEmpty() implies self.incoming->isEmpty())]]> @@ -2306,7 +2306,7 @@ and self.decisionInput.ownedParameter->select( name="validateValideTypeOwningFeature" mode="Batch" severity="ERROR" statusCode="200"> - includes(self.object.type) or + includes(self.object.type) or self.structuralFeature.oclAsType(Property).opposite.type = self.object.type]]> @@ -2525,1543 +2525,1543 @@ self.structuralFeature.oclAsType(Property).opposite.type = self.object.type]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Activity parameter node must be synchronized with its parameter. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Activity parameter node must be synchronized with its parameter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java index 6e8043a5c2d..3552c38f110 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java @@ -1,483 +1,483 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.editpolicies.RootComponentEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizeActivityEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure; -import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ActivityEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 2001; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ActivityEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy()); - installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizeActivityEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ActivityParameterNodeEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new ActivityFigure(); - } - - /** - * @generated - */ - @Override - public ActivityFigure getPrimaryShape() { - return (ActivityFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ActivityNameEditPart) { - ((ActivityNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof ActivityIsSingleExecutionEditPart) { - ((ActivityIsSingleExecutionEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution()); - return true; - } - if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) { - IFigure pane = getPrimaryShape().getParameterFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPreconditionFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPostconditionFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getContentFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity - if (childEditPart instanceof ActivityParameterNodeEditPart) { - IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ActivityNameEditPart) { - return true; - } - if (childEditPart instanceof ActivityIsSingleExecutionEditPart) { - return true; - } - if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) { - IFigure pane = getPrimaryShape().getParameterFigure(); - pane.remove(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPreconditionFigure(); - pane.remove(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPostconditionFigure(); - pane.remove(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getContentFigure(); - pane.remove(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityParameterNodeEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof ActivityActivityParametersCompartmentEditPart) { - return getPrimaryShape().getParameterFigure(); - } - if (editPart instanceof ActivityActivityPreConditionsCompartmentEditPart) { - return getPrimaryShape().getPreconditionFigure(); - } - if (editPart instanceof ActivityActivityPostConditionsCompartmentEditPart) { - return getPrimaryShape().getPostconditionFigure(); - } - if (editPart instanceof ActivityActivityContentCompartmentEditPart) { - return getPrimaryShape().getContentFigure(); - } - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "Activity"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - if (request instanceof CreateViewAndElementRequest) { - CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter(); - IElementType type = (IElementType) adapter.getAdapter(IElementType.class); - if (type == UMLElementTypes.Parameter_3001) { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID)); - } - if (type == UMLElementTypes.Constraint_3002) { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID)); - } - if (type == UMLElementTypes.Constraint_3003) { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID)); - } - } - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.editpolicies.RootComponentEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizeActivityEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure; +import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ActivityEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 2001; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ActivityEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy()); + installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizeActivityEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ActivityParameterNodeEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new ActivityFigure(); + } + + /** + * @generated + */ + @Override + public ActivityFigure getPrimaryShape() { + return (ActivityFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ActivityNameEditPart) { + ((ActivityNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof ActivityIsSingleExecutionEditPart) { + ((ActivityIsSingleExecutionEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution()); + return true; + } + if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) { + IFigure pane = getPrimaryShape().getParameterFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPreconditionFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPostconditionFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getContentFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity + if (childEditPart instanceof ActivityParameterNodeEditPart) { + IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ActivityNameEditPart) { + return true; + } + if (childEditPart instanceof ActivityIsSingleExecutionEditPart) { + return true; + } + if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) { + IFigure pane = getPrimaryShape().getParameterFigure(); + pane.remove(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPreconditionFigure(); + pane.remove(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPostconditionFigure(); + pane.remove(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getContentFigure(); + pane.remove(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityParameterNodeEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof ActivityActivityParametersCompartmentEditPart) { + return getPrimaryShape().getParameterFigure(); + } + if (editPart instanceof ActivityActivityPreConditionsCompartmentEditPart) { + return getPrimaryShape().getPreconditionFigure(); + } + if (editPart instanceof ActivityActivityPostConditionsCompartmentEditPart) { + return getPrimaryShape().getPostconditionFigure(); + } + if (editPart instanceof ActivityActivityContentCompartmentEditPart) { + return getPrimaryShape().getContentFigure(); + } + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "Activity"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public EditPart getTargetEditPart(Request request) { + if (request instanceof CreateViewAndElementRequest) { + CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter(); + IElementType type = (IElementType) adapter.getAdapter(IElementType.class); + if (type == UMLElementTypes.Parameter_3001) { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID)); + } + if (type == UMLElementTypes.Constraint_3002) { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID)); + } + if (type == UMLElementTypes.Constraint_3003) { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID)); + } + } + return super.getTargetEditPart(request); + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java index b5efac4d378..b1dc3aa99d8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java @@ -1,475 +1,475 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicyCN; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure; -import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ActivityEditPartCN extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3083; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ActivityEditPartCN(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicyCN()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicyCN()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ActivityParameterNodeEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new ActivityFigure(); - } - - /** - * @generated - */ - @Override - public ActivityFigure getPrimaryShape() { - return (ActivityFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ActivityNameEditPartCN) { - ((ActivityNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) { - ((ActivityIsSingleExecutionCNEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution()); - return true; - } - if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) { - IFigure pane = getPrimaryShape().getParameterFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPreconditionFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPostconditionFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityCNContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getContentFigure(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity - if (childEditPart instanceof ActivityParameterNodeEditPart) { - IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ActivityNameEditPartCN) { - return true; - } - if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) { - return true; - } - if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) { - IFigure pane = getPrimaryShape().getParameterFigure(); - pane.remove(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPreconditionFigure(); - pane.remove(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) { - IFigure pane = getPrimaryShape().getPostconditionFigure(); - pane.remove(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityCNContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getContentFigure(); - pane.remove(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActivityParameterNodeEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof ActivityCNParametersCompartmentEditPart) { - return getPrimaryShape().getParameterFigure(); - } - if (editPart instanceof ActivityCNPreConditionsCompartmentEditPart) { - return getPrimaryShape().getPreconditionFigure(); - } - if (editPart instanceof ActivityCNPostConditionsCompartmentEditPart) { - return getPrimaryShape().getPostconditionFigure(); - } - if (editPart instanceof ActivityCNContentCompartmentEditPart) { - return getPrimaryShape().getContentFigure(); - } - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "Activity"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - if (request instanceof CreateViewAndElementRequest) { - CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter(); - IElementType type = (IElementType) adapter.getAdapter(IElementType.class); - if (type == UMLElementTypes.Parameter_3001) { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID)); - } - if (type == UMLElementTypes.Constraint_3002) { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID)); - } - if (type == UMLElementTypes.Constraint_3003) { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID)); - } - } - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicyCN; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure; +import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ActivityEditPartCN extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3083; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ActivityEditPartCN(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicyCN()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicyCN()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ActivityParameterNodeEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new ActivityFigure(); + } + + /** + * @generated + */ + @Override + public ActivityFigure getPrimaryShape() { + return (ActivityFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ActivityNameEditPartCN) { + ((ActivityNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) { + ((ActivityIsSingleExecutionCNEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution()); + return true; + } + if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) { + IFigure pane = getPrimaryShape().getParameterFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPreconditionFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPostconditionFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityCNContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getContentFigure(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity + if (childEditPart instanceof ActivityParameterNodeEditPart) { + IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ActivityNameEditPartCN) { + return true; + } + if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) { + return true; + } + if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) { + IFigure pane = getPrimaryShape().getParameterFigure(); + pane.remove(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPreconditionFigure(); + pane.remove(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) { + IFigure pane = getPrimaryShape().getPostconditionFigure(); + pane.remove(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityCNContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getContentFigure(); + pane.remove(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActivityParameterNodeEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof ActivityCNParametersCompartmentEditPart) { + return getPrimaryShape().getParameterFigure(); + } + if (editPart instanceof ActivityCNPreConditionsCompartmentEditPart) { + return getPrimaryShape().getPreconditionFigure(); + } + if (editPart instanceof ActivityCNPostConditionsCompartmentEditPart) { + return getPrimaryShape().getPostconditionFigure(); + } + if (editPart instanceof ActivityCNContentCompartmentEditPart) { + return getPrimaryShape().getContentFigure(); + } + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "Activity"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public EditPart getTargetEditPart(Request request) { + if (request instanceof CreateViewAndElementRequest) { + CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter(); + IElementType type = (IElementType) adapter.getAdapter(IElementType.class); + if (type == UMLElementTypes.Parameter_3001) { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID)); + } + if (type == UMLElementTypes.Constraint_3002) { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID)); + } + if (type == UMLElementTypes.Constraint_3003) { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID)); + } + } + return super.getTargetEditPart(request); + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java index 2764f52743a..0175822c642 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java @@ -1,1298 +1,1289 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.GridData; -import org.eclipse.draw2d.GridLayout; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.Label; -import org.eclipse.draw2d.RectangleFigure; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.BorderNamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure; -import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.papyrus.uml.diagram.common.helper.StereotypeFigureHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Image; - -/** - * @generated NOT implements IPapyrusEditPart - */ -public class ActivityParameterNodeEditPart extends BorderNamedElementEditPart implements IPapyrusEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3059; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ActivityParameterNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy()); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityParameterNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, new PinLayoutEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new NodeNamedElementFigure(); - } - - /** - * @generated - */ - @Override - public NodeNamedElementFigure getPrimaryShape() { - return (NodeNamedElementFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ParameterNodeNameEditPart) { - ((ParameterNodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ParameterNodeNameEditPart) { - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "ActivityParameterNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - // FIXME: workaround for #154536 - result.getBounds().setSize(result.getPreferredSize()); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createNodeFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } - - /** - * @generated NOT implements IPapyrusNodeUMLElementFigure - */ - public class ActivityParameterNodeDescriptor extends RectangleFigure implements IPapyrusNodeUMLElementFigure { - - /** The helper which handles stereotype aspects */ - private StereotypeFigureHelper stereotypeHelper; - - /** - * @generated NOT use StereotypeFigureHelper - */ - public ActivityParameterNodeDescriptor() { - GridLayout layoutThis = new GridLayout(); - layoutThis.numColumns = 1; - layoutThis.makeColumnsEqualWidth = true; - this.setLayoutManager(layoutThis); - this.setLineWidth(1); - this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(50))); - // use StereotypeFigureHelper - stereotypeHelper = new StereotypeFigureHelper(this) { - - // @Override - // public IMapMode getMapMode() { - // return ActivityParameterNodeEditPart.this.getMapMode(); - // } - @Override - public Object getStereotypeRectangleConstraint() { - GridData constraintStereotypeRect0 = new GridData(); - constraintStereotypeRect0.verticalAlignment = GridData.BEGINNING; - constraintStereotypeRect0.horizontalAlignment = GridData.FILL; - constraintStereotypeRect0.horizontalIndent = 0; - constraintStereotypeRect0.horizontalSpan = 1; - constraintStereotypeRect0.verticalSpan = 1; - constraintStereotypeRect0.grabExcessHorizontalSpace = false; - constraintStereotypeRect0.grabExcessVerticalSpace = false; - return constraintStereotypeRect0; - } - }; - } - - /** - * Refresh the layout of the figure - */ - protected void refreshLayout() { - } - - /** - * Sets the stereotypes for this figure. - * - * @param stereotypes - * the string representing the stereotypes to be displayed - * @param image - * the image representing the stereotypes to be displayed - * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image) - */ - @Override - public void setStereotypeDisplay(String stereotypes, Image image) { - stereotypeHelper.setStereotypeDisplay(stereotypes, image); - refreshLayout(); - } - - /** - * Sets the stereotypes properties for this figure. - * - * @param stereotypeProperties - * the string representing the stereotype properties to be displayed - */ - @Override - public void setStereotypePropertiesInBrace(String stereotypeProperties) { - stereotypeHelper.setStereotypePropertiesInBrace(stereotypeProperties); - refreshLayout(); - } - - /** - * displays the new string corresponding to the list of stereotypes. - * - * @param stereotypeProperties - * the string to be displayed. - */ - @Override - public void setStereotypePropertiesInCompartment(String stereotypeProperties) { - stereotypeHelper.setStereotypePropertiesInCompartment(stereotypeProperties); - refreshLayout(); - } - - /** - * Gets the stereotype label. - * - * @return the stereotype label - * @unused - * @deprecated - */ - @Deprecated - @Override - public Label getStereotypesLabel() { - return null;// fActionStereotypeLabel; - } - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ActivityParameterNodeEditPart extends RoundedBorderNamedElementEditPart { // BorderNamedElementEditPart RoundedCompartmentEditPart + + /** + * @generated + */ + public static final int VISUAL_ID = 3059; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ActivityParameterNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy()); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityParameterNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, new PinLayoutEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ParameterNodeNameEditPart) { + ((ParameterNodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ParameterNodeNameEditPart) { + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "ActivityParameterNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + // FIXME: workaround for #154536 + result.getBounds().setSize(result.getPreferredSize()); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createNodeFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } + + // /** + // * @generated NOT implements IPapyrusNodeUMLElementFigure + // */ + // public class ActivityParameterNodeDescriptor extends RectangleFigure implements IPapyrusNodeUMLElementFigure { + // + // /** The helper which handles stereotype aspects */ + // private StereotypeFigureHelper stereotypeHelper; + // + // /** + // * @generated NOT use StereotypeFigureHelper + // */ + // public ActivityParameterNodeDescriptor() { + // GridLayout layoutThis = new GridLayout(); + // layoutThis.numColumns = 1; + // layoutThis.makeColumnsEqualWidth = true; + // this.setLayoutManager(layoutThis); + // this.setLineWidth(1); + // this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(50))); + // // use StereotypeFigureHelper + // stereotypeHelper = new StereotypeFigureHelper(this) { + // + // // @Override + // // public IMapMode getMapMode() { + // // return ActivityParameterNodeEditPart.this.getMapMode(); + // // } + // @Override + // public Object getStereotypeRectangleConstraint() { + // GridData constraintStereotypeRect0 = new GridData(); + // constraintStereotypeRect0.verticalAlignment = GridData.BEGINNING; + // constraintStereotypeRect0.horizontalAlignment = GridData.FILL; + // constraintStereotypeRect0.horizontalIndent = 0; + // constraintStereotypeRect0.horizontalSpan = 1; + // constraintStereotypeRect0.verticalSpan = 1; + // constraintStereotypeRect0.grabExcessHorizontalSpace = false; + // constraintStereotypeRect0.grabExcessVerticalSpace = false; + // return constraintStereotypeRect0; + // } + // }; + // } + // + // /** + // * Refresh the layout of the figure + // */ + // protected void refreshLayout() { + // } + // + // /** + // * Sets the stereotypes for this figure. + // * + // * @param stereotypes + // * the string representing the stereotypes to be displayed + // * @param image + // * the image representing the stereotypes to be displayed + // * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image) + // */ + // @Override + // public void setStereotypeDisplay(String stereotypes, Image image) { + // stereotypeHelper.setStereotypeDisplay(stereotypes, image); + // refreshLayout(); + // } + // + // /** + // * Sets the stereotypes properties for this figure. + // * + // * @param stereotypeProperties + // * the string representing the stereotype properties to be displayed + // */ + // @Override + // public void setStereotypePropertiesInBrace(String stereotypeProperties) { + // stereotypeHelper.setStereotypePropertiesInBrace(stereotypeProperties); + // refreshLayout(); + // } + // + // /** + // * displays the new string corresponding to the list of stereotypes. + // * + // * @param stereotypeProperties + // * the string to be displayed. + // */ + // @Override + // public void setStereotypePropertiesInCompartment(String stereotypeProperties) { + // stereotypeHelper.setStereotypePropertiesInCompartment(stereotypeProperties); + // refreshLayout(); + // } + // + // /** + // * Gets the stereotype label. + // * + // * @return the stereotype label + // * @unused + // * @deprecated + // */ + // @Deprecated + // @Override + // public Label getStereotypesLabel() { + // return null;// fActionStereotypeLabel; + // } + // } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java index 68813859507..a2826643fd4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java @@ -1,384 +1,399 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityPartitionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityPartitionFigure; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ActivityPartitionEditPart extends UMLNodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3067; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ActivityPartitionEditPart(View view) { - super(view); - } - - /** - * Preferences Store - */ - protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityPartitionItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new ActivityPartitionFigure(); - } - - /** - * @generated - */ - @Override - public ActivityPartitionFigure getPrimaryShape() { - return (ActivityPartitionFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ActivityPartitionNameEditPart) { - ((ActivityPartitionNameEditPart) childEditPart).setLabel(getPrimaryShape().getPartitionLabel()); - return true; - } - if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getActivityPartitionCompartment(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ActivityPartitionNameEditPart) { - return true; - } - if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getActivityPartitionCompartment(); - pane.remove(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) { - return getPrimaryShape().getActivityPartitionCompartment(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "ActivityPartition"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createNodeFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityPartitionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityPartitionFigure; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ActivityPartitionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3067; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ActivityPartitionEditPart(View view) { + super(view); + } + + /** + * Preferences Store + */ + protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityPartitionItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + // not generated but change include on gmfgen, can be override at the generation + @Override + protected void handleNotificationEvent(Notification event) { + /* + * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart + * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)! + */ + if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) { + Object notifier = event.getNotifier(); + List modelChildren = ((View) getModel()).getChildren(); + if (!(notifier instanceof Edge)) { + if (modelChildren.contains(event.getNotifier())) { + return; + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new ActivityPartitionFigure(); + } + + /** + * @generated + */ + @Override + public ActivityPartitionFigure getPrimaryShape() { + return (ActivityPartitionFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ActivityPartitionNameEditPart) { + ((ActivityPartitionNameEditPart) childEditPart).setLabel(getPrimaryShape().getPartitionLabel()); + return true; + } + if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getActivityPartitionCompartment(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ActivityPartitionNameEditPart) { + return true; + } + if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getActivityPartitionCompartment(); + pane.remove(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) { + return getPrimaryShape().getActivityPartitionCompartment(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "ActivityPartition"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createNodeFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java index 30dd86cd233..b4450c9d271 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java @@ -1,1561 +1,1563 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.Transaction; -import org.eclipse.emf.transaction.TransactionalCommandStack; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.StructuralFeature; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * @generated - */ -public class AddStructuralFeatureValueActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3091; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public AddStructuralFeatureValueActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddStructuralFeatureValueActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddStructuralFeatureValueActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: - case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: - case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) { - ((AddStructuralFeatureValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) { - return true; - } - if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "AddStructuralFeatureValueAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } - - /** - * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) - * Change automatically the type of the output pin with the type of the classifier - * @param notification - */ - @Override - protected void handleNotificationEvent(Notification notification) { - super.handleNotificationEvent(notification); - Object feature = notification.getFeature(); - if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) { - EObject resolvedElement = this.resolveSemanticElement(); - final Object result = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__RESULT); - final Object object = resolvedElement.eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT); - final Object value = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__VALUE); - Object _feature = notification.getNewValue(); - if (_feature instanceof StructuralFeature) { - org.eclipse.emf.common.command.Command cmdSetResultType = null; - org.eclipse.emf.common.command.Command cmdSetObjectType = null; - org.eclipse.emf.common.command.Command cmdSetValueType = null; - StructuralFeature newFeature = (StructuralFeature) _feature; - Element owner = newFeature.getOwner(); - if (newFeature.getFeaturingClassifiers().contains(owner)) { - cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner); - cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner); - } - Type type = newFeature.getType(); - if (type != null) { - cmdSetValueType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); - } - try { - if (cmdSetResultType != null) { - if (cmdSetResultType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetResultType); - } - } - } - if (cmdSetValueType != null) { - if (cmdSetValueType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetValueType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetValueType); - } - } - } - if (cmdSetObjectType != null) { - if (cmdSetObjectType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetObjectType); - } - } - } - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (RollbackException e) { - e.printStackTrace(); - } - } - } - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.Transaction; +import org.eclipse.emf.transaction.TransactionalCommandStack; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.StructuralFeature; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * @generated + */ +public class AddStructuralFeatureValueActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3091; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public AddStructuralFeatureValueActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddStructuralFeatureValueActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddStructuralFeatureValueActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: + case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: + case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) { + ((AddStructuralFeatureValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) { + return true; + } + if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "AddStructuralFeatureValueAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) + * Change automatically the type of the output pin with the type of the classifier + * @param notification + */ + @Override + protected void handleNotificationEvent(Notification notification) { + super.handleNotificationEvent(notification); + Object feature = notification.getFeature(); + if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) { + EObject resolvedElement = this.resolveSemanticElement(); + final Object result = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__RESULT); + final Object object = resolvedElement.eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT); + final Object value = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__VALUE); + Object _feature = notification.getNewValue(); + if (_feature instanceof StructuralFeature) { + org.eclipse.emf.common.command.Command cmdSetResultType = null; + org.eclipse.emf.common.command.Command cmdSetObjectType = null; + org.eclipse.emf.common.command.Command cmdSetValueType = null; + StructuralFeature newFeature = (StructuralFeature) _feature; + Element owner = newFeature.getOwner(); + if (newFeature.getFeaturingClassifiers().contains(owner)) { + cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner); + cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner); + } + Type type = newFeature.getType(); + if (type != null) { + cmdSetValueType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); + } + try { + if (cmdSetResultType != null) { + if (cmdSetResultType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetResultType); + } + } + } + if (cmdSetValueType != null) { + if (cmdSetValueType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetValueType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetValueType); + } + } + } + if (cmdSetObjectType != null) { + if (cmdSetObjectType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetObjectType); + } + } + } + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (RollbackException e) { + e.printStackTrace(); + } + } + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java new file mode 100644 index 00000000000..ceebeffe0f4 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class AddStructuralFeatureValueActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6019; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public AddStructuralFeatureValueActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java index ea79cdff185..a7d17115425 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java @@ -1,1518 +1,1563 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.Transaction; -import org.eclipse.emf.transaction.TransactionalCommandStack; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.Variable; - -/** - * @generated - */ -public class AddVariableValueActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3099; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public AddVariableValueActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddVariableValueActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddVariableValueActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: - case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof AddVariableValueActionNameEditPart) { - ((AddVariableValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof AddVariableValueActionNameEditPart) { - return true; - } - if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "AddVariableValueAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } - - /** - * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) - * - * @param notification - */ - @Override - protected void handleNotificationEvent(Notification notification) { - super.handleNotificationEvent(notification); - Object feature = notification.getFeature(); - if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) { - final Object value = this.resolveSemanticElement().eGet(UMLPackage.Literals.WRITE_VARIABLE_ACTION__VALUE); - Object _varaible = notification.getNewValue(); - if (_varaible instanceof Variable) { - org.eclipse.emf.common.command.Command cmdSetResultType = null; - Variable newVariable = (Variable) _varaible; - Type type = newVariable.getType(); - if (type != null) { - cmdSetResultType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); - } - try { - if (cmdSetResultType != null) { - if (cmdSetResultType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetResultType); - } - } - } - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (RollbackException e) { - e.printStackTrace(); - } - } - } - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.Transaction; +import org.eclipse.emf.transaction.TransactionalCommandStack; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.GraphicalEditPart; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.handles.MoveHandle; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.Variable; + +/** + * @generated + */ +public class AddVariableValueActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3099; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public AddVariableValueActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddVariableValueActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddVariableValueActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case AddVariableValueActionFloatingNameEditPart.VISUAL_ID: + return new BorderItemSelectionEditPolicy() { + + @Override + protected List createSelectionHandles() { + MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost()); + mh.setBorder(null); + return Collections.singletonList(mh); + } + }; + case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: + case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof AddVariableValueActionNameEditPart) { + ((AddVariableValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof AddVariableValueActionNameEditPart) { + return true; + } + if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "AddVariableValueAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) + * + * @param notification + */ + @Override + protected void handleNotificationEvent(Notification notification) { + super.handleNotificationEvent(notification); + /* + * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart + * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)! + */ + if (NotationPackage.eINSTANCE.getView_Visible().equals(notification.getFeature())) { + Object notifier = notification.getNotifier(); + List modelChildren = ((View) getModel()).getChildren(); + if (!(notifier instanceof Edge)) { + if (modelChildren.contains(notification.getNotifier())) { + return; + } + } + } + Object feature = notification.getFeature(); + if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) { + final Object value = this.resolveSemanticElement().eGet(UMLPackage.Literals.WRITE_VARIABLE_ACTION__VALUE); + Object _varaible = notification.getNewValue(); + if (_varaible instanceof Variable) { + org.eclipse.emf.common.command.Command cmdSetResultType = null; + Variable newVariable = (Variable) _varaible; + Type type = newVariable.getType(); + if (type != null) { + cmdSetResultType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); + } + try { + if (cmdSetResultType != null) { + if (cmdSetResultType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetResultType); + } + } + } + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (RollbackException e) { + e.printStackTrace(); + } + } + } + } + + /** + * @generated + */ + // not generated but change include on gmfgen, can be override at the generation + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof AddVariableValueActionFloatingNameEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java new file mode 100644 index 00000000000..0157ed7a515 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class AddVariableValueActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6018; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(AddVariableValueActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public AddVariableValueActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(AddVariableValueActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java index 818ff46d29e..2547f987c33 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java @@ -1,1458 +1,1492 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class BroadcastSignalActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3102; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public BroadcastSignalActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BroadcastSignalActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new BroadcastSignalActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof BroadcastSignalActionNameEditPart) { - ((BroadcastSignalActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof BroadcastSignalActionNameEditPart) { - return true; - } - if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "BroadcastSignalAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.GraphicalEditPart; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.handles.MoveHandle; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class BroadcastSignalActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3102; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public BroadcastSignalActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BroadcastSignalActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new BroadcastSignalActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case BroadcastSignalActionFloatingNameEditPart.VISUAL_ID: + return new BorderItemSelectionEditPolicy() { + + @Override + protected List createSelectionHandles() { + MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost()); + mh.setBorder(null); + return Collections.singletonList(mh); + } + }; + case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + // not generated but change include on gmfgen, can be override at the generation + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof BroadcastSignalActionFloatingNameEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof BroadcastSignalActionNameEditPart) { + ((BroadcastSignalActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof BroadcastSignalActionNameEditPart) { + return true; + } + if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "BroadcastSignalAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java new file mode 100644 index 00000000000..6c80215cd52 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class BroadcastSignalActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6017; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(BroadcastSignalActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public BroadcastSignalActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(BroadcastSignalActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java index 0e52ab4631c..855827538ac 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java @@ -1,1554 +1,1599 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.uml2.uml.Activity; -import org.eclipse.uml2.uml.CallBehaviorAction; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * @generated - */ -public class CallBehaviorActionEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3008; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public CallBehaviorActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallBehaviorActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallBehaviorActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - // Add/Remove the RakeFigure when an Activity is selected as behavior or deselected - if (resolveSemanticElement() != null) { - if (resolveSemanticElement() instanceof CallBehaviorAction && resolveSemanticElement().equals(event.getNotifier()) && event.getFeature().equals(UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior())) { - CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement(); - if (action.getBehavior() instanceof Activity) { - getPrimaryShape().displayRake(true); - } else { - getPrimaryShape().displayRake(false); - } - ; - refreshVisuals(); - } - } - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ValuePinInCallBeActEditPart.VISUAL_ID: - case ActionInputPinInCallBeActEditPart.VISUAL_ID: - case InputPinInCallBeActEditPart.VISUAL_ID: - case OutputPinInCallBeActEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new CallBehaviorActionFigure(); - } - - /** - * @generated - */ - @Override - public CallBehaviorActionFigure getPrimaryShape() { - return (CallBehaviorActionFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CallBehaviorActionNameEditPart) { - ((CallBehaviorActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ValuePinInCallBeActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallBeActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ActionInputPinInCallBeActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInCallBeActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInCallBeActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInCallBeActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallBeActEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CallBehaviorActionNameEditPart) { - return true; - } - if (childEditPart instanceof ValuePinInCallBeActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallBeActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActionInputPinInCallBeActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInCallBeActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallBeActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInCallBeActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallBeActEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "CallBehaviorAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Refresh the children parts, including the rake if necessary - * - * @see org.eclipse.gef.editparts.AbstractEditPart#refreshChildren() - * @generated NOT - */ - @Override - protected void refreshChildren() { - super.refreshChildren(); - // add the rake if behavior is an activity - if (resolveSemanticElement() instanceof CallBehaviorAction) { - CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement(); - if (action.getBehavior() instanceof Activity) { - getPrimaryShape().displayRake(true); - } else { - getPrimaryShape().displayRake(false); - } - } - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.GraphicalEditPart; +import org.eclipse.gef.Request; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.handles.MoveHandle; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; +import org.eclipse.uml2.uml.Activity; +import org.eclipse.uml2.uml.CallBehaviorAction; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * @generated + */ +public class CallBehaviorActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3008; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public CallBehaviorActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallBehaviorActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallBehaviorActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + /* + * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart + * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)! + */ + if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) { + Object notifier = event.getNotifier(); + List modelChildren = ((View) getModel()).getChildren(); + if (!(notifier instanceof Edge)) { + if (modelChildren.contains(event.getNotifier())) { + return; + } + } + } + super.handleNotificationEvent(event); + // Add/Remove the RakeFigure when an Activity is selected as behavior or deselected + if (resolveSemanticElement() != null) { + if (resolveSemanticElement() instanceof CallBehaviorAction && resolveSemanticElement().equals(event.getNotifier()) && event.getFeature().equals(UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior())) { + CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement(); + if (action.getBehavior() instanceof Activity) { + getPrimaryShape().displayRake(true); + } else { + getPrimaryShape().displayRake(false); + } + ; + refreshVisuals(); + } + } + } + + /** + * @generated + */ + // not generated but change include on gmfgen, can be override at the generation + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof CallBehaviorActionFloatingNameEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case CallBehaviorActionFloatingNameEditPart.VISUAL_ID: + return new BorderItemSelectionEditPolicy() { + + @Override + protected List createSelectionHandles() { + MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost()); + mh.setBorder(null); + return Collections.singletonList(mh); + } + }; + case ValuePinInCallBeActEditPart.VISUAL_ID: + case ActionInputPinInCallBeActEditPart.VISUAL_ID: + case InputPinInCallBeActEditPart.VISUAL_ID: + case OutputPinInCallBeActEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new CallBehaviorActionFigure(); + } + + /** + * @generated + */ + @Override + public CallBehaviorActionFigure getPrimaryShape() { + return (CallBehaviorActionFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CallBehaviorActionNameEditPart) { + ((CallBehaviorActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ValuePinInCallBeActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallBeActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ActionInputPinInCallBeActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInCallBeActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInCallBeActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInCallBeActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallBeActEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CallBehaviorActionNameEditPart) { + return true; + } + if (childEditPart instanceof ValuePinInCallBeActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallBeActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActionInputPinInCallBeActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInCallBeActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallBeActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInCallBeActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallBeActEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "CallBehaviorAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Refresh the children parts, including the rake if necessary + * + * @see org.eclipse.gef.editparts.AbstractEditPart#refreshChildren() + * @generated NOT + */ + @Override + protected void refreshChildren() { + super.refreshChildren(); + // add the rake if behavior is an activity + if (resolveSemanticElement() instanceof CallBehaviorAction) { + CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement(); + if (action.getBehavior() instanceof Activity) { + getPrimaryShape().displayRake(true); + } else { + getPrimaryShape().displayRake(false); + } + } + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java new file mode 100644 index 00000000000..53575b37494 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class CallBehaviorActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6029; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(CallBehaviorActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public CallBehaviorActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CallBehaviorActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java index c99f30a574a..ec11f8edd7a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java @@ -1,1551 +1,1551 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class CallOperationActionEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3010; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public CallOperationActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallOperationActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallOperationActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ActionInputPinInCallOpActEditPart.VISUAL_ID: - case ValuePinInCallOpActEditPart.VISUAL_ID: - case InputPinInCallOpActEditPart.VISUAL_ID: - case OutputPinInCallOpActEditPart.VISUAL_ID: - case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: - case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - @Override - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CallOperationActionNameEditPart) { - ((CallOperationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ActionInputPinInCallOpActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ValuePinInCallOpActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInCallOpActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInCallOpActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallOpActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CallOperationActionNameEditPart) { - return true; - } - if (childEditPart instanceof ActionInputPinInCallOpActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ValuePinInCallOpActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInCallOpActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInCallOpActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallOpActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "CallOperationAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class CallOperationActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3010; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public CallOperationActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallOperationActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallOperationActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ActionInputPinInCallOpActEditPart.VISUAL_ID: + case ValuePinInCallOpActEditPart.VISUAL_ID: + case InputPinInCallOpActEditPart.VISUAL_ID: + case OutputPinInCallOpActEditPart.VISUAL_ID: + case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: + case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CallOperationActionNameEditPart) { + ((CallOperationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ActionInputPinInCallOpActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ValuePinInCallOpActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInCallOpActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInCallOpActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallOpActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CallOperationActionNameEditPart) { + return true; + } + if (childEditPart instanceof ActionInputPinInCallOpActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ValuePinInCallOpActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInCallOpActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInCallOpActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallOpActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "CallOperationAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java new file mode 100644 index 00000000000..277204d760c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class CallOperationActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6020; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(CallOperationActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public CallOperationActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CallOperationActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java index 61376cef273..24c88fc6e04 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java @@ -1,1240 +1,1286 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.MarginBorder; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CentralBufferNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class CentralBufferNodeEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3104; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public CentralBufferNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CentralBufferNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated NOT use BehaviorPropertyNodeEditPolicy - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case CentralBufferNodeSelectionEditPart.VISUAL_ID: - return new BehaviorPropertyNodeEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new ObjectNodeDescriptor(); - } - - /** - * @generated - */ - public ObjectNodeDescriptor getPrimaryShape() { - return (ObjectNodeDescriptor) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CentralBufferNodeLabelEditPart) { - ((CentralBufferNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getObjectNodeLabel()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CentralBufferNodeLabelEditPart) { - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated NOT use custom locator - */ - @Override - protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { - if (borderItemEditPart instanceof CentralBufferNodeSelectionEditPart) { - // use custom locator - BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH); - locator.setBorderItemOffset(new Dimension(-20, -20)); - borderItemContainer.add(borderItemEditPart.getFigure(), locator); - } else { - super.addBorderItem(borderItemContainer, borderItemEditPart); - } - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "CentralBufferNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model so - * you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. Respects - * layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - public class ObjectNodeDescriptor extends NodeNamedElementFigure { - - /** - * @generated - */ - private WrappingLabel fObjectNodeLabel; - - /** - * @generated NOT call super - */ - public ObjectNodeDescriptor() { - // call super - super(); - createContents(); - } - - /** - * @generated NOT use super figure name label instead - */ - private void createContents() { - // use super figure name label instead - getNameLabel().setTextJustification(PositionConstants.CENTER); - getNameLabel().setAlignment(PositionConstants.CENTER); - getNameLabel().setTextWrap(true); - getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); - // fObjectNodeLabel = new WrappingLabel(); - // - // - // - // fObjectNodeLabel.setBorder(new - // MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), - // getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); - // - // this.add(fObjectNodeLabel); - } - - /** - * @generated NOT get label from super figure instead - */ - public WrappingLabel getObjectNodeLabel() { - // get label from super figure instead - return getNameLabel(); - // return fObjectNodeLabel; - } - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.GraphicalEditPart; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.handles.MoveHandle; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CentralBufferNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class CentralBufferNodeEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3104; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public CentralBufferNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CentralBufferNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated NOT use BehaviorPropertyNodeEditPolicy + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case CentralBufferNodeSelectionEditPart.VISUAL_ID: + return new BehaviorPropertyNodeEditPolicy(); + + case CentralBufferNodeFloatingNameEditPart.VISUAL_ID: + return new BorderItemSelectionEditPolicy() { + + @Override + protected List createSelectionHandles() { + MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost()); + mh.setBorder(null); + return Collections.singletonList(mh); + } + }; + } + + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * Papyrus codeGen + * + * @generated + **/ + // not generated but change include on gmfgen, can be override at the generation + @Override + protected void handleNotificationEvent(Notification event) { + /* + * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart + * Registry. After that, we can't reset the visibility to tru:e (using the Show/Hide Label Action)! + */ + if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) { + Object notifier = event.getNotifier(); + List modelChildren = ((View) getModel()).getChildren(); + if (!(notifier instanceof Edge)) { + if (modelChildren.contains(event.getNotifier())) { + return; + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CentralBufferNodeLabelEditPart) { + ((CentralBufferNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CentralBufferNodeLabelEditPart) { + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated NOT use custom locator + * => not used anymore: override by customCentralBufferEditPart instead + * => + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof CentralBufferNodeSelectionEditPart) { + // use custom locator + BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else if (borderItemEditPart instanceof CentralBufferNodeFloatingNameEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "CentralBufferNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model so + * you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. Respects + * layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + // /** + // * @generated + // */ + // public class ObjectNodeDescriptor extends NodeNamedElementFigure { + // + // /** + // * @generated + // */ + // private WrappingLabel fObjectNodeLabel; + // + // /** + // * @generated NOT call super + // */ + // public ObjectNodeDescriptor() { + // // call super + // super(); + // createContents(); + // } + // + // /** + // * @generated NOT use super figure name label instead + // */ + // private void createContents() { + // // use super figure name label instead + // getNameLabel().setTextJustification(PositionConstants.CENTER); + // getNameLabel().setAlignment(PositionConstants.CENTER); + // getNameLabel().setTextWrap(true); + // getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); + // // fObjectNodeLabel = new WrappingLabel(); + // // + // // + // // + // // fObjectNodeLabel.setBorder(new + // // MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), + // // getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); + // // + // // this.add(fObjectNodeLabel); + // } + // + // /** + // * @generated NOT get label from super figure instead + // */ + // public WrappingLabel getObjectNodeLabel() { + // // get label from super figure instead + // return getNameLabel(); + // // return fObjectNodeLabel; + // } + // } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java new file mode 100644 index 00000000000..3678670f23c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class CentralBufferNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6030; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(CentralBufferNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public CentralBufferNodeFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CentralBufferNodeFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java index 266ca85aeb7..17dc756a848 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java @@ -1,1465 +1,1465 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ConditionalNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ConditionalNodeEditPart extends UMLNodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3069; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * Preferences Store - */ - protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - - /** - * @generated - */ - public ConditionalNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConditionalNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new StructuredActivityNodeFigure(); - } - - /** - * @generated - */ - @Override - public StructuredActivityNodeFigure getPrimaryShape() { - return (StructuredActivityNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ConditionalNodeKeywordEditPart) { - ((ConditionalNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ConditionalNodeKeywordEditPart) { - return true; - } - if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - pane.remove(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) { - return getPrimaryShape().getStructuredActivityNodeCompartment(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "ConditionalNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createNodeFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ConditionalNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ConditionalNodeEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3069; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * Preferences Store + */ + protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + + /** + * @generated + */ + public ConditionalNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConditionalNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new StructuredActivityNodeFigure(); + } + + /** + * @generated + */ + @Override + public StructuredActivityNodeFigure getPrimaryShape() { + return (StructuredActivityNodeFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ConditionalNodeKeywordEditPart) { + ((ConditionalNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ConditionalNodeKeywordEditPart) { + return true; + } + if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + pane.remove(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) { + return getPrimaryShape().getStructuredActivityNodeCompartment(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "ConditionalNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createNodeFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java index 00139e09363..ba947aa8d1d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java @@ -1,1495 +1,1495 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.Transaction; -import org.eclipse.emf.transaction.TransactionalCommandStack; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * @generated - */ -public class CreateObjectActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3086; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public CreateObjectActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CreateObjectActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CreateObjectActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CreateObjectActionNameEditPart) { - ((CreateObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof CreateObjectActionNameEditPart) { - return true; - } - if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "CreateObjectAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } - - /** - * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) - * Change automatically the type of the output pin with the type of the classifier - * @param notification - */ - @Override - protected void handleNotificationEvent(Notification notification) { - super.handleNotificationEvent(notification); - Object feature = notification.getFeature(); - if (UMLPackage.Literals.CREATE_OBJECT_ACTION__CLASSIFIER.equals(feature)) { - final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.CREATE_OBJECT_ACTION__RESULT); - org.eclipse.emf.common.command.Command cmd = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, notification.getNewValue()); - try { - if (cmd.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmd, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmd); - } - } - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (RollbackException e) { - e.printStackTrace(); - } - } - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.Transaction; +import org.eclipse.emf.transaction.TransactionalCommandStack; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * @generated + */ +public class CreateObjectActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3086; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public CreateObjectActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CreateObjectActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CreateObjectActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CreateObjectActionNameEditPart) { + ((CreateObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof CreateObjectActionNameEditPart) { + return true; + } + if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "CreateObjectAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) + * Change automatically the type of the output pin with the type of the classifier + * @param notification + */ + @Override + protected void handleNotificationEvent(Notification notification) { + super.handleNotificationEvent(notification); + Object feature = notification.getFeature(); + if (UMLPackage.Literals.CREATE_OBJECT_ACTION__CLASSIFIER.equals(feature)) { + final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.CREATE_OBJECT_ACTION__RESULT); + org.eclipse.emf.common.command.Command cmd = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, notification.getNewValue()); + try { + if (cmd.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmd, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmd); + } + } + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (RollbackException e) { + e.printStackTrace(); + } + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java new file mode 100644 index 00000000000..10b4a487043 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class CreateObjectActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6024; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(CreateObjectActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public CreateObjectActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CreateObjectActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java index ce7dad38383..9e2f9cf54e1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java @@ -1,1280 +1,1278 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.MarginBorder; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.Edge; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DataStoreNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class DataStoreNodeEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3078; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public DataStoreNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataStoreNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - /* - * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart - * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)! - */ - if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) { - Object notifier = event.getNotifier(); - List modelChildren = ((View) getModel()).getChildren(); - if (!(notifier instanceof Edge)) { - if (modelChildren.contains(event.getNotifier())) { - return; - } - } - } - super.handleNotificationEvent(event); - } - - /** - * @generated NOT use BehaviorPropertyNodeEditPolicy - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case DataStoreSelectionEditPart.VISUAL_ID: - return new BehaviorPropertyNodeEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new ObjectNodeDescriptor(); - } - - /** - * @generated - */ - @Override - public ObjectNodeDescriptor getPrimaryShape() { - return (ObjectNodeDescriptor) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof DataStoreNodeLabelEditPart) { - ((DataStoreNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getObjectNodeLabel()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof DataStoreNodeLabelEditPart) { - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated NOT use custom locator - */ - @Override - protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { - if (borderItemEditPart instanceof DataStoreSelectionEditPart) { - // use custom locator - BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH); - locator.setBorderItemOffset(new Dimension(-20, -20)); - borderItemContainer.add(borderItemEditPart.getFigure(), locator); - } else { - super.addBorderItem(borderItemContainer, borderItemEditPart); - } - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "DataStoreNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - public class ObjectNodeDescriptor extends NodeNamedElementFigure { - - /** - * @generated - */ - private WrappingLabel fObjectNodeLabel; - - /** - * @generated NOT call super - */ - public ObjectNodeDescriptor() { - // call super - super(); - createContents(); - } - - /** - * @generated NOT use super figure name label instead - */ - private void createContents() { - // use super figure name label instead - getNameLabel().setTextJustification(PositionConstants.CENTER); - getNameLabel().setAlignment(PositionConstants.CENTER); - getNameLabel().setTextWrap(true); - getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); - // fObjectNodeLabel = new WrappingLabel(); - // - // - // - // fObjectNodeLabel.setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); - // - // this.add(fObjectNodeLabel); - } - - /** - * @generated NOT get label from super figure instead - */ - public WrappingLabel getObjectNodeLabel() { - // get label from super figure instead - return getNameLabel(); - // return fObjectNodeLabel; - } - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DataStoreNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class DataStoreNodeEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3078; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public DataStoreNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataStoreNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + /* + * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart + * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)! + */ + if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) { + Object notifier = event.getNotifier(); + List modelChildren = ((View) getModel()).getChildren(); + if (!(notifier instanceof Edge)) { + if (modelChildren.contains(event.getNotifier())) { + return; + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated NOT use BehaviorPropertyNodeEditPolicy + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case DataStoreSelectionEditPart.VISUAL_ID: + return new BehaviorPropertyNodeEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof DataStoreNodeLabelEditPart) { + ((DataStoreNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof DataStoreNodeLabelEditPart) { + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated NOT use custom locator + */ + @Override + protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) { + if (borderItemEditPart instanceof DataStoreSelectionEditPart) { + // use custom locator + BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH); + locator.setBorderItemOffset(new Dimension(-20, -20)); + borderItemContainer.add(borderItemEditPart.getFigure(), locator); + } else { + super.addBorderItem(borderItemContainer, borderItemEditPart); + } + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "DataStoreNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + // /** + // * @generated + // */ + // public class ObjectNodeDescriptor extends NodeNamedElementFigure { + // + // /** + // * @generated + // */ + // private WrappingLabel fObjectNodeLabel; + // + // /** + // * @generated NOT call super + // */ + // public ObjectNodeDescriptor() { + // // call super + // super(); + // createContents(); + // } + // + // /** + // * @generated NOT use super figure name label instead + // */ + // private void createContents() { + // // use super figure name label instead + // getNameLabel().setTextJustification(PositionConstants.CENTER); + // getNameLabel().setAlignment(PositionConstants.CENTER); + // getNameLabel().setTextWrap(true); + // getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); + // // fObjectNodeLabel = new WrappingLabel(); + // // + // // + // // + // // fObjectNodeLabel.setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5))); + // // + // // this.add(fObjectNodeLabel); + // } + // + // /** + // * @generated NOT get label from super figure instead + // */ + // public WrappingLabel getObjectNodeLabel() { + // // get label from super figure instead + // return getNameLabel(); + // // return fObjectNodeLabel; + // } + // } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java new file mode 100644 index 00000000000..db91f870a0d --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class DataStoreNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6031; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(DataStoreNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public DataStoreNodeFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(DataStoreNodeFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java index bb287261a49..55e9bb3ab96 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java @@ -1,1458 +1,1458 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class DestroyObjectActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3095; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public DestroyObjectActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DestroyObjectActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new DestroyObjectActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case InputPinInDestroyObjectActionEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof DestroyObjectActionNameEditPart) { - ((DestroyObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof DestroyObjectActionNameEditPart) { - return true; - } - if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "DestroyObjectAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class DestroyObjectActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3095; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public DestroyObjectActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DestroyObjectActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new DestroyObjectActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case InputPinInDestroyObjectActionEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof DestroyObjectActionNameEditPart) { + ((DestroyObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof DestroyObjectActionNameEditPart) { + return true; + } + if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "DestroyObjectAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java new file mode 100644 index 00000000000..f2f31b5c3ad --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class DestroyObjectActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6022; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(DestroyObjectActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public DestroyObjectActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(DestroyObjectActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java index 79e7a961c16..2ab64b094c1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java @@ -1,1500 +1,1500 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.ExpansionNodePositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ExpansionRegionEditPart extends UMLNodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3070; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ExpansionRegionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExpansionRegionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ExpansionNodeAsInEditPart.VISUAL_ID: - case ExpansionNodeAsOutEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new StructuredActivityNodeFigure(); - } - - /** - * @generated - */ - @Override - public StructuredActivityNodeFigure getPrimaryShape() { - return (StructuredActivityNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ExpansionRegionKeywordEditPart) { - ((ExpansionRegionKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - // Papyrus Gencode :Affixed Expansion Node locator for Activity - if (childEditPart instanceof ExpansionNodeAsInEditPart) { - IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsInEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Expansion Node locator for Activity - if (childEditPart instanceof ExpansionNodeAsOutEditPart) { - IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.SOUTH); - getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsOutEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ExpansionRegionKeywordEditPart) { - return true; - } - if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - pane.remove(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ExpansionNodeAsInEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsInEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ExpansionNodeAsOutEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsOutEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) { - return getPrimaryShape().getStructuredActivityNodeCompartment(); - } - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "ExpansionRegion"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.ExpansionNodePositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ExpansionRegionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3070; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ExpansionRegionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExpansionRegionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ExpansionNodeAsInEditPart.VISUAL_ID: + case ExpansionNodeAsOutEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new StructuredActivityNodeFigure(); + } + + /** + * @generated + */ + @Override + public StructuredActivityNodeFigure getPrimaryShape() { + return (StructuredActivityNodeFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ExpansionRegionKeywordEditPart) { + ((ExpansionRegionKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + // Papyrus Gencode :Affixed Expansion Node locator for Activity + if (childEditPart instanceof ExpansionNodeAsInEditPart) { + IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsInEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Expansion Node locator for Activity + if (childEditPart instanceof ExpansionNodeAsOutEditPart) { + IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.SOUTH); + getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsOutEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ExpansionRegionKeywordEditPart) { + return true; + } + if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + pane.remove(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ExpansionNodeAsInEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsInEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ExpansionNodeAsOutEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsOutEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) { + return getPrimaryShape().getStructuredActivityNodeCompartment(); + } + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "ExpansionRegion"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java index 9b1823ad83e..a609307cdc0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java @@ -1,310 +1,310 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleActivityRegionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class InterruptibleActivityRegionEditPart extends NodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3068; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public InterruptibleActivityRegionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterruptibleActivityRegionItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new InterruptibleActivityRegionFigure(); - } - - /** - * @generated - */ - @Override - public InterruptibleActivityRegionFigure getPrimaryShape() { - return (InterruptibleActivityRegionFigure) primaryShape; - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "InterruptibleActivityRegion"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createNodeFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated NOT avoid class cast exception by implementing this method - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(2); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.part.RoundedUMLNodeEditPart; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleActivityRegionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class InterruptibleActivityRegionEditPart extends RoundedUMLNodeEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3068; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public InterruptibleActivityRegionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterruptibleActivityRegionItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new InterruptibleActivityRegionFigure(); + } + + /** + * @generated + */ + @Override + public InterruptibleActivityRegionFigure getPrimaryShape() { + return (InterruptibleActivityRegionFigure) primaryShape; + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "InterruptibleActivityRegion"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createNodeFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated NOT avoid class cast exception by implementing this method + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(2); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java index c7c29ef254a..5397f20366d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java @@ -1,1520 +1,1520 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class LoopNodeEditPart extends UMLNodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3071; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public LoopNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LoopNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new StructuredActivityNodeFigure(); - } - - /** - * @generated - */ - @Override - public StructuredActivityNodeFigure getPrimaryShape() { - return (StructuredActivityNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof LoopNodeKeywordEditPart) { - ((LoopNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure(), locator); - return true; - } - if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure(), locator); - return true; - } - if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure(), locator); - return true; - } - if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof LoopNodeKeywordEditPart) { - return true; - } - if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - pane.remove(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) { - return getPrimaryShape().getStructuredActivityNodeCompartment(); - } - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "LoopNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class LoopNodeEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3071; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public LoopNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LoopNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new StructuredActivityNodeFigure(); + } + + /** + * @generated + */ + @Override + public StructuredActivityNodeFigure getPrimaryShape() { + return (StructuredActivityNodeFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof LoopNodeKeywordEditPart) { + ((LoopNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure(), locator); + return true; + } + if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure(), locator); + return true; + } + if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure(), locator); + return true; + } + if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof LoopNodeKeywordEditPart) { + return true; + } + if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + pane.remove(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) { + return getPrimaryShape().getStructuredActivityNodeCompartment(); + } + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "LoopNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java index 176c4cfa316..a08051f2e2e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java @@ -1,1518 +1,1518 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class OpaqueActionEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3007; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public OpaqueActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new OpaqueActionObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ValuePinInOpaqueActEditPart.VISUAL_ID: - case ActionInputPinInOpaqueActEditPart.VISUAL_ID: - case InputPinInOpaqueActEditPart.VISUAL_ID: - case OutputPinInOpaqueActEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - @Override - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof OpaqueActionNameEditPart) { - ((OpaqueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ValuePinInOpaqueActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ValuePinInOpaqueActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInOpaqueActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInOpaqueActEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInOpaqueActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInOpaqueActEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof OpaqueActionNameEditPart) { - return true; - } - if (childEditPart instanceof ValuePinInOpaqueActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ValuePinInOpaqueActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInOpaqueActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInOpaqueActEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInOpaqueActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInOpaqueActEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "OpaqueAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class OpaqueActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3007; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public OpaqueActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new OpaqueActionObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ValuePinInOpaqueActEditPart.VISUAL_ID: + case ActionInputPinInOpaqueActEditPart.VISUAL_ID: + case InputPinInOpaqueActEditPart.VISUAL_ID: + case OutputPinInOpaqueActEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof OpaqueActionNameEditPart) { + ((OpaqueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ValuePinInOpaqueActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ValuePinInOpaqueActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInOpaqueActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInOpaqueActEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInOpaqueActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInOpaqueActEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof OpaqueActionNameEditPart) { + return true; + } + if (childEditPart instanceof ValuePinInOpaqueActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ValuePinInOpaqueActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInOpaqueActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInOpaqueActEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInOpaqueActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInOpaqueActEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "OpaqueAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java new file mode 100644 index 00000000000..1f8d3a078c2 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class OpaqueActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6028; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(OpaqueActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public OpaqueActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(OpaqueActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java index e6c35510ce3..cdeab4598de 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java @@ -1,1474 +1,1474 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ReadSelfActionEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3081; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ReadSelfActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadSelfActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadSelfActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ReadSelfActionOutputPinEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - @Override - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ReadSelfActionNameEditPart) { - ((ReadSelfActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ReadSelfActionOutputPinEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ReadSelfActionNameEditPart) { - return true; - } - if (childEditPart instanceof ReadSelfActionOutputPinEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "ReadSelfAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ReadSelfActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3081; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ReadSelfActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadSelfActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadSelfActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ReadSelfActionOutputPinEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ReadSelfActionNameEditPart) { + ((ReadSelfActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ReadSelfActionOutputPinEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ReadSelfActionNameEditPart) { + return true; + } + if (childEditPart instanceof ReadSelfActionOutputPinEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "ReadSelfAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java new file mode 100644 index 00000000000..4989e8d4026 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class ReadSelfActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6025; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(ReadSelfActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public ReadSelfActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ReadSelfActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java index 763ef4064e5..9bee5bfa948 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java @@ -1,1535 +1,1535 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.Transaction; -import org.eclipse.emf.transaction.TransactionalCommandStack; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.StructuralFeature; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * @generated - */ -public class ReadStructuralFeatureActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3088; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ReadStructuralFeatureActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadStructuralFeatureActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadStructuralFeatureActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: - case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) { - ((ReadStructuralFeatureActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) { - return true; - } - if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "ReadStructuralFeatureAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } - - /** - * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) - * - * @param notification - */ - @Override - protected void handleNotificationEvent(Notification notification) { - super.handleNotificationEvent(notification); - Object feature = notification.getFeature(); - if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) { - final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_STRUCTURAL_FEATURE_ACTION__RESULT); - final Object object = this.resolveSemanticElement().eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT); - Object _feature = notification.getNewValue(); - if (_feature instanceof StructuralFeature) { - org.eclipse.emf.common.command.Command cmdSetResultType = null; - org.eclipse.emf.common.command.Command cmdSetObjectType = null; - StructuralFeature newFeature = (StructuralFeature) _feature; - Type type = newFeature.getType(); - if (type != null) { - cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); - } - Element owner = newFeature.getOwner(); - if (owner != null) { - cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner); - } - try { - if (cmdSetResultType != null) { - if (cmdSetResultType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetResultType); - } - } - } - if (cmdSetObjectType != null) { - if (cmdSetObjectType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetObjectType); - } - } - } - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (RollbackException e) { - e.printStackTrace(); - } - } - } - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.Transaction; +import org.eclipse.emf.transaction.TransactionalCommandStack; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.StructuralFeature; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * @generated + */ +public class ReadStructuralFeatureActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3088; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ReadStructuralFeatureActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadStructuralFeatureActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadStructuralFeatureActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: + case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) { + ((ReadStructuralFeatureActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) { + return true; + } + if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "ReadStructuralFeatureAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) + * + * @param notification + */ + @Override + protected void handleNotificationEvent(Notification notification) { + super.handleNotificationEvent(notification); + Object feature = notification.getFeature(); + if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) { + final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_STRUCTURAL_FEATURE_ACTION__RESULT); + final Object object = this.resolveSemanticElement().eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT); + Object _feature = notification.getNewValue(); + if (_feature instanceof StructuralFeature) { + org.eclipse.emf.common.command.Command cmdSetResultType = null; + org.eclipse.emf.common.command.Command cmdSetObjectType = null; + StructuralFeature newFeature = (StructuralFeature) _feature; + Type type = newFeature.getType(); + if (type != null) { + cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); + } + Element owner = newFeature.getOwner(); + if (owner != null) { + cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner); + } + try { + if (cmdSetResultType != null) { + if (cmdSetResultType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetResultType); + } + } + } + if (cmdSetObjectType != null) { + if (cmdSetObjectType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetObjectType); + } + } + } + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (RollbackException e) { + e.printStackTrace(); + } + } + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java new file mode 100644 index 00000000000..5645630aad3 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class ReadStructuralFeatureActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6023; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public ReadStructuralFeatureActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java index 4338228eec0..1f50484e4ea 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java @@ -1,1507 +1,1507 @@ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.Transaction; -import org.eclipse.emf.transaction.TransactionalCommandStack; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.Variable; - -/** - * @generated - */ -public class ReadVariableActionEditPart extends AbstractBorderedShapeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3097; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ReadVariableActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadVariableActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadVariableActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ReadVariableActionNameEditPart) { - ((ReadVariableActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NONE); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ReadVariableActionNameEditPart) { - return true; - } - if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - protected NodeFigure createNodePlate() { - String prefElementId = "ReadVariableAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } - - /** - * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) - * Set the Outpu Pin type from the variable type - * @param notification - */ - @Override - protected void handleNotificationEvent(Notification notification) { - super.handleNotificationEvent(notification); - Object feature = notification.getFeature(); - if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) { - final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_VARIABLE_ACTION__RESULT); - Object _varaible = notification.getNewValue(); - if (_varaible instanceof Variable) { - org.eclipse.emf.common.command.Command cmdSetResultType = null; - Variable newVariable = (Variable) _varaible; - Type type = newVariable.getType(); - if (type != null) { - cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); - } - try { - if (cmdSetResultType != null) { - if (cmdSetResultType.canExecute()) { - CommandStack commandStack = getEditingDomain().getCommandStack(); - if (commandStack instanceof TransactionalCommandStack) { - ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); - } else { - commandStack.execute(cmdSetResultType); - } - } - } - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (RollbackException e) { - e.printStackTrace(); - } - } - } - } -} +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.Transaction; +import org.eclipse.emf.transaction.TransactionalCommandStack; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.Variable; + +/** + * @generated + */ +public class ReadVariableActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3097; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ReadVariableActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadVariableActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadVariableActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ReadVariableActionNameEditPart) { + ((ReadVariableActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NONE); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ReadVariableActionNameEditPart) { + return true; + } + if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + protected NodeFigure createNodePlate() { + String prefElementId = "ReadVariableAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } + + /** + * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification) + * Set the Outpu Pin type from the variable type + * @param notification + */ + @Override + protected void handleNotificationEvent(Notification notification) { + super.handleNotificationEvent(notification); + Object feature = notification.getFeature(); + if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) { + final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_VARIABLE_ACTION__RESULT); + Object _varaible = notification.getNewValue(); + if (_varaible instanceof Variable) { + org.eclipse.emf.common.command.Command cmdSetResultType = null; + Variable newVariable = (Variable) _varaible; + Type type = newVariable.getType(); + if (type != null) { + cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type); + } + try { + if (cmdSetResultType != null) { + if (cmdSetResultType.canExecute()) { + CommandStack commandStack = getEditingDomain().getCommandStack(); + if (commandStack instanceof TransactionalCommandStack) { + ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE)); + } else { + commandStack.execute(cmdSetResultType); + } + } + } + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (RollbackException e) { + e.printStackTrace(); + } + } + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java new file mode 100644 index 00000000000..613d4d10ffd --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class ReadVariableActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6021; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(ReadVariableActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public ReadVariableActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ReadVariableActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java index 573f4492877..a19fd8d57d9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java @@ -1,1541 +1,1541 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class SendObjectActionEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3042; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public SendObjectActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendObjectActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SendObjectActionCanonicalEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: - case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: - case InputPinInSendObjActAsReqEditPart.VISUAL_ID: - case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: - case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - @Override - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof SendObjectActionNameEditPart) { - ((SendObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); - getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); - getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof SendObjectActionNameEditPart) { - return true; - } - if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure()); - return true; - } - if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "SendObjectAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class SendObjectActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3042; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public SendObjectActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendObjectActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SendObjectActionCanonicalEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: + case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: + case InputPinInSendObjActAsReqEditPart.VISUAL_ID: + case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: + case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof SendObjectActionNameEditPart) { + ((SendObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST); + getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH); + getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof SendObjectActionNameEditPart) { + return true; + } + if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure()); + return true; + } + if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "SendObjectAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java new file mode 100644 index 00000000000..075b2cc0b79 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class SendObjectActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6027; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(SendObjectActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public SendObjectActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(SendObjectActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java index f06cd10efaa..d96077263e6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java @@ -1,1460 +1,1460 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SequenceNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class SequenceNodeEditPart extends UMLNodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3073; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public SequenceNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SequenceNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new StructuredActivityNodeFigure(); - } - - /** - * @generated - */ - @Override - public StructuredActivityNodeFigure getPrimaryShape() { - return (StructuredActivityNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof SequenceNodeKeywordEditPart) { - ((SequenceNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof SequenceNodeKeywordEditPart) { - return true; - } - if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - pane.remove(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) { - return getPrimaryShape().getStructuredActivityNodeCompartment(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "SequenceNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createNodeFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SequenceNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class SequenceNodeEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3073; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public SequenceNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SequenceNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new StructuredActivityNodeFigure(); + } + + /** + * @generated + */ + @Override + public StructuredActivityNodeFigure getPrimaryShape() { + return (StructuredActivityNodeFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof SequenceNodeKeywordEditPart) { + ((SequenceNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof SequenceNodeKeywordEditPart) { + return true; + } + if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + pane.remove(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) { + return getPrimaryShape().getStructuredActivityNodeCompartment(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "SequenceNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createNodeFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java index c8256b0524c..84ce65224ea 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java @@ -1,1460 +1,1460 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.StructuredActivityNodeItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class StructuredActivityNodeEditPart extends UMLNodeEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3065; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public StructuredActivityNodeEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StructuredActivityNodeItemSemanticEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new StructuredActivityNodeFigure(); - } - - /** - * @generated - */ - @Override - public StructuredActivityNodeFigure getPrimaryShape() { - return (StructuredActivityNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) { - ((StructuredActivityNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way - pane.add(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) { - return true; - } - if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) { - IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); - pane.remove(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) { - return getPrimaryShape().getStructuredActivityNodeCompartment(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "StructuredActivityNode"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createNodeFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.StructuredActivityNodeItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class StructuredActivityNodeEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3065; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public StructuredActivityNodeEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StructuredActivityNodeItemSemanticEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new StructuredActivityNodeFigure(); + } + + /** + * @generated + */ + @Override + public StructuredActivityNodeFigure getPrimaryShape() { + return (StructuredActivityNodeFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) { + ((StructuredActivityNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way + pane.add(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) { + return true; + } + if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) { + IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment(); + pane.remove(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) { + return getPrimaryShape().getStructuredActivityNodeCompartment(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "StructuredActivityNode"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createNodeFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java index ba88ad60a4f..096fe547972 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java @@ -1,722 +1,768 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import org.eclipse.draw2d.Label; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPartFactory; -import org.eclipse.gef.tools.CellEditorLocator; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.tooling.runtime.directedit.locator.LabelCellEditorLocator; -import org.eclipse.gmf.tooling.runtime.directedit.locator.TextCellEditorLocator; -import org.eclipse.jface.viewers.CellEditor; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Text; - -/** - * @generated - */ -public class UMLEditPartFactory implements EditPartFactory { - - /** - * @generated - */ - @Override - public EditPart createEditPart(EditPart context, Object model) { - if (model instanceof View) { - View view = (View) model; - switch (UMLVisualIDRegistry.getVisualID(view)) { - case ActivityDiagramEditPart.VISUAL_ID: - return new ActivityDiagramEditPart(view); - case ActivityEditPart.VISUAL_ID: - return new ActivityEditPart(view); - case ActivityNameEditPart.VISUAL_ID: - return new ActivityNameEditPart(view); - case ActivityIsSingleExecutionEditPart.VISUAL_ID: - return new ActivityIsSingleExecutionEditPart(view); - case ParameterEditPart.VISUAL_ID: - return new ParameterEditPart(view); - case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: - return new ConstraintInActivityAsPrecondEditPart(view); - case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: - return new ConstraintInActivityAsPostcondEditPart(view); - case InitialNodeEditPart.VISUAL_ID: - return new InitialNodeEditPart(view); - case InitialNodeAppliedStereotypeEditPart.VISUAL_ID: - return new InitialNodeAppliedStereotypeEditPart(view); - case ActivityFinalNodeEditPart.VISUAL_ID: - return new ActivityFinalNodeEditPart(view); - case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID: - return new ActivityFinalNodeAppliedStereotypeEditPart(view); - case FlowFinalNodeEditPart.VISUAL_ID: - return new FlowFinalNodeEditPart(view); - case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID: - return new FlowFinalNodeAppliedStereotypeEditPart(view); - case OpaqueActionEditPart.VISUAL_ID: - return new OpaqueActionEditPart(view); - case OpaqueActionNameEditPart.VISUAL_ID: - return new OpaqueActionNameEditPart(view); - case ValuePinInOpaqueActEditPart.VISUAL_ID: - return new ValuePinInOpaqueActEditPart(view); - case ValuePinInOActLabelEditPart.VISUAL_ID: - return new ValuePinInOActLabelEditPart(view); - case ValuePinInOActValueEditPart.VISUAL_ID: - return new ValuePinInOActValueEditPart(view); - case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInOActAppliedStereotypeEditPart(view); - case ActionInputPinInOpaqueActEditPart.VISUAL_ID: - return new ActionInputPinInOpaqueActEditPart(view); - case ActionInputPinInOActLabelEditPart.VISUAL_ID: - return new ActionInputPinInOActLabelEditPart(view); - case ActionInputPinInOActValueEditPart.VISUAL_ID: - return new ActionInputPinInOActValueEditPart(view); - case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInOActAppliedStereotypeEditPart(view); - case InputPinInOpaqueActEditPart.VISUAL_ID: - return new InputPinInOpaqueActEditPart(view); - case InputPinInOActLabelEditPart.VISUAL_ID: - return new InputPinInOActLabelEditPart(view); - case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInOActAppliedStereotypeEditPart(view); - case OutputPinInOpaqueActEditPart.VISUAL_ID: - return new OutputPinInOpaqueActEditPart(view); - case OutputPinInOActLabelEditPart.VISUAL_ID: - return new OutputPinInOActLabelEditPart(view); - case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInOActAppliedStereotypeEditPart(view); - case CallBehaviorActionEditPart.VISUAL_ID: - return new CallBehaviorActionEditPart(view); - case CallBehaviorActionNameEditPart.VISUAL_ID: - return new CallBehaviorActionNameEditPart(view); - case ValuePinInCallBeActEditPart.VISUAL_ID: - return new ValuePinInCallBeActEditPart(view); - case ValuePinInCBActLabelEditPart.VISUAL_ID: - return new ValuePinInCBActLabelEditPart(view); - case ValuePinInCBActValueEditPart.VISUAL_ID: - return new ValuePinInCBActValueEditPart(view); - case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInCBActAppliedStereotypeEditPart(view); - case ActionInputPinInCallBeActEditPart.VISUAL_ID: - return new ActionInputPinInCallBeActEditPart(view); - case ActionInputPinInCBActLabelEditPart.VISUAL_ID: - return new ActionInputPinInCBActLabelEditPart(view); - case ActionInputPinInCBActValueEditPart.VISUAL_ID: - return new ActionInputPinInCBActValueEditPart(view); - case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInCBActAppliedStereotypeEditPart(view); - case InputPinInCallBeActEditPart.VISUAL_ID: - return new InputPinInCallBeActEditPart(view); - case InputPinInCBActLabelEditPart.VISUAL_ID: - return new InputPinInCBActLabelEditPart(view); - case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInCBActAppliedStereotypeEditPart(view); - case OutputPinInCallBeActEditPart.VISUAL_ID: - return new OutputPinInCallBeActEditPart(view); - case OutputPinInCBActLabelEditPart.VISUAL_ID: - return new OutputPinInCBActLabelEditPart(view); - case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInCBActAppliedStereotypeEditPart(view); - case CallOperationActionEditPart.VISUAL_ID: - return new CallOperationActionEditPart(view); - case CallOperationActionNameEditPart.VISUAL_ID: - return new CallOperationActionNameEditPart(view); - case ActionInputPinInCallOpActEditPart.VISUAL_ID: - return new ActionInputPinInCallOpActEditPart(view); - case ActionInputPinInCOActLabelEditPart.VISUAL_ID: - return new ActionInputPinInCOActLabelEditPart(view); - case ActionInputPinInCOActValueEditPart.VISUAL_ID: - return new ActionInputPinInCOActValueEditPart(view); - case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInCOActAppliedStereotypeEditPart(view); - case ValuePinInCallOpActEditPart.VISUAL_ID: - return new ValuePinInCallOpActEditPart(view); - case ValuePinInCOActLabelEditPart.VISUAL_ID: - return new ValuePinInCOActLabelEditPart(view); - case ValuePinInCOActValueEditPart.VISUAL_ID: - return new ValuePinInCOActValueEditPart(view); - case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInCOActAppliedStereotypeEditPart(view); - case InputPinInCallOpActEditPart.VISUAL_ID: - return new InputPinInCallOpActEditPart(view); - case InputPinInCOActLabelEditPart.VISUAL_ID: - return new InputPinInCOActLabelEditPart(view); - case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInCOActAppliedStereotypeEditPart(view); - case OutputPinInCallOpActEditPart.VISUAL_ID: - return new OutputPinInCallOpActEditPart(view); - case OutputPinInCOActLabelEditPart.VISUAL_ID: - return new OutputPinInCOActLabelEditPart(view); - case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInCOActAppliedStereotypeEditPart(view); - case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: - return new ValuePinInCallOpActAsTargetEditPart(view); - case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID: - return new ValuePinInCOActAsTargetLabelEditPart(view); - case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID: - return new ValuePinInCOActAsTargetValueEditPart(view); - case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInCOActAsTargetAppliedStereotypeEditPart(view); - case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: - return new ActionInputPinInCallOpActAsTargetEditPart(view); - case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID: - return new ActionInputPinInCOActAsTargetLabelEditPart(view); - case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID: - return new ActionInputPinInCOActAsTargetValueEditPart(view); - case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInCOActAsTargetAppliedStereotypeEditPart(view); - case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: - return new InputPinInCallOpActAsTargetEditPart(view); - case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID: - return new InputPinInCOActAsTargetLabelEditPart(view); - case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInCOActAsTargetAppliedStereotypeEditPart(view); - case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: - return new DurationConstraintAsLocalPrecondEditPart(view); - case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return new DurationConstraintAsLocalPrecondNameEditPart(view); - case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return new DurationConstraintAsLocalPrecondBodyEditPart(view); - case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: - return new DurationConstraintAsLocalPostcondEditPart(view); - case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return new DurationConstraintAsLocalPostcondNameEditPart(view); - case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return new DurationConstraintAsLocalPostcondBodyEditPart(view); - case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: - return new TimeConstraintAsLocalPrecondEditPart(view); - case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return new TimeConstraintAsLocalPrecondNameEditPart(view); - case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return new TimeConstraintAsLocalPrecondBodyEditPart(view); - case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: - return new TimeConstraintAsLocalPostcondEditPart(view); - case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return new TimeConstraintAsLocalPostcondNameEditPart(view); - case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return new TimeConstraintAsLocalPostcondBodyEditPart(view); - case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: - return new IntervalConstraintAsLocalPrecondEditPart(view); - case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return new IntervalConstraintAsLocalPrecondNameEditPart(view); - case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return new IntervalConstraintAsLocalPrecondBodyEditPart(view); - case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: - return new IntervalConstraintAsLocalPostcondEditPart(view); - case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return new IntervalConstraintAsLocalPostcondNameEditPart(view); - case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return new IntervalConstraintAsLocalPostcondBodyEditPart(view); - case ConstraintAsLocalPrecondEditPart.VISUAL_ID: - return new ConstraintAsLocalPrecondEditPart(view); - case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return new ConstraintAsLocalPrecondNameEditPart(view); - case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return new ConstraintAsLocalPrecondBodyEditPart(view); - case ConstraintAsLocalPostcondEditPart.VISUAL_ID: - return new ConstraintAsLocalPostcondEditPart(view); - case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return new ConstraintAsLocalPostcondNameEditPart(view); - case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return new ConstraintAsLocalPostcondBodyEditPart(view); - case DecisionNodeEditPart.VISUAL_ID: - return new DecisionNodeEditPart(view); - case DecisionInputEditPart.VISUAL_ID: - return new DecisionInputEditPart(view); - case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID: - return new DecisionNodeAppliedStereotypeEditPart(view); - case MergeNodeEditPart.VISUAL_ID: - return new MergeNodeEditPart(view); - case MergeNodeAppliedStereotypeEditPart.VISUAL_ID: - return new MergeNodeAppliedStereotypeEditPart(view); - case ForkNodeEditPart.VISUAL_ID: - return new ForkNodeEditPart(view); - case ForkNodeAppliedStereotypeEditPart.VISUAL_ID: - return new ForkNodeAppliedStereotypeEditPart(view); - case JoinNodeEditPart.VISUAL_ID: - return new JoinNodeEditPart(view); - case JoinSpecEditPart.VISUAL_ID: - return new JoinSpecEditPart(view); - case JoinNodeAppliedStereotypeEditPart.VISUAL_ID: - return new JoinNodeAppliedStereotypeEditPart(view); - case DataStoreNodeEditPart.VISUAL_ID: - return new DataStoreNodeEditPart(view); - case DataStoreNodeLabelEditPart.VISUAL_ID: - return new DataStoreNodeLabelEditPart(view); - case DataStoreSelectionEditPart.VISUAL_ID: - return new DataStoreSelectionEditPart(view); - case SendObjectActionEditPart.VISUAL_ID: - return new SendObjectActionEditPart(view); - case SendObjectActionNameEditPart.VISUAL_ID: - return new SendObjectActionNameEditPart(view); - case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsReqEditPart(view); - case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsReqLabelEditPart(view); - case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsReqValueEditPart(view); - case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsReqAppliedStereotypeEditPart(view); - case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsReqEditPart(view); - case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsReqLabelEditPart(view); - case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsReqValueEditPart(view); - case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart(view); - case InputPinInSendObjActAsReqEditPart.VISUAL_ID: - return new InputPinInSendObjActAsReqEditPart(view); - case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: - return new InputPinInSendObjActAsReqLabelEditPart(view); - case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInSendObjActAsReqAppliedStereotypeEditPart(view); - case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsTargetEditPart(view); - case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsTargetLabelEditPart(view); - case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsTargetValueEditPart(view); - case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInSendObjActAsTargetAppliedStereotypeEditPart(view); - case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsTargetEditPart(view); - case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsTargetLabelEditPart(view); - case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsTargetValueEditPart(view); - case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart(view); - case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: - return new InputPinInSendObjActAsTargetEditPart(view); - case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: - return new InputPinInSendObjActAsTargetLabelEditPart(view); - case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInSendObjActAsTargetAppliedStereotypeEditPart(view); - case SendSignalActionEditPart.VISUAL_ID: - return new SendSignalActionEditPart(view); - case SendSignalActionNameEditPart.VISUAL_ID: - return new SendSignalActionNameEditPart(view); - case ActionInputPinInSendSigActEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActEditPart(view); - case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActLabelEditPart(view); - case ActionInputPinInSendSigActValueEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActValueEditPart(view); - case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActAppliedStereotypeEditPart(view); - case ValuePinInSendSigActEditPart.VISUAL_ID: - return new ValuePinInSendSigActEditPart(view); - case ValuePinInSendSigActLabelEditPart.VISUAL_ID: - return new ValuePinInSendSigActLabelEditPart(view); - case ValuePinInSendSigActValueEditPart.VISUAL_ID: - return new ValuePinInSendSigActValueEditPart(view); - case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInSendSigActAppliedStereotypeEditPart(view); - case InputPinInSendSigActEditPart.VISUAL_ID: - return new InputPinInSendSigActEditPart(view); - case InputPinInSendSigActLabelEditPart.VISUAL_ID: - return new InputPinInSendSigActLabelEditPart(view); - case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInSendSigActAppliedStereotypeEditPart(view); - case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: - return new ValuePinInSendSigActAsTargetEditPart(view); - case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID: - return new ValuePinInSendSigActAsTargetLabelEditPart(view); - case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID: - return new ValuePinInSendSigActAsTargetValueEditPart(view); - case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new ValuePinInSendSigActAsTargetAppliedStereotypeEditPart(view); - case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActAsTargetEditPart(view); - case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActAsTargetLabelEditPart(view); - case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActAsTargetValueEditPart(view); - case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart(view); - case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: - return new InputPinInSendSigActAsTargetEditPart(view); - case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: - return new InputPinInSendSigActAsTargetLabelEditPart(view); - case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInSendSigActAsTargetAppliedStereotypeEditPart(view); - case ActivityParameterNodeEditPart.VISUAL_ID: - return new ActivityParameterNodeEditPart(view); - case ParameterNodeNameEditPart.VISUAL_ID: - return new ParameterNodeNameEditPart(view); - case AcceptEventActionEditPart.VISUAL_ID: - return new AcceptEventActionEditPart(view); - case AcceptEventActionLabelEditPart.VISUAL_ID: - return new AcceptEventActionLabelEditPart(view); - case AcceptTimeEventActionLabelEditPart.VISUAL_ID: - return new AcceptTimeEventActionLabelEditPart(view); - case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID: - return new AcceptTimeEventActionAppliedStereotypeEditPart(view); - case OutputPinInAcceptEventActionEditPart.VISUAL_ID: - return new OutputPinInAcceptEventActionEditPart(view); - case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID: - return new OutputPinInAcceptEventActionLabelEditPart(view); - case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInAcceptEventActionAppliedStereotypeEditPart(view); - case ValueSpecificationActionEditPart.VISUAL_ID: - return new ValueSpecificationActionEditPart(view); - case ValueSpecificationActionNameEditPart.VISUAL_ID: - return new ValueSpecificationActionNameEditPart(view); - case OutputPinInValSpecActEditPart.VISUAL_ID: - return new OutputPinInValSpecActEditPart(view); - case OutputPinInValSpecActLabelEditPart.VISUAL_ID: - return new OutputPinInValSpecActLabelEditPart(view); - case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInValSpecActAppliedStereotypeEditPart(view); - case ConditionalNodeEditPart.VISUAL_ID: - return new ConditionalNodeEditPart(view); - case ConditionalNodeKeywordEditPart.VISUAL_ID: - return new ConditionalNodeKeywordEditPart(view); - case ExpansionRegionEditPart.VISUAL_ID: - return new ExpansionRegionEditPart(view); - case ExpansionRegionKeywordEditPart.VISUAL_ID: - return new ExpansionRegionKeywordEditPart(view); - case ExpansionNodeAsInEditPart.VISUAL_ID: - return new ExpansionNodeAsInEditPart(view); - case ExpansionNodeAsOutEditPart.VISUAL_ID: - return new ExpansionNodeAsOutEditPart(view); - case LoopNodeEditPart.VISUAL_ID: - return new LoopNodeEditPart(view); - case LoopNodeKeywordEditPart.VISUAL_ID: - return new LoopNodeKeywordEditPart(view); - case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsBodyOutputEditPart(view); - case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsBodyOutputLabelEditPart(view); - case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart(view); - case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsLoopVariableEditPart(view); - case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsLoopVariableLabelEditPart(view); - case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart(view); - case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsResultEditPart(view); - case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsResultLabelEditPart(view); - case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInLoopNodeAsResultAppliedStereotypeEditPart(view); - case SequenceNodeEditPart.VISUAL_ID: - return new SequenceNodeEditPart(view); - case SequenceNodeKeywordEditPart.VISUAL_ID: - return new SequenceNodeKeywordEditPart(view); - case StructuredActivityNodeEditPart.VISUAL_ID: - return new StructuredActivityNodeEditPart(view); - case StructuredActivityNodeKeywordEditPart.VISUAL_ID: - return new StructuredActivityNodeKeywordEditPart(view); - case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: - return new InputPinInLoopNodeAsVariableEditPart(view); - case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID: - return new InputPinInLoopNodeAsVariableLabelEditPart(view); - case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID: - return new InputPinInStructuredActivityNodeAppliedStereotypeEditPart(view); - case ActivityPartitionEditPart.VISUAL_ID: - return new ActivityPartitionEditPart(view); - case ActivityPartitionNameEditPart.VISUAL_ID: - return new ActivityPartitionNameEditPart(view); - case InterruptibleActivityRegionEditPart.VISUAL_ID: - return new InterruptibleActivityRegionEditPart(view); - case CommentEditPartCN.VISUAL_ID: - return new CommentEditPartCN(view); - case CommentBodyLabelEditPart.VISUAL_ID: - return new CommentBodyLabelEditPart(view); - case ReadSelfActionEditPart.VISUAL_ID: - return new ReadSelfActionEditPart(view); - case ReadSelfActionNameEditPart.VISUAL_ID: - return new ReadSelfActionNameEditPart(view); - case ReadSelfActionOutputPinEditPart.VISUAL_ID: - return new ReadSelfActionOutputPinEditPart(view); - case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID: - return new OutputPinInReadSelfActionLabelEditPart(view); - case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID: - return new OutputPinInReadSelfActionAppliedStereotypeEditPart(view); - case ActivityEditPartCN.VISUAL_ID: - return new ActivityEditPartCN(view); - case ActivityNameEditPartCN.VISUAL_ID: - return new ActivityNameEditPartCN(view); - case ActivityIsSingleExecutionCNEditPart.VISUAL_ID: - return new ActivityIsSingleExecutionCNEditPart(view); - case CreateObjectActionEditPart.VISUAL_ID: - return new CreateObjectActionEditPart(view); - case CreateObjectActionNameEditPart.VISUAL_ID: - return new CreateObjectActionNameEditPart(view); - case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: - return new OutputPinInCreateObjectActionAsResultEditPart(view); - case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID: - return new OutputPinInCreateObjectActionAsResultLabelEditPart(view); - case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart(view); - case ShapeNamedElementEditPart.VISUAL_ID: - return new ShapeNamedElementEditPart(view); - case ShapeNamedElementNameEditPart.VISUAL_ID: - return new ShapeNamedElementNameEditPart(view); - case ReadStructuralFeatureActionEditPart.VISUAL_ID: - return new ReadStructuralFeatureActionEditPart(view); - case ReadStructuralFeatureActionNameEditPart.VISUAL_ID: - return new ReadStructuralFeatureActionNameEditPart(view); - case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: - return new InputPinInReadStructuralFeatureAsObjectEditPart(view); - case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID: - return new InputPinInReadStructuralFeatureAsObjectLabelEditPart(view); - case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart(view); - case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: - return new OutputPinInReadStructuralFeatureAsResultEditPart(view); - case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID: - return new OutputPinInReadStructuralFeatureAsResultLabelEditPart(view); - case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID: - return new InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart(view); - case AddStructuralFeatureValueActionEditPart.VISUAL_ID: - return new AddStructuralFeatureValueActionEditPart(view); - case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID: - return new AddStructuralFeatureValueActionNameEditPart(view); - case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: - return new InputPinInAddStructuralFeatureValueActionAsObjectEditPart(view); - case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID: - return new InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart(view); - case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart(view); - case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: - return new InputPinInAddStructuralFeatureValueActionAsValueEditPart(view); - case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID: - return new InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart(view); - case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID: - return new InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart(view); - case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: - return new OutputPinInAddStructuralFeatureValueActionAsResultEditPart(view); - case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID: - return new OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart(view); - case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID: - return new OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart(view); - case DestroyObjectActionEditPart.VISUAL_ID: - return new DestroyObjectActionEditPart(view); - case DestroyObjectActionNameEditPart.VISUAL_ID: - return new DestroyObjectActionNameEditPart(view); - case InputPinInDestroyObjectActionEditPart.VISUAL_ID: - return new InputPinInDestroyObjectActionEditPart(view); - case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID: - return new InputPinInDestroyObjectActionLabelEditPart(view); - case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart(view); - case ReadVariableActionEditPart.VISUAL_ID: - return new ReadVariableActionEditPart(view); - case ReadVariableActionNameEditPart.VISUAL_ID: - return new ReadVariableActionNameEditPart(view); - case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: - return new OutputPinInReadVariableActionAsResultEditPart(view); - case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID: - return new OutputPinInReadVariableActionAsResultLabelEditPart(view); - case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart(view); - case AddVariableValueActionEditPart.VISUAL_ID: - return new AddVariableValueActionEditPart(view); - case AddVariableValueActionNameEditPart.VISUAL_ID: - return new AddVariableValueActionNameEditPart(view); - case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: - return new InputPinInAddVariableValueActionAsInsertAtEditPart(view); - case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID: - return new InputPinInAddVariableValueActionAsInsertAtLabelEditPart(view); - case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart(view); - case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: - return new InputPinInAddVariableValueActionAsValueEditPart(view); - case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID: - return new InputPinInAddVariableValueActionAsValueLabelEditPart(view); - case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart(view); - case BroadcastSignalActionEditPart.VISUAL_ID: - return new BroadcastSignalActionEditPart(view); - case BroadcastSignalActionNameEditPart.VISUAL_ID: - return new BroadcastSignalActionNameEditPart(view); - case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: - return new InputPinInBroadcastSignalActionEditPart(view); - case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID: - return new InputPinInBroadcastSignalActionLabelEditPart(view); - case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID: - return new InputPinInBroadcastSignalActionValueLabelEditPart(view); - case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return new InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart(view); - case CentralBufferNodeEditPart.VISUAL_ID: - return new CentralBufferNodeEditPart(view); - case CentralBufferNodeLabelEditPart.VISUAL_ID: - return new CentralBufferNodeLabelEditPart(view); - case CentralBufferNodeSelectionEditPart.VISUAL_ID: - return new CentralBufferNodeSelectionEditPart(view); - case ConstraintEditPartCN.VISUAL_ID: - return new ConstraintEditPartCN(view); - case ConstraintNameEditPartCN.VISUAL_ID: - return new ConstraintNameEditPartCN(view); - case ConstraintBodyEditPartCN.VISUAL_ID: - return new ConstraintBodyEditPartCN(view); - case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: - return new ActivityActivityParametersCompartmentEditPart(view); - case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: - return new ActivityActivityPreConditionsCompartmentEditPart(view); - case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: - return new ActivityActivityPostConditionsCompartmentEditPart(view); - case ActivityActivityContentCompartmentEditPart.VISUAL_ID: - return new ActivityActivityContentCompartmentEditPart(view); - case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - return new ConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view); - case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - return new ExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view); - case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - return new LoopNodeStructuredActivityNodeContentCompartmentEditPart(view); - case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - return new SequenceNodeStructuredActivityNodeContentCompartmentEditPart(view); - case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - return new StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view); - case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: - return new ActivityPartitionActivityPartitionContentCompartmentEditPart(view); - case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: - return new InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view); - case ActivityCNParametersCompartmentEditPart.VISUAL_ID: - return new ActivityCNParametersCompartmentEditPart(view); - case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: - return new ActivityCNPreConditionsCompartmentEditPart(view); - case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: - return new ActivityCNPostConditionsCompartmentEditPart(view); - case ActivityCNContentCompartmentEditPart.VISUAL_ID: - return new ActivityCNContentCompartmentEditPart(view); - case ActionLocalPreconditionEditPart.VISUAL_ID: - return new ActionLocalPreconditionEditPart(view); - case ActionLocalPostconditionEditPart.VISUAL_ID: - return new ActionLocalPostconditionEditPart(view); - case ObjectFlowEditPart.VISUAL_ID: - return new ObjectFlowEditPart(view); - case ObjectFlowNameEditPart.VISUAL_ID: - return new ObjectFlowNameEditPart(view); - case ObjectFlowWeightEditPart.VISUAL_ID: - return new ObjectFlowWeightEditPart(view); - case ObjectFlowSelectionEditPart.VISUAL_ID: - return new ObjectFlowSelectionEditPart(view); - case ObjectFlowTransformationEditPart.VISUAL_ID: - return new ObjectFlowTransformationEditPart(view); - case DecisionInputFlowEditPart.VISUAL_ID: - return new DecisionInputFlowEditPart(view); - case ObjectFlowGuardEditPart.VISUAL_ID: - return new ObjectFlowGuardEditPart(view); - case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID: - return new ObjectFlowAppliedStereotypeEditPart(view); - case ObjectFlowInterruptibleIconEditPart.VISUAL_ID: - return new ObjectFlowInterruptibleIconEditPart(view); - case ControlFlowEditPart.VISUAL_ID: - return new ControlFlowEditPart(view); - case ControlFlowNameEditPart.VISUAL_ID: - return new ControlFlowNameEditPart(view); - case ControlFlowWeightEditPart.VISUAL_ID: - return new ControlFlowWeightEditPart(view); - case ControlFlowGuardEditPart.VISUAL_ID: - return new ControlFlowGuardEditPart(view); - case ControlFlowAppliedStereotypeEditPart.VISUAL_ID: - return new ControlFlowAppliedStereotypeEditPart(view); - case ControlFlowInterruptibleIconEditPart.VISUAL_ID: - return new ControlFlowInterruptibleIconEditPart(view); - case ExceptionHandlerEditPart.VISUAL_ID: - return new ExceptionHandlerEditPart(view); - case ExceptionHandlerTypeEditPart.VISUAL_ID: - return new ExceptionHandlerTypeEditPart(view); - case ExceptionHandlerIconEditPart.VISUAL_ID: - return new ExceptionHandlerIconEditPart(view); - case CommentLinkEditPart.VISUAL_ID: - return new CommentLinkEditPart(view); - case ConstraintConstrainedElementEditPart.VISUAL_ID: - return new ConstraintConstrainedElementEditPart(view); - } - } - return createUnrecognizedEditPart(context, model); - } - - /** - * @generated - */ - private EditPart createUnrecognizedEditPart(EditPart context, Object model) { - // Handle creation of unrecognized child node EditParts here - return null; - } - - /** - * @generated NOT handle LinkAndCornerBentWithTextFigure - */ - public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) { - if (source.getFigure() instanceof IMultilineEditableFigure) { - return new MultilineCellEditorLocator((IMultilineEditableFigure) source.getFigure()); - } else if (source.getFigure() instanceof WrappingLabel) { - return new TextCellEditorLocator((WrappingLabel) source.getFigure()); - } else if (source.getFigure() instanceof DecisionInputEditPart.LinkAndCornerBentWithTextFigure) { - return new TextCellEditorLocator(((DecisionInputEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent()); - } else if (source.getFigure() instanceof ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) { - return new TextCellEditorLocator(((ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent()); - } else if (source.getFigure() instanceof ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) { - return new TextCellEditorLocator(((ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent()); - } else { - return new LabelCellEditorLocator((Label) source.getFigure()); - } - } - - /** - * @generated - */ - static private class MultilineCellEditorLocator implements CellEditorLocator { - - /** - * @generated - */ - private IMultilineEditableFigure multilineEditableFigure; - - /** - * @generated - */ - public MultilineCellEditorLocator(IMultilineEditableFigure figure) { - this.multilineEditableFigure = figure; - } - - /** - * @generated - */ - public IMultilineEditableFigure getMultilineEditableFigure() { - return multilineEditableFigure; - } - - /** - * @generated - */ - @Override - public void relocate(CellEditor celleditor) { - Text text = (Text) celleditor.getControl(); - Rectangle rect = getMultilineEditableFigure().getBounds().getCopy(); - rect.x = getMultilineEditableFigure().getEditionLocation().x; - rect.y = getMultilineEditableFigure().getEditionLocation().y; - getMultilineEditableFigure().translateToAbsolute(rect); - if (getMultilineEditableFigure().getText().length() > 0) { - rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT))); - } - if (!rect.equals(new Rectangle(text.getBounds()))) { - text.setBounds(rect.x, rect.y, rect.width, rect.height); - } - } - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPartFactory; +import org.eclipse.gef.tools.CellEditorLocator; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.directedit.locator.LabelCellEditorLocator; +import org.eclipse.gmf.tooling.runtime.directedit.locator.TextCellEditorLocator; +import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Text; + +/** + * @generated + */ +public class UMLEditPartFactory implements EditPartFactory { + + /** + * @generated + */ + @Override + public EditPart createEditPart(EditPart context, Object model) { + if (model instanceof View) { + View view = (View) model; + switch (UMLVisualIDRegistry.getVisualID(view)) { + case ActivityDiagramEditPart.VISUAL_ID: + return new ActivityDiagramEditPart(view); + case ActivityEditPart.VISUAL_ID: + return new ActivityEditPart(view); + case ActivityNameEditPart.VISUAL_ID: + return new ActivityNameEditPart(view); + case ActivityIsSingleExecutionEditPart.VISUAL_ID: + return new ActivityIsSingleExecutionEditPart(view); + case ParameterEditPart.VISUAL_ID: + return new ParameterEditPart(view); + case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: + return new ConstraintInActivityAsPrecondEditPart(view); + case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: + return new ConstraintInActivityAsPostcondEditPart(view); + case InitialNodeEditPart.VISUAL_ID: + return new InitialNodeEditPart(view); + case InitialNodeAppliedStereotypeEditPart.VISUAL_ID: + return new InitialNodeAppliedStereotypeEditPart(view); + case ActivityFinalNodeEditPart.VISUAL_ID: + return new ActivityFinalNodeEditPart(view); + case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID: + return new ActivityFinalNodeAppliedStereotypeEditPart(view); + case FlowFinalNodeEditPart.VISUAL_ID: + return new FlowFinalNodeEditPart(view); + case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID: + return new FlowFinalNodeAppliedStereotypeEditPart(view); + case OpaqueActionEditPart.VISUAL_ID: + return new OpaqueActionEditPart(view); + case OpaqueActionNameEditPart.VISUAL_ID: + return new OpaqueActionNameEditPart(view); + case ValuePinInOpaqueActEditPart.VISUAL_ID: + return new ValuePinInOpaqueActEditPart(view); + case ValuePinInOActLabelEditPart.VISUAL_ID: + return new ValuePinInOActLabelEditPart(view); + case ValuePinInOActValueEditPart.VISUAL_ID: + return new ValuePinInOActValueEditPart(view); + case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInOActAppliedStereotypeEditPart(view); + case ActionInputPinInOpaqueActEditPart.VISUAL_ID: + return new ActionInputPinInOpaqueActEditPart(view); + case ActionInputPinInOActLabelEditPart.VISUAL_ID: + return new ActionInputPinInOActLabelEditPart(view); + case ActionInputPinInOActValueEditPart.VISUAL_ID: + return new ActionInputPinInOActValueEditPart(view); + case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInOActAppliedStereotypeEditPart(view); + case InputPinInOpaqueActEditPart.VISUAL_ID: + return new InputPinInOpaqueActEditPart(view); + case InputPinInOActLabelEditPart.VISUAL_ID: + return new InputPinInOActLabelEditPart(view); + case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInOActAppliedStereotypeEditPart(view); + case OutputPinInOpaqueActEditPart.VISUAL_ID: + return new OutputPinInOpaqueActEditPart(view); + case OutputPinInOActLabelEditPart.VISUAL_ID: + return new OutputPinInOActLabelEditPart(view); + case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInOActAppliedStereotypeEditPart(view); + case CallBehaviorActionEditPart.VISUAL_ID: + return new CallBehaviorActionEditPart(view); + case CallBehaviorActionNameEditPart.VISUAL_ID: + return new CallBehaviorActionNameEditPart(view); + case ValuePinInCallBeActEditPart.VISUAL_ID: + return new ValuePinInCallBeActEditPart(view); + case ValuePinInCBActLabelEditPart.VISUAL_ID: + return new ValuePinInCBActLabelEditPart(view); + case ValuePinInCBActValueEditPart.VISUAL_ID: + return new ValuePinInCBActValueEditPart(view); + case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInCBActAppliedStereotypeEditPart(view); + case ActionInputPinInCallBeActEditPart.VISUAL_ID: + return new ActionInputPinInCallBeActEditPart(view); + case ActionInputPinInCBActLabelEditPart.VISUAL_ID: + return new ActionInputPinInCBActLabelEditPart(view); + case ActionInputPinInCBActValueEditPart.VISUAL_ID: + return new ActionInputPinInCBActValueEditPart(view); + case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInCBActAppliedStereotypeEditPart(view); + case InputPinInCallBeActEditPart.VISUAL_ID: + return new InputPinInCallBeActEditPart(view); + case InputPinInCBActLabelEditPart.VISUAL_ID: + return new InputPinInCBActLabelEditPart(view); + case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInCBActAppliedStereotypeEditPart(view); + case OutputPinInCallBeActEditPart.VISUAL_ID: + return new OutputPinInCallBeActEditPart(view); + case OutputPinInCBActLabelEditPart.VISUAL_ID: + return new OutputPinInCBActLabelEditPart(view); + case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInCBActAppliedStereotypeEditPart(view); + case CallOperationActionEditPart.VISUAL_ID: + return new CallOperationActionEditPart(view); + case CallOperationActionNameEditPart.VISUAL_ID: + return new CallOperationActionNameEditPart(view); + case ActionInputPinInCallOpActEditPart.VISUAL_ID: + return new ActionInputPinInCallOpActEditPart(view); + case ActionInputPinInCOActLabelEditPart.VISUAL_ID: + return new ActionInputPinInCOActLabelEditPart(view); + case ActionInputPinInCOActValueEditPart.VISUAL_ID: + return new ActionInputPinInCOActValueEditPart(view); + case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInCOActAppliedStereotypeEditPart(view); + case ValuePinInCallOpActEditPart.VISUAL_ID: + return new ValuePinInCallOpActEditPart(view); + case ValuePinInCOActLabelEditPart.VISUAL_ID: + return new ValuePinInCOActLabelEditPart(view); + case ValuePinInCOActValueEditPart.VISUAL_ID: + return new ValuePinInCOActValueEditPart(view); + case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInCOActAppliedStereotypeEditPart(view); + case InputPinInCallOpActEditPart.VISUAL_ID: + return new InputPinInCallOpActEditPart(view); + case InputPinInCOActLabelEditPart.VISUAL_ID: + return new InputPinInCOActLabelEditPart(view); + case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInCOActAppliedStereotypeEditPart(view); + case OutputPinInCallOpActEditPart.VISUAL_ID: + return new OutputPinInCallOpActEditPart(view); + case OutputPinInCOActLabelEditPart.VISUAL_ID: + return new OutputPinInCOActLabelEditPart(view); + case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInCOActAppliedStereotypeEditPart(view); + case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: + return new ValuePinInCallOpActAsTargetEditPart(view); + case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID: + return new ValuePinInCOActAsTargetLabelEditPart(view); + case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID: + return new ValuePinInCOActAsTargetValueEditPart(view); + case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInCOActAsTargetAppliedStereotypeEditPart(view); + case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: + return new ActionInputPinInCallOpActAsTargetEditPart(view); + case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID: + return new ActionInputPinInCOActAsTargetLabelEditPart(view); + case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID: + return new ActionInputPinInCOActAsTargetValueEditPart(view); + case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInCOActAsTargetAppliedStereotypeEditPart(view); + case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: + return new InputPinInCallOpActAsTargetEditPart(view); + case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID: + return new InputPinInCOActAsTargetLabelEditPart(view); + case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInCOActAsTargetAppliedStereotypeEditPart(view); + case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: + return new DurationConstraintAsLocalPrecondEditPart(view); + case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return new DurationConstraintAsLocalPrecondNameEditPart(view); + case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return new DurationConstraintAsLocalPrecondBodyEditPart(view); + case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: + return new DurationConstraintAsLocalPostcondEditPart(view); + case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return new DurationConstraintAsLocalPostcondNameEditPart(view); + case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return new DurationConstraintAsLocalPostcondBodyEditPart(view); + case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: + return new TimeConstraintAsLocalPrecondEditPart(view); + case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return new TimeConstraintAsLocalPrecondNameEditPart(view); + case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return new TimeConstraintAsLocalPrecondBodyEditPart(view); + case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: + return new TimeConstraintAsLocalPostcondEditPart(view); + case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return new TimeConstraintAsLocalPostcondNameEditPart(view); + case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return new TimeConstraintAsLocalPostcondBodyEditPart(view); + case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: + return new IntervalConstraintAsLocalPrecondEditPart(view); + case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return new IntervalConstraintAsLocalPrecondNameEditPart(view); + case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return new IntervalConstraintAsLocalPrecondBodyEditPart(view); + case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: + return new IntervalConstraintAsLocalPostcondEditPart(view); + case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return new IntervalConstraintAsLocalPostcondNameEditPart(view); + case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return new IntervalConstraintAsLocalPostcondBodyEditPart(view); + case ConstraintAsLocalPrecondEditPart.VISUAL_ID: + return new ConstraintAsLocalPrecondEditPart(view); + case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return new ConstraintAsLocalPrecondNameEditPart(view); + case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return new ConstraintAsLocalPrecondBodyEditPart(view); + case ConstraintAsLocalPostcondEditPart.VISUAL_ID: + return new ConstraintAsLocalPostcondEditPart(view); + case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return new ConstraintAsLocalPostcondNameEditPart(view); + case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return new ConstraintAsLocalPostcondBodyEditPart(view); + case DecisionNodeEditPart.VISUAL_ID: + return new DecisionNodeEditPart(view); + case DecisionInputEditPart.VISUAL_ID: + return new DecisionInputEditPart(view); + case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID: + return new DecisionNodeAppliedStereotypeEditPart(view); + case MergeNodeEditPart.VISUAL_ID: + return new MergeNodeEditPart(view); + case MergeNodeAppliedStereotypeEditPart.VISUAL_ID: + return new MergeNodeAppliedStereotypeEditPart(view); + case ForkNodeEditPart.VISUAL_ID: + return new ForkNodeEditPart(view); + case ForkNodeAppliedStereotypeEditPart.VISUAL_ID: + return new ForkNodeAppliedStereotypeEditPart(view); + case JoinNodeEditPart.VISUAL_ID: + return new JoinNodeEditPart(view); + case JoinSpecEditPart.VISUAL_ID: + return new JoinSpecEditPart(view); + case JoinNodeAppliedStereotypeEditPart.VISUAL_ID: + return new JoinNodeAppliedStereotypeEditPart(view); + case DataStoreNodeEditPart.VISUAL_ID: + return new DataStoreNodeEditPart(view); + case DataStoreNodeLabelEditPart.VISUAL_ID: + return new DataStoreNodeLabelEditPart(view); + case DataStoreSelectionEditPart.VISUAL_ID: + return new DataStoreSelectionEditPart(view); + case SendObjectActionEditPart.VISUAL_ID: + return new SendObjectActionEditPart(view); + case SendObjectActionNameEditPart.VISUAL_ID: + return new SendObjectActionNameEditPart(view); + case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsReqEditPart(view); + case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsReqLabelEditPart(view); + case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsReqValueEditPart(view); + case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsReqAppliedStereotypeEditPart(view); + case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsReqEditPart(view); + case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsReqLabelEditPart(view); + case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsReqValueEditPart(view); + case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart(view); + case InputPinInSendObjActAsReqEditPart.VISUAL_ID: + return new InputPinInSendObjActAsReqEditPart(view); + case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: + return new InputPinInSendObjActAsReqLabelEditPart(view); + case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInSendObjActAsReqAppliedStereotypeEditPart(view); + case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsTargetEditPart(view); + case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsTargetLabelEditPart(view); + case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsTargetValueEditPart(view); + case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInSendObjActAsTargetAppliedStereotypeEditPart(view); + case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsTargetEditPart(view); + case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsTargetLabelEditPart(view); + case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsTargetValueEditPart(view); + case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart(view); + case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: + return new InputPinInSendObjActAsTargetEditPart(view); + case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: + return new InputPinInSendObjActAsTargetLabelEditPart(view); + case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInSendObjActAsTargetAppliedStereotypeEditPart(view); + case SendSignalActionEditPart.VISUAL_ID: + return new SendSignalActionEditPart(view); + case SendSignalActionNameEditPart.VISUAL_ID: + return new SendSignalActionNameEditPart(view); + case ActionInputPinInSendSigActEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActEditPart(view); + case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActLabelEditPart(view); + case ActionInputPinInSendSigActValueEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActValueEditPart(view); + case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActAppliedStereotypeEditPart(view); + case ValuePinInSendSigActEditPart.VISUAL_ID: + return new ValuePinInSendSigActEditPart(view); + case ValuePinInSendSigActLabelEditPart.VISUAL_ID: + return new ValuePinInSendSigActLabelEditPart(view); + case ValuePinInSendSigActValueEditPart.VISUAL_ID: + return new ValuePinInSendSigActValueEditPart(view); + case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInSendSigActAppliedStereotypeEditPart(view); + case InputPinInSendSigActEditPart.VISUAL_ID: + return new InputPinInSendSigActEditPart(view); + case InputPinInSendSigActLabelEditPart.VISUAL_ID: + return new InputPinInSendSigActLabelEditPart(view); + case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInSendSigActAppliedStereotypeEditPart(view); + case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: + return new ValuePinInSendSigActAsTargetEditPart(view); + case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID: + return new ValuePinInSendSigActAsTargetLabelEditPart(view); + case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID: + return new ValuePinInSendSigActAsTargetValueEditPart(view); + case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new ValuePinInSendSigActAsTargetAppliedStereotypeEditPart(view); + case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActAsTargetEditPart(view); + case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActAsTargetLabelEditPart(view); + case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActAsTargetValueEditPart(view); + case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart(view); + case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: + return new InputPinInSendSigActAsTargetEditPart(view); + case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: + return new InputPinInSendSigActAsTargetLabelEditPart(view); + case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInSendSigActAsTargetAppliedStereotypeEditPart(view); + case ActivityParameterNodeEditPart.VISUAL_ID: + return new ActivityParameterNodeEditPart(view); + case ParameterNodeNameEditPart.VISUAL_ID: + return new ParameterNodeNameEditPart(view); + case AcceptEventActionEditPart.VISUAL_ID: + return new AcceptEventActionEditPart(view); + case AcceptEventActionLabelEditPart.VISUAL_ID: + return new AcceptEventActionLabelEditPart(view); + case AcceptTimeEventActionLabelEditPart.VISUAL_ID: + return new AcceptTimeEventActionLabelEditPart(view); + case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID: + return new AcceptTimeEventActionAppliedStereotypeEditPart(view); + case OutputPinInAcceptEventActionEditPart.VISUAL_ID: + return new OutputPinInAcceptEventActionEditPart(view); + case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID: + return new OutputPinInAcceptEventActionLabelEditPart(view); + case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInAcceptEventActionAppliedStereotypeEditPart(view); + case ValueSpecificationActionEditPart.VISUAL_ID: + return new ValueSpecificationActionEditPart(view); + case ValueSpecificationActionNameEditPart.VISUAL_ID: + return new ValueSpecificationActionNameEditPart(view); + case OutputPinInValSpecActEditPart.VISUAL_ID: + return new OutputPinInValSpecActEditPart(view); + case OutputPinInValSpecActLabelEditPart.VISUAL_ID: + return new OutputPinInValSpecActLabelEditPart(view); + case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInValSpecActAppliedStereotypeEditPart(view); + case ConditionalNodeEditPart.VISUAL_ID: + return new ConditionalNodeEditPart(view); + case ConditionalNodeKeywordEditPart.VISUAL_ID: + return new ConditionalNodeKeywordEditPart(view); + case ExpansionRegionEditPart.VISUAL_ID: + return new ExpansionRegionEditPart(view); + case ExpansionRegionKeywordEditPart.VISUAL_ID: + return new ExpansionRegionKeywordEditPart(view); + case ExpansionNodeAsInEditPart.VISUAL_ID: + return new ExpansionNodeAsInEditPart(view); + case ExpansionNodeAsOutEditPart.VISUAL_ID: + return new ExpansionNodeAsOutEditPart(view); + case LoopNodeEditPart.VISUAL_ID: + return new LoopNodeEditPart(view); + case LoopNodeKeywordEditPart.VISUAL_ID: + return new LoopNodeKeywordEditPart(view); + case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsBodyOutputEditPart(view); + case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsBodyOutputLabelEditPart(view); + case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart(view); + case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsLoopVariableEditPart(view); + case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsLoopVariableLabelEditPart(view); + case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart(view); + case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsResultEditPart(view); + case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsResultLabelEditPart(view); + case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInLoopNodeAsResultAppliedStereotypeEditPart(view); + case SequenceNodeEditPart.VISUAL_ID: + return new SequenceNodeEditPart(view); + case SequenceNodeKeywordEditPart.VISUAL_ID: + return new SequenceNodeKeywordEditPart(view); + case StructuredActivityNodeEditPart.VISUAL_ID: + return new StructuredActivityNodeEditPart(view); + case StructuredActivityNodeKeywordEditPart.VISUAL_ID: + return new StructuredActivityNodeKeywordEditPart(view); + case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: + return new InputPinInLoopNodeAsVariableEditPart(view); + case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID: + return new InputPinInLoopNodeAsVariableLabelEditPart(view); + case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID: + return new InputPinInStructuredActivityNodeAppliedStereotypeEditPart(view); + case ActivityPartitionEditPart.VISUAL_ID: + return new ActivityPartitionEditPart(view); + case ActivityPartitionNameEditPart.VISUAL_ID: + return new ActivityPartitionNameEditPart(view); + case InterruptibleActivityRegionEditPart.VISUAL_ID: + return new InterruptibleActivityRegionEditPart(view); + case CommentEditPartCN.VISUAL_ID: + return new CommentEditPartCN(view); + case CommentBodyLabelEditPart.VISUAL_ID: + return new CommentBodyLabelEditPart(view); + case ReadSelfActionEditPart.VISUAL_ID: + return new ReadSelfActionEditPart(view); + case ReadSelfActionNameEditPart.VISUAL_ID: + return new ReadSelfActionNameEditPart(view); + case ReadSelfActionOutputPinEditPart.VISUAL_ID: + return new ReadSelfActionOutputPinEditPart(view); + case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID: + return new OutputPinInReadSelfActionLabelEditPart(view); + case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID: + return new OutputPinInReadSelfActionAppliedStereotypeEditPart(view); + case ActivityEditPartCN.VISUAL_ID: + return new ActivityEditPartCN(view); + case ActivityNameEditPartCN.VISUAL_ID: + return new ActivityNameEditPartCN(view); + case ActivityIsSingleExecutionCNEditPart.VISUAL_ID: + return new ActivityIsSingleExecutionCNEditPart(view); + case CreateObjectActionEditPart.VISUAL_ID: + return new CreateObjectActionEditPart(view); + case CreateObjectActionNameEditPart.VISUAL_ID: + return new CreateObjectActionNameEditPart(view); + case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: + return new OutputPinInCreateObjectActionAsResultEditPart(view); + case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID: + return new OutputPinInCreateObjectActionAsResultLabelEditPart(view); + case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart(view); + case ShapeNamedElementEditPart.VISUAL_ID: + return new ShapeNamedElementEditPart(view); + case ShapeNamedElementNameEditPart.VISUAL_ID: + return new ShapeNamedElementNameEditPart(view); + case ReadStructuralFeatureActionEditPart.VISUAL_ID: + return new ReadStructuralFeatureActionEditPart(view); + case ReadStructuralFeatureActionNameEditPart.VISUAL_ID: + return new ReadStructuralFeatureActionNameEditPart(view); + case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: + return new InputPinInReadStructuralFeatureAsObjectEditPart(view); + case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID: + return new InputPinInReadStructuralFeatureAsObjectLabelEditPart(view); + case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart(view); + case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: + return new OutputPinInReadStructuralFeatureAsResultEditPart(view); + case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID: + return new OutputPinInReadStructuralFeatureAsResultLabelEditPart(view); + case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID: + return new InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart(view); + case AddStructuralFeatureValueActionEditPart.VISUAL_ID: + return new AddStructuralFeatureValueActionEditPart(view); + case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID: + return new AddStructuralFeatureValueActionNameEditPart(view); + case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: + return new InputPinInAddStructuralFeatureValueActionAsObjectEditPart(view); + case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID: + return new InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart(view); + case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart(view); + case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: + return new InputPinInAddStructuralFeatureValueActionAsValueEditPart(view); + case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID: + return new InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart(view); + case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID: + return new InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart(view); + case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: + return new OutputPinInAddStructuralFeatureValueActionAsResultEditPart(view); + case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID: + return new OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart(view); + case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID: + return new OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart(view); + case DestroyObjectActionEditPart.VISUAL_ID: + return new DestroyObjectActionEditPart(view); + case DestroyObjectActionNameEditPart.VISUAL_ID: + return new DestroyObjectActionNameEditPart(view); + case InputPinInDestroyObjectActionEditPart.VISUAL_ID: + return new InputPinInDestroyObjectActionEditPart(view); + case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID: + return new InputPinInDestroyObjectActionLabelEditPart(view); + case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart(view); + case ReadVariableActionEditPart.VISUAL_ID: + return new ReadVariableActionEditPart(view); + case ReadVariableActionNameEditPart.VISUAL_ID: + return new ReadVariableActionNameEditPart(view); + case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: + return new OutputPinInReadVariableActionAsResultEditPart(view); + case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID: + return new OutputPinInReadVariableActionAsResultLabelEditPart(view); + case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart(view); + case AddVariableValueActionEditPart.VISUAL_ID: + return new AddVariableValueActionEditPart(view); + case AddVariableValueActionNameEditPart.VISUAL_ID: + return new AddVariableValueActionNameEditPart(view); + case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: + return new InputPinInAddVariableValueActionAsInsertAtEditPart(view); + case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID: + return new InputPinInAddVariableValueActionAsInsertAtLabelEditPart(view); + case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart(view); + case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: + return new InputPinInAddVariableValueActionAsValueEditPart(view); + case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID: + return new InputPinInAddVariableValueActionAsValueLabelEditPart(view); + case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart(view); + case BroadcastSignalActionEditPart.VISUAL_ID: + return new BroadcastSignalActionEditPart(view); + case BroadcastSignalActionNameEditPart.VISUAL_ID: + return new BroadcastSignalActionNameEditPart(view); + case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: + return new InputPinInBroadcastSignalActionEditPart(view); + case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID: + return new InputPinInBroadcastSignalActionLabelEditPart(view); + case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID: + return new InputPinInBroadcastSignalActionValueLabelEditPart(view); + case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return new InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart(view); + case CentralBufferNodeEditPart.VISUAL_ID: + return new CentralBufferNodeEditPart(view); + case CentralBufferNodeLabelEditPart.VISUAL_ID: + return new CentralBufferNodeLabelEditPart(view); + case CentralBufferNodeSelectionEditPart.VISUAL_ID: + return new CentralBufferNodeSelectionEditPart(view); + case ConstraintEditPartCN.VISUAL_ID: + return new ConstraintEditPartCN(view); + case ConstraintNameEditPartCN.VISUAL_ID: + return new ConstraintNameEditPartCN(view); + case ConstraintBodyEditPartCN.VISUAL_ID: + return new ConstraintBodyEditPartCN(view); + case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: + return new ActivityActivityParametersCompartmentEditPart(view); + case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: + return new ActivityActivityPreConditionsCompartmentEditPart(view); + case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: + return new ActivityActivityPostConditionsCompartmentEditPart(view); + case ActivityActivityContentCompartmentEditPart.VISUAL_ID: + return new ActivityActivityContentCompartmentEditPart(view); + case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + return new ConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view); + case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + return new ExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view); + case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + return new LoopNodeStructuredActivityNodeContentCompartmentEditPart(view); + case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + return new SequenceNodeStructuredActivityNodeContentCompartmentEditPart(view); + case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + return new StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view); + case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: + return new ActivityPartitionActivityPartitionContentCompartmentEditPart(view); + case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: + return new InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view); + case ActivityCNParametersCompartmentEditPart.VISUAL_ID: + return new ActivityCNParametersCompartmentEditPart(view); + case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: + return new ActivityCNPreConditionsCompartmentEditPart(view); + case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: + return new ActivityCNPostConditionsCompartmentEditPart(view); + case ActivityCNContentCompartmentEditPart.VISUAL_ID: + return new ActivityCNContentCompartmentEditPart(view); + case ActionLocalPreconditionEditPart.VISUAL_ID: + return new ActionLocalPreconditionEditPart(view); + case ActionLocalPostconditionEditPart.VISUAL_ID: + return new ActionLocalPostconditionEditPart(view); + case ObjectFlowEditPart.VISUAL_ID: + return new ObjectFlowEditPart(view); + case ObjectFlowNameEditPart.VISUAL_ID: + return new ObjectFlowNameEditPart(view); + case ObjectFlowWeightEditPart.VISUAL_ID: + return new ObjectFlowWeightEditPart(view); + case ObjectFlowSelectionEditPart.VISUAL_ID: + return new ObjectFlowSelectionEditPart(view); + case ObjectFlowTransformationEditPart.VISUAL_ID: + return new ObjectFlowTransformationEditPart(view); + case DecisionInputFlowEditPart.VISUAL_ID: + return new DecisionInputFlowEditPart(view); + case ObjectFlowGuardEditPart.VISUAL_ID: + return new ObjectFlowGuardEditPart(view); + case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID: + return new ObjectFlowAppliedStereotypeEditPart(view); + case ObjectFlowInterruptibleIconEditPart.VISUAL_ID: + return new ObjectFlowInterruptibleIconEditPart(view); + case ControlFlowEditPart.VISUAL_ID: + return new ControlFlowEditPart(view); + case ControlFlowNameEditPart.VISUAL_ID: + return new ControlFlowNameEditPart(view); + case ControlFlowWeightEditPart.VISUAL_ID: + return new ControlFlowWeightEditPart(view); + case ControlFlowGuardEditPart.VISUAL_ID: + return new ControlFlowGuardEditPart(view); + case ControlFlowAppliedStereotypeEditPart.VISUAL_ID: + return new ControlFlowAppliedStereotypeEditPart(view); + case ControlFlowInterruptibleIconEditPart.VISUAL_ID: + return new ControlFlowInterruptibleIconEditPart(view); + case ExceptionHandlerEditPart.VISUAL_ID: + return new ExceptionHandlerEditPart(view); + case ExceptionHandlerTypeEditPart.VISUAL_ID: + return new ExceptionHandlerTypeEditPart(view); + case ExceptionHandlerIconEditPart.VISUAL_ID: + return new ExceptionHandlerIconEditPart(view); + case CommentLinkEditPart.VISUAL_ID: + return new CommentLinkEditPart(view); + case ConstraintConstrainedElementEditPart.VISUAL_ID: + return new ConstraintConstrainedElementEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case BroadcastSignalActionFloatingNameEditPart.VISUAL_ID: + return new BroadcastSignalActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case AddVariableValueActionFloatingNameEditPart.VISUAL_ID: + return new AddVariableValueActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case CallBehaviorActionFloatingNameEditPart.VISUAL_ID: + return new CallBehaviorActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID: + return new AddStructuralFeatureValueActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case CallOperationActionFloatingNameEditPart.VISUAL_ID: + return new CallOperationActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case CreateObjectActionFloatingNameEditPart.VISUAL_ID: + return new CreateObjectActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case DestroyObjectActionFloatingNameEditPart.VISUAL_ID: + return new DestroyObjectActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case OpaqueActionFloatingNameEditPart.VISUAL_ID: + return new OpaqueActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case ReadSelfActionFloatingNameEditPart.VISUAL_ID: + return new ReadSelfActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID: + return new ReadStructuralFeatureActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case ReadVariableActionFloatingNameEditPart.VISUAL_ID: + return new ReadVariableActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case SendObjectActionFloatingNameEditPart.VISUAL_ID: + return new SendObjectActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case ValueSpecificationActionFloatingNameEditPart.VISUAL_ID: + return new ValueSpecificationActionFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case CentralBufferNodeFloatingNameEditPart.VISUAL_ID: + return new CentralBufferNodeFloatingNameEditPart(view); + // not generated but changes include on gmfgen, can be override at the generation + case DataStoreNodeFloatingNameEditPart.VISUAL_ID: + return new DataStoreNodeFloatingNameEditPart(view); + + } + } + return createUnrecognizedEditPart(context, model); + } + + /** + * @generated + */ + private EditPart createUnrecognizedEditPart(EditPart context, Object model) { + // Handle creation of unrecognized child node EditParts here + return null; + } + + /** + * @generated NOT handle LinkAndCornerBentWithTextFigure + */ + public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) { + if (source.getFigure() instanceof IMultilineEditableFigure) { + return new MultilineCellEditorLocator((IMultilineEditableFigure) source.getFigure()); + } else if (source.getFigure() instanceof WrappingLabel) { + return new TextCellEditorLocator((WrappingLabel) source.getFigure()); + } else if (source.getFigure() instanceof DecisionInputEditPart.LinkAndCornerBentWithTextFigure) { + return new TextCellEditorLocator(((DecisionInputEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent()); + } else if (source.getFigure() instanceof ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) { + return new TextCellEditorLocator(((ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent()); + } else if (source.getFigure() instanceof ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) { + return new TextCellEditorLocator(((ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent()); + } else { + return new LabelCellEditorLocator((Label) source.getFigure()); + } + } + + /** + * @generated + */ + static private class MultilineCellEditorLocator implements CellEditorLocator { + + /** + * @generated + */ + private IMultilineEditableFigure multilineEditableFigure; + + /** + * @generated + */ + public MultilineCellEditorLocator(IMultilineEditableFigure figure) { + this.multilineEditableFigure = figure; + } + + /** + * @generated + */ + public IMultilineEditableFigure getMultilineEditableFigure() { + return multilineEditableFigure; + } + + /** + * @generated + */ + @Override + public void relocate(CellEditor celleditor) { + Text text = (Text) celleditor.getControl(); + Rectangle rect = getMultilineEditableFigure().getBounds().getCopy(); + rect.x = getMultilineEditableFigure().getEditionLocation().x; + rect.y = getMultilineEditableFigure().getEditionLocation().y; + getMultilineEditableFigure().translateToAbsolute(rect); + if (getMultilineEditableFigure().getText().length() > 0) { + rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT))); + } + if (!rect.equals(new Rectangle(text.getBounds()))) { + text.setBounds(rect.x, rect.y, rect.width, rect.height); + } + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java index 1f919323769..9fae1b0cebc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java @@ -1,1487 +1,1487 @@ -/***************************************************************************** - * Copyright (c) 2010 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.edit.parts; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.PositionConstants; -import org.eclipse.draw2d.StackLayout; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.Request; -import org.eclipse.gef.RequestConstants; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.editpolicies.LayoutEditPolicy; -import org.eclipse.gef.editpolicies.NonResizableEditPolicy; -import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; -import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; -import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.graphics.Color; - -/** - * @generated - */ -public class ValueSpecificationActionEditPart extends NamedElementEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3076; - - /** - * @generated - */ - protected IFigure contentPane; - - /** - * @generated - */ - protected IFigure primaryShape; - - /** - * @generated - */ - public ValueSpecificationActionEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ValueSpecificationActionItemSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - // in Papyrus diagrams are not strongly synchronised - // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); - installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); - installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); - installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); - installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); - installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); - installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ValueSpecificationActionCanonicalEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); - // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); - } - - /** - * Papyrus codeGen - * - * @generated - **/ - @Override - protected void handleNotificationEvent(Notification event) { - super.handleNotificationEvent(event); - } - - /** - * @generated - */ - protected LayoutEditPolicy createLayoutEditPolicy() { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { - - @Override - protected EditPolicy createChildEditPolicy(EditPart child) { - View childView = (View) child.getModel(); - switch (UMLVisualIDRegistry.getVisualID(childView)) { - case OutputPinInValSpecActEditPart.VISUAL_ID: - return new BorderItemResizableEditPolicy(); - } - EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); - if (result == null) { - result = new NonResizableEditPolicy(); - } - return result; - } - - @Override - protected Command getMoveChildrenCommand(Request request) { - return null; - } - - @Override - protected Command getCreateCommand(CreateRequest request) { - return null; - } - }; - return lep; - } - - /** - * @generated - */ - @Override - protected IFigure createNodeShape() { - return primaryShape = new PapyrusRoundedNodeFigure(); - } - - /** - * @generated - */ - @Override - public PapyrusRoundedNodeFigure getPrimaryShape() { - return (PapyrusRoundedNodeFigure) primaryShape; - } - - /** - * @generated - */ - protected boolean addFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ValueSpecificationActionNameEditPart) { - ((ValueSpecificationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); - return true; - } - // Papyrus Gencode :Affixed Pin locator for Actions - if (childEditPart instanceof OutputPinInValSpecActEditPart) { - IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); - getBorderedFigure().getBorderItemContainer().add(((OutputPinInValSpecActEditPart) childEditPart).getFigure(), locator); - return true; - } - return false; - } - - /** - * @generated - */ - protected boolean removeFixedChild(EditPart childEditPart) { - if (childEditPart instanceof ValueSpecificationActionNameEditPart) { - return true; - } - if (childEditPart instanceof OutputPinInValSpecActEditPart) { - getBorderedFigure().getBorderItemContainer().remove(((OutputPinInValSpecActEditPart) childEditPart).getFigure()); - return true; - } - return false; - } - - /** - * @generated - */ - @Override - protected void addChildVisual(EditPart childEditPart, int index) { - if (addFixedChild(childEditPart)) { - return; - } - super.addChildVisual(childEditPart, -1); - } - - /** - * @generated - */ - @Override - protected void removeChildVisual(EditPart childEditPart) { - if (removeFixedChild(childEditPart)) { - return; - } - super.removeChildVisual(childEditPart); - } - - /** - * @generated - */ - @Override - protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { - if (editPart instanceof IBorderItemEditPart) { - return getBorderedFigure().getBorderItemContainer(); - } - return getContentPane(); - } - - /** - * @generated - */ - @Override - protected NodeFigure createNodePlate() { - String prefElementId = "ValueSpecificationAction"; - IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); - String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); - String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); - DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); - return result; - } - - /** - * Creates figure for this edit part. - * - * Body of this method does not depend on settings in generation model - * so you may safely remove generated tag and modify it. - * - * @generated - */ - @Override - protected NodeFigure createMainFigure() { - NodeFigure figure = createNodePlate(); - figure.setLayoutManager(new StackLayout()); - IFigure shape = createNodeShape(); - figure.add(shape); - contentPane = setupContentPane(shape); - return figure; - } - - /** - * Default implementation treats passed figure as content pane. - * Respects layout one may have set for generated figure. - * - * @param nodeShape - * instance of generated figure class - * @generated - */ - @Override - protected IFigure setupContentPane(IFigure nodeShape) { - if (nodeShape.getLayoutManager() == null) { - ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); - layout.setSpacing(5); - nodeShape.setLayoutManager(layout); - } - return nodeShape; // use nodeShape itself as contentPane - } - - /** - * @generated - */ - @Override - public IFigure getContentPane() { - if (contentPane != null) { - return contentPane; - } - return super.getContentPane(); - } - - /** - * @generated - */ - @Override - protected void setForegroundColor(Color color) { - if (primaryShape != null) { - primaryShape.setForegroundColor(color); - } - } - - /** - * @generated - */ - @Override - protected void setLineWidth(int width) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); - } - } - - /** - * @generated - */ - @Override - protected void setLineType(int style) { - if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation - ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); - } - } - - /** - * @generated - */ - @Override - public EditPart getPrimaryChildEditPart() { - return getChildBySemanticHint(UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID)); - } - - /** - * @generated - */ - public List getMARelTypesOnSource() { - ArrayList types = new ArrayList(5); - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.ExceptionHandler_4005); - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { - LinkedList types = new LinkedList(); - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPrecondition_4001); - } - if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof ConstraintEditPartCN) { - types.add(UMLElementTypes.ActionLocalPostcondition_4002); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ObjectFlow_4003); - } - if (targetEditPart instanceof InitialNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof FlowFinalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OpaqueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallBehaviorActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CallOperationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DecisionNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof MergeNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ForkNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof JoinNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SendSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ConditionalNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionRegionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof LoopNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof SequenceNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof StructuredActivityNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CreateObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof DestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ReadVariableActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof AddVariableValueActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof BroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ControlFlow_4004); - } - if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallBeActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCallOpActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof DataStoreNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ActivityParameterNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInValSpecActEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsInEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - if (targetEditPart instanceof CentralBufferNodeEditPart) { - types.add(UMLElementTypes.ExceptionHandler_4005); - } - return types; - } - - /** - * @generated - */ - public List getMATypesForTarget(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } - return types; - } - - /** - * @generated - */ - public List getMARelTypesOnTarget() { - ArrayList types = new ArrayList(4); - types.add(UMLElementTypes.ObjectFlow_4003); - types.add(UMLElementTypes.ControlFlow_4004); - types.add(UMLElementTypes.CommentAnnotatedElement_4006); - types.add(UMLElementTypes.ConstraintConstrainedElement_4007); - return types; - } - - /** - * @generated - */ - public List getMATypesForSource(IElementType relationshipType) { - LinkedList types = new LinkedList(); - if (relationshipType == UMLElementTypes.ObjectFlow_4003) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { - types.add(UMLElementTypes.InitialNode_3004); - types.add(UMLElementTypes.ActivityFinalNode_3005); - types.add(UMLElementTypes.FlowFinalNode_3006); - types.add(UMLElementTypes.OpaqueAction_3007); - types.add(UMLElementTypes.ValuePin_3015); - types.add(UMLElementTypes.ActionInputPin_3016); - types.add(UMLElementTypes.InputPin_3013); - types.add(UMLElementTypes.OutputPin_3014); - types.add(UMLElementTypes.CallBehaviorAction_3008); - types.add(UMLElementTypes.ValuePin_3017); - types.add(UMLElementTypes.ActionInputPin_3018); - types.add(UMLElementTypes.InputPin_3019); - types.add(UMLElementTypes.OutputPin_3020); - types.add(UMLElementTypes.CallOperationAction_3010); - types.add(UMLElementTypes.ActionInputPin_3021); - types.add(UMLElementTypes.ValuePin_3022); - types.add(UMLElementTypes.InputPin_3023); - types.add(UMLElementTypes.OutputPin_3024); - types.add(UMLElementTypes.ValuePin_3025); - types.add(UMLElementTypes.ActionInputPin_3026); - types.add(UMLElementTypes.InputPin_3027); - types.add(UMLElementTypes.DecisionNode_3038); - types.add(UMLElementTypes.MergeNode_3039); - types.add(UMLElementTypes.ForkNode_3040); - types.add(UMLElementTypes.JoinNode_3041); - types.add(UMLElementTypes.DataStoreNode_3078); - types.add(UMLElementTypes.SendObjectAction_3042); - types.add(UMLElementTypes.ValuePin_3046); - types.add(UMLElementTypes.ActionInputPin_3047); - types.add(UMLElementTypes.InputPin_3048); - types.add(UMLElementTypes.ValuePin_3049); - types.add(UMLElementTypes.ActionInputPin_3050); - types.add(UMLElementTypes.InputPin_3051); - types.add(UMLElementTypes.SendSignalAction_3052); - types.add(UMLElementTypes.ActionInputPin_3053); - types.add(UMLElementTypes.ValuePin_3054); - types.add(UMLElementTypes.InputPin_3055); - types.add(UMLElementTypes.ValuePin_3060); - types.add(UMLElementTypes.ActionInputPin_3061); - types.add(UMLElementTypes.InputPin_3062); - types.add(UMLElementTypes.ActivityParameterNode_3059); - types.add(UMLElementTypes.AcceptEventAction_3063); - types.add(UMLElementTypes.OutputPin_3064); - types.add(UMLElementTypes.ValueSpecificationAction_3076); - types.add(UMLElementTypes.OutputPin_3077); - types.add(UMLElementTypes.ConditionalNode_3069); - types.add(UMLElementTypes.ExpansionRegion_3070); - types.add(UMLElementTypes.ExpansionNode_3074); - types.add(UMLElementTypes.ExpansionNode_3075); - types.add(UMLElementTypes.LoopNode_3071); - types.add(UMLElementTypes.OutputPin_3109); - types.add(UMLElementTypes.OutputPin_3110); - types.add(UMLElementTypes.OutputPin_3111); - types.add(UMLElementTypes.SequenceNode_3073); - types.add(UMLElementTypes.StructuredActivityNode_3065); - types.add(UMLElementTypes.InputPin_3105); - types.add(UMLElementTypes.ReadSelfAction_3081); - types.add(UMLElementTypes.OutputPin_3084); - types.add(UMLElementTypes.CreateObjectAction_3086); - types.add(UMLElementTypes.OutputPin_3087); - types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); - types.add(UMLElementTypes.InputPin_3089); - types.add(UMLElementTypes.OutputPin_3090); - types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); - types.add(UMLElementTypes.InputPin_3092); - types.add(UMLElementTypes.InputPin_3093); - types.add(UMLElementTypes.OutputPin_3094); - types.add(UMLElementTypes.DestroyObjectAction_3095); - types.add(UMLElementTypes.InputPin_3096); - types.add(UMLElementTypes.ReadVariableAction_3097); - types.add(UMLElementTypes.OutputPin_3098); - types.add(UMLElementTypes.AddVariableValueAction_3099); - types.add(UMLElementTypes.InputPin_3100); - types.add(UMLElementTypes.InputPin_3101); - types.add(UMLElementTypes.BroadcastSignalAction_3102); - types.add(UMLElementTypes.InputPin_3103); - types.add(UMLElementTypes.CentralBufferNode_3104); - } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { - types.add(UMLElementTypes.Comment_3080); - } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { - types.add(UMLElementTypes.DurationConstraint_3034); - types.add(UMLElementTypes.DurationConstraint_3035); - types.add(UMLElementTypes.TimeConstraint_3036); - types.add(UMLElementTypes.TimeConstraint_3037); - types.add(UMLElementTypes.IntervalConstraint_3032); - types.add(UMLElementTypes.IntervalConstraint_3033); - types.add(UMLElementTypes.Constraint_3011); - types.add(UMLElementTypes.Constraint_3012); - types.add(UMLElementTypes.Constraint_3112); - } - return types; - } - - /** - * @generated - */ - @Override - public Object getPreferredValue(EStructuralFeature feature) { - IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); - Object result = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - String prefColor = null; - if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_LINE); - } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FONT); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { - prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FILL); - } - result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - String prefGradient = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_GRADIENT); - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); - if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { - result = new Integer(gradientPreferenceConverter.getTransparency()); - } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { - result = gradientPreferenceConverter.getGradientData(); - } - } - if (result == null) { - result = getStructuralFeatureValue(feature); - } - return result; - } -} +/***************************************************************************** + * Copyright (c) 2010 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.StackLayout; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.editpolicies.LayoutEditPolicy; +import org.eclipse.gef.editpolicies.NonResizableEditPolicy; +import org.eclipse.gef.requests.CreateRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; +import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionItemSemanticEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.graphics.Color; + +/** + * @generated + */ +public class ValueSpecificationActionEditPart extends RoundedCompartmentEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 3076; + + /** + * @generated + */ + protected IFigure contentPane; + + /** + * @generated + */ + protected IFigure primaryShape; + + /** + * @generated + */ + public ValueSpecificationActionEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy()); + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ValueSpecificationActionItemSemanticEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); + // in Papyrus diagrams are not strongly synchronised + // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy()); + installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); + installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy()); + installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy()); + installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy()); + installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy()); + installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy()); + installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy()); + installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ValueSpecificationActionCanonicalEditPolicy()); + installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); + // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies + // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); + } + + /** + * Papyrus codeGen + * + * @generated + **/ + @Override + protected void handleNotificationEvent(Notification event) { + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected LayoutEditPolicy createLayoutEditPolicy() { + org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() { + + @Override + protected EditPolicy createChildEditPolicy(EditPart child) { + View childView = (View) child.getModel(); + switch (UMLVisualIDRegistry.getVisualID(childView)) { + case OutputPinInValSpecActEditPart.VISUAL_ID: + return new BorderItemResizableEditPolicy(); + } + EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (result == null) { + result = new NonResizableEditPolicy(); + } + return result; + } + + @Override + protected Command getMoveChildrenCommand(Request request) { + return null; + } + + @Override + protected Command getCreateCommand(CreateRequest request) { + return null; + } + }; + return lep; + } + + /** + * @generated + */ + @Override + protected IFigure createNodeShape() { + return primaryShape = new RoundedCompartmentFigure(); + } + + /** + * @generated + */ + @Override + public RoundedCompartmentFigure getPrimaryShape() { + return (RoundedCompartmentFigure) primaryShape; + } + + /** + * @generated + */ + protected boolean addFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ValueSpecificationActionNameEditPart) { + ((ValueSpecificationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel()); + return true; + } + // Papyrus Gencode :Affixed Pin locator for Actions + if (childEditPart instanceof OutputPinInValSpecActEditPart) { + IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST); + getBorderedFigure().getBorderItemContainer().add(((OutputPinInValSpecActEditPart) childEditPart).getFigure(), locator); + return true; + } + return false; + } + + /** + * @generated + */ + protected boolean removeFixedChild(EditPart childEditPart) { + if (childEditPart instanceof ValueSpecificationActionNameEditPart) { + return true; + } + if (childEditPart instanceof OutputPinInValSpecActEditPart) { + getBorderedFigure().getBorderItemContainer().remove(((OutputPinInValSpecActEditPart) childEditPart).getFigure()); + return true; + } + return false; + } + + /** + * @generated + */ + @Override + protected void addChildVisual(EditPart childEditPart, int index) { + if (addFixedChild(childEditPart)) { + return; + } + super.addChildVisual(childEditPart, -1); + } + + /** + * @generated + */ + @Override + protected void removeChildVisual(EditPart childEditPart) { + if (removeFixedChild(childEditPart)) { + return; + } + super.removeChildVisual(childEditPart); + } + + /** + * @generated + */ + @Override + protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { + if (editPart instanceof IBorderItemEditPart) { + return getBorderedFigure().getBorderItemContainer(); + } + return getContentPane(); + } + + /** + * @generated + */ + @Override + protected NodeFigure createNodePlate() { + String prefElementId = "ValueSpecificationAction"; + IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); + String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH); + String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT); + DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)); + return result; + } + + /** + * Creates figure for this edit part. + * + * Body of this method does not depend on settings in generation model + * so you may safely remove generated tag and modify it. + * + * @generated + */ + @Override + protected NodeFigure createMainFigure() { + NodeFigure figure = createNodePlate(); + figure.setLayoutManager(new StackLayout()); + IFigure shape = createNodeShape(); + figure.add(shape); + contentPane = setupContentPane(shape); + return figure; + } + + /** + * Default implementation treats passed figure as content pane. + * Respects layout one may have set for generated figure. + * + * @param nodeShape + * instance of generated figure class + * @generated + */ + @Override + protected IFigure setupContentPane(IFigure nodeShape) { + if (nodeShape.getLayoutManager() == null) { + ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); + layout.setSpacing(5); + nodeShape.setLayoutManager(layout); + } + return nodeShape; // use nodeShape itself as contentPane + } + + /** + * @generated + */ + @Override + public IFigure getContentPane() { + if (contentPane != null) { + return contentPane; + } + return super.getContentPane(); + } + + /** + * @generated + */ + @Override + protected void setForegroundColor(Color color) { + if (primaryShape != null) { + primaryShape.setForegroundColor(color); + } + } + + /** + * @generated + */ + @Override + protected void setLineWidth(int width) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineWidth(width); + } + } + + /** + * @generated + */ + @Override + protected void setLineType(int style) { + if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation + ((IPapyrusNodeFigure) primaryShape).setLineStyle(style); + } + } + + /** + * @generated + */ + @Override + public EditPart getPrimaryChildEditPart() { + return getChildBySemanticHint(UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID)); + } + + /** + * @generated + */ + public List getMARelTypesOnSource() { + ArrayList types = new ArrayList(5); + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.ExceptionHandler_4005); + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) { + LinkedList types = new LinkedList(); + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPrecondition_4001); + } + if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof ConstraintEditPartCN) { + types.add(UMLElementTypes.ActionLocalPostcondition_4002); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ObjectFlow_4003); + } + if (targetEditPart instanceof InitialNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof FlowFinalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OpaqueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallBehaviorActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CallOperationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DecisionNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof MergeNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ForkNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof JoinNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SendSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ConditionalNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionRegionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof LoopNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof SequenceNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof StructuredActivityNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CreateObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof DestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ReadVariableActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof AddVariableValueActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof BroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ControlFlow_4004); + } + if (targetEditPart instanceof ValuePinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInOpaqueActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallBeActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCallOpActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof DataStoreNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ActivityParameterNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInValSpecActEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsInEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ExpansionNodeAsOutEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + if (targetEditPart instanceof CentralBufferNodeEditPart) { + types.add(UMLElementTypes.ExceptionHandler_4005); + } + return types; + } + + /** + * @generated + */ + public List getMATypesForTarget(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) { + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } + return types; + } + + /** + * @generated + */ + public List getMARelTypesOnTarget() { + ArrayList types = new ArrayList(4); + types.add(UMLElementTypes.ObjectFlow_4003); + types.add(UMLElementTypes.ControlFlow_4004); + types.add(UMLElementTypes.CommentAnnotatedElement_4006); + types.add(UMLElementTypes.ConstraintConstrainedElement_4007); + return types; + } + + /** + * @generated + */ + public List getMATypesForSource(IElementType relationshipType) { + LinkedList types = new LinkedList(); + if (relationshipType == UMLElementTypes.ObjectFlow_4003) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.ControlFlow_4004) { + types.add(UMLElementTypes.InitialNode_3004); + types.add(UMLElementTypes.ActivityFinalNode_3005); + types.add(UMLElementTypes.FlowFinalNode_3006); + types.add(UMLElementTypes.OpaqueAction_3007); + types.add(UMLElementTypes.ValuePin_3015); + types.add(UMLElementTypes.ActionInputPin_3016); + types.add(UMLElementTypes.InputPin_3013); + types.add(UMLElementTypes.OutputPin_3014); + types.add(UMLElementTypes.CallBehaviorAction_3008); + types.add(UMLElementTypes.ValuePin_3017); + types.add(UMLElementTypes.ActionInputPin_3018); + types.add(UMLElementTypes.InputPin_3019); + types.add(UMLElementTypes.OutputPin_3020); + types.add(UMLElementTypes.CallOperationAction_3010); + types.add(UMLElementTypes.ActionInputPin_3021); + types.add(UMLElementTypes.ValuePin_3022); + types.add(UMLElementTypes.InputPin_3023); + types.add(UMLElementTypes.OutputPin_3024); + types.add(UMLElementTypes.ValuePin_3025); + types.add(UMLElementTypes.ActionInputPin_3026); + types.add(UMLElementTypes.InputPin_3027); + types.add(UMLElementTypes.DecisionNode_3038); + types.add(UMLElementTypes.MergeNode_3039); + types.add(UMLElementTypes.ForkNode_3040); + types.add(UMLElementTypes.JoinNode_3041); + types.add(UMLElementTypes.DataStoreNode_3078); + types.add(UMLElementTypes.SendObjectAction_3042); + types.add(UMLElementTypes.ValuePin_3046); + types.add(UMLElementTypes.ActionInputPin_3047); + types.add(UMLElementTypes.InputPin_3048); + types.add(UMLElementTypes.ValuePin_3049); + types.add(UMLElementTypes.ActionInputPin_3050); + types.add(UMLElementTypes.InputPin_3051); + types.add(UMLElementTypes.SendSignalAction_3052); + types.add(UMLElementTypes.ActionInputPin_3053); + types.add(UMLElementTypes.ValuePin_3054); + types.add(UMLElementTypes.InputPin_3055); + types.add(UMLElementTypes.ValuePin_3060); + types.add(UMLElementTypes.ActionInputPin_3061); + types.add(UMLElementTypes.InputPin_3062); + types.add(UMLElementTypes.ActivityParameterNode_3059); + types.add(UMLElementTypes.AcceptEventAction_3063); + types.add(UMLElementTypes.OutputPin_3064); + types.add(UMLElementTypes.ValueSpecificationAction_3076); + types.add(UMLElementTypes.OutputPin_3077); + types.add(UMLElementTypes.ConditionalNode_3069); + types.add(UMLElementTypes.ExpansionRegion_3070); + types.add(UMLElementTypes.ExpansionNode_3074); + types.add(UMLElementTypes.ExpansionNode_3075); + types.add(UMLElementTypes.LoopNode_3071); + types.add(UMLElementTypes.OutputPin_3109); + types.add(UMLElementTypes.OutputPin_3110); + types.add(UMLElementTypes.OutputPin_3111); + types.add(UMLElementTypes.SequenceNode_3073); + types.add(UMLElementTypes.StructuredActivityNode_3065); + types.add(UMLElementTypes.InputPin_3105); + types.add(UMLElementTypes.ReadSelfAction_3081); + types.add(UMLElementTypes.OutputPin_3084); + types.add(UMLElementTypes.CreateObjectAction_3086); + types.add(UMLElementTypes.OutputPin_3087); + types.add(UMLElementTypes.ReadStructuralFeatureAction_3088); + types.add(UMLElementTypes.InputPin_3089); + types.add(UMLElementTypes.OutputPin_3090); + types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091); + types.add(UMLElementTypes.InputPin_3092); + types.add(UMLElementTypes.InputPin_3093); + types.add(UMLElementTypes.OutputPin_3094); + types.add(UMLElementTypes.DestroyObjectAction_3095); + types.add(UMLElementTypes.InputPin_3096); + types.add(UMLElementTypes.ReadVariableAction_3097); + types.add(UMLElementTypes.OutputPin_3098); + types.add(UMLElementTypes.AddVariableValueAction_3099); + types.add(UMLElementTypes.InputPin_3100); + types.add(UMLElementTypes.InputPin_3101); + types.add(UMLElementTypes.BroadcastSignalAction_3102); + types.add(UMLElementTypes.InputPin_3103); + types.add(UMLElementTypes.CentralBufferNode_3104); + } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) { + types.add(UMLElementTypes.Comment_3080); + } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) { + types.add(UMLElementTypes.DurationConstraint_3034); + types.add(UMLElementTypes.DurationConstraint_3035); + types.add(UMLElementTypes.TimeConstraint_3036); + types.add(UMLElementTypes.TimeConstraint_3037); + types.add(UMLElementTypes.IntervalConstraint_3032); + types.add(UMLElementTypes.IntervalConstraint_3033); + types.add(UMLElementTypes.Constraint_3011); + types.add(UMLElementTypes.Constraint_3012); + types.add(UMLElementTypes.Constraint_3112); + } + return types; + } + + /** + * @generated + */ + @Override + public Object getPreferredValue(EStructuralFeature feature) { + IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore(); + Object result = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + String prefColor = null; + if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_LINE); + } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FONT); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) { + prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FILL); + } + result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor)); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + String prefGradient = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_GRADIENT); + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient)); + if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) { + result = new Integer(gradientPreferenceConverter.getTransparency()); + } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) { + result = gradientPreferenceConverter.getGradientData(); + } + } + if (result == null) { + result = getStructuralFeatureValue(feature); + } + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java new file mode 100644 index 00000000000..c8d44af5968 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java @@ -0,0 +1,805 @@ +package org.eclipse.papyrus.uml.diagram.activity.edit.parts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +/** + * @generated + */ +public class ValueSpecificationActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + /** + * @generated + */ + public static final int VISUAL_ID = 6026; + + /** + * @generated + */ + private DirectEditManager manager; + + /** + * @generated + */ + private IParser parser; + + /** + * @generated + */ + private List parserElements; + + /** + * @generated + */ + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * + * @generated + */ + protected IDirectEditorConfiguration configuration; + /** + * @generated + */ + static { + registerSnapBackPosition(UMLVisualIDRegistry.getType(ValueSpecificationActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0)); + } + + /** + * @generated + */ + public ValueSpecificationActionFloatingNameEditPart(View view) { + super(view); + } + + /** + * @generated + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + /** + * @generated + */ + @Override + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if (parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator) constraint; + } + return null; + } + + /** + * @generated + */ + @Override + public void refreshBounds() { + int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + /** + * @generated + */ + protected String getLabelTextHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getText(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getText(); + } else { + return ((Label) figure).getText(); + } + } + + /** + * @generated + */ + protected void setLabelTextHelper(IFigure figure, String text) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setText(text); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setText(text); + } else { + ((Label) figure).setText(text); + } + } + + /** + * @generated + */ + protected Image getLabelIconHelper(IFigure figure) { + if (figure instanceof WrappingLabel) { + return ((WrappingLabel) figure).getIcon(); + } else if (figure instanceof ILabelFigure) { + return ((ILabelFigure) figure).getIcon(); + } else { + return ((Label) figure).getIcon(); + } + } + + /** + * @generated + */ + protected void setLabelIconHelper(IFigure figure, Image icon) { + if (figure instanceof WrappingLabel) { + ((WrappingLabel) figure).setIcon(icon); + } else if (figure instanceof ILabelFigure) { + ((ILabelFigure) figure).setIcon(icon); + } else { + ((Label) figure).setIcon(icon); + } + } + + /** + * @generated + */ + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + @Override + protected List getModelChildren() { + return Collections.EMPTY_LIST; + } + + /** + * @generated + */ + @Override + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + /** + * @generated + */ + public void setParser(IParser parser) { + this.parser = parser; + } + + /** + * @generated + */ + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + /** + * @generated + */ + protected Image getLabelIcon() { + return null; + } + + /** + * @generated + */ + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if (parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if (text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + /** + * @generated + */ + @Override + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + @Override + public String getEditText() { + if (getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + /** + * @generated + */ + protected boolean isEditable() { + return getParser() != null; + } + + /** + * @generated + */ + @Override + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if (value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + /** + * @generated + */ + @Override + public IContentAssistProcessor getCompletionProcessor() { + if (getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + /** + * @generated + */ + @Override + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + /** + * @generated + */ + @Override + public IParser getParser() { + if (parser == null) { + parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ValueSpecificationActionFloatingNameEditPart.VISUAL_ID)); + } + return parser; + } + + /** + * @generated + */ + protected DirectEditManager getManager() { + if (manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + } + return manager; + } + + /** + * @generated + */ + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + /** + * @generated + */ + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + /** + * @generated + */ + protected void performDirectEdit(Point eventLocation) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint()); + } + } + + /** + * @generated + */ + private void performDirectEdit(char initialCharacter) { + if (getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager) getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + /** + * @generated + */ + @Override + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch (directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if (configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if (configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if (configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if (configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if (configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), + configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if (Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + /** + * @generated + */ + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + /** + * @generated + */ + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if (maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if (maskLabelPolicy == null) { + View view = (View) getModel(); + if (view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); + } + } + + /** + * @generated + */ + protected void refreshUnderline() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline()); + } + if (resolveSemanticElement() instanceof Feature) { + if (((Feature) resolveSemanticElement()).isStatic()) { + ((WrappingLabel) getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel) getFigure()).setTextUnderline(false); + } + } + } + + /** + * @generated + */ + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + /** + * @generated + */ + @Override + protected void refreshFont() { + FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if (style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + /** + * @generated + */ + @Override + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + /** + * @generated + */ + @Override + protected void addSemanticListeners() { + if (getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element); + for (int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected void removeSemanticListeners() { + if (parserElements != null) { + for (int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + /** + * @generated + */ + @Override + protected AccessibleEditPart getAccessibleEditPart() { + if (accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + /** + * @generated + */ + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an int 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 true if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if (resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return true if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * + * @generated + */ + protected void initExtendedEditorConfiguration() { + if (configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * + * @param theRequest + * the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if (isActive() && isEditable()) { + if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest) theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @generated + */ + @Override + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer) event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) + || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if (getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser) getParser(); + if (modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if (resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + @Override + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new WrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java index 64d184f2b72..f3856f5d8a0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java @@ -1,4302 +1,4374 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.part; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*; -import org.eclipse.papyrus.uml.diagram.activity.expressions.UMLOCLFactory; -import org.eclipse.uml2.uml.ActionInputPin; -import org.eclipse.uml2.uml.Constraint; -import org.eclipse.uml2.uml.DurationConstraint; -import org.eclipse.uml2.uml.ExpansionNode; -import org.eclipse.uml2.uml.InputPin; -import org.eclipse.uml2.uml.IntervalConstraint; -import org.eclipse.uml2.uml.OutputPin; -import org.eclipse.uml2.uml.Package; -import org.eclipse.uml2.uml.TimeConstraint; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.ValuePin; - -/** - * This registry is used to determine which type of visual object should be - * created for the corresponding Diagram, Node, ChildNode or Link represented - * by a domain model object. - * - * @generated - */ -public class UMLVisualIDRegistry { - - /** - * @generated - */ - private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.activity/debug/visualID"; //$NON-NLS-1$ - - /** - * @generated - */ - public static int getVisualID(View view) { - if (view instanceof Diagram) { - if (ActivityDiagramEditPart.MODEL_ID.equals(view.getType())) { - return ActivityDiagramEditPart.VISUAL_ID; - } else { - return -1; - } - } - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view.getType()); - } - - /** - * @generated - */ - public static String getModelID(View view) { - View diagram = view.getDiagram(); - while (view != diagram) { - EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$ - if (annotation != null) { - return annotation.getDetails().get("modelID"); //$NON-NLS-1$ - } - view = (View) view.eContainer(); - } - return diagram != null ? diagram.getType() : null; - } - - /** - * @generated - */ - public static int getVisualID(String type) { - try { - return Integer.parseInt(type); - } catch (NumberFormatException e) { - if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) { - UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type); - } - } - return -1; - } - - /** - * @generated - */ - public static String getType(int visualID) { - return Integer.toString(visualID); - } - - public static int getDiagramVisualID(EObject domainElement) { - return ActivityDiagramEditPart.VISUAL_ID; - } - - /** - * @generated - */ - public static int getNodeVisualID(View containerView, EObject domainElement) { - if (domainElement == null) { - return -1; - } - String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView); - if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { - return -1; - } - int containerVisualID; - if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { - containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView); - } else { - if (containerView instanceof Diagram) { - containerVisualID = ActivityDiagramEditPart.VISUAL_ID; - } else { - return -1; - } - } - switch (containerVisualID) { - case ActivityDiagramEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) { - return ActivityEditPart.VISUAL_ID; - } - break; - case ActivityEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityParameterNodeEditPart.VISUAL_ID; - } - break; - case OpaqueActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) { - return ValuePinInOpaqueActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) { - return ActionInputPinInOpaqueActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { - return InputPinInOpaqueActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInOpaqueActEditPart.VISUAL_ID; - } - break; - case CallBehaviorActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) { - return ValuePinInCallBeActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) { - return ActionInputPinInCallBeActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { - return InputPinInCallBeActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInCallBeActEditPart.VISUAL_ID; - } - break; - case CallOperationActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3021(containerView, (ActionInputPin) domainElement)) { - return ActionInputPinInCallOpActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3022(containerView, (ValuePin) domainElement)) { - return ValuePinInCallOpActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3023(containerView, (InputPin) domainElement)) { - return InputPinInCallOpActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInCallOpActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3025(containerView, (ValuePin) domainElement)) { - return ValuePinInCallOpActAsTargetEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3026(containerView, (ActionInputPin) domainElement)) { - return ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3027(containerView, (InputPin) domainElement)) { - return InputPinInCallOpActAsTargetEditPart.VISUAL_ID; - } - break; - case SendObjectActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3046(containerView, (ValuePin) domainElement)) { - return ValuePinInSendObjActAsReqEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3047(containerView, (ActionInputPin) domainElement)) { - return ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3048(containerView, (InputPin) domainElement)) { - return InputPinInSendObjActAsReqEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3049(containerView, (ValuePin) domainElement)) { - return ValuePinInSendObjActAsTargetEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3050(containerView, (ActionInputPin) domainElement)) { - return ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3051(containerView, (InputPin) domainElement)) { - return InputPinInSendObjActAsTargetEditPart.VISUAL_ID; - } - break; - case SendSignalActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3053(containerView, (ActionInputPin) domainElement)) { - return ActionInputPinInSendSigActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3054(containerView, (ValuePin) domainElement)) { - return ValuePinInSendSigActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3055(containerView, (InputPin) domainElement)) { - return InputPinInSendSigActEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3060(containerView, (ValuePin) domainElement)) { - return ValuePinInSendSigActAsTargetEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3061(containerView, (ActionInputPin) domainElement)) { - return ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3062(containerView, (InputPin) domainElement)) { - return InputPinInSendSigActAsTargetEditPart.VISUAL_ID; - } - break; - case AcceptEventActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInAcceptEventActionEditPart.VISUAL_ID; - } - break; - case ValueSpecificationActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInValSpecActEditPart.VISUAL_ID; - } - break; - case ExpansionRegionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3074(containerView, (ExpansionNode) domainElement)) { - return ExpansionNodeAsInEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3075(containerView, (ExpansionNode) domainElement)) { - return ExpansionNodeAsOutEditPart.VISUAL_ID; - } - break; - case LoopNodeEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { - return InputPinInLoopNodeAsVariableEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInLoopNodeAsResultEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID; - } - break; - case ReadSelfActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionOutputPinEditPart.VISUAL_ID; - } - break; - case ActivityEditPartCN.VISUAL_ID: - if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityParameterNodeEditPart.VISUAL_ID; - } - break; - case CreateObjectActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID; - } - break; - case ReadStructuralFeatureActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { - return InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID; - } - break; - case AddStructuralFeatureValueActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3092(containerView, (InputPin) domainElement)) { - return InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3093(containerView, (InputPin) domainElement)) { - return InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { - return OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID; - } - break; - case DestroyObjectActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3096(containerView, (InputPin) domainElement)) { - return InputPinInDestroyObjectActionEditPart.VISUAL_ID; - } - break; - case ReadVariableActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass()) && isOutputPin_3098(containerView, (OutputPin) domainElement)) { - return OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID; - } - break; - case AddVariableValueActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3100(containerView, (InputPin) domainElement)) { - return InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3101(containerView, (InputPin) domainElement)) { - return InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID; - } - break; - case BroadcastSignalActionEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3103(containerView, (InputPin) domainElement)) { - return InputPinInBroadcastSignalActionEditPart.VISUAL_ID; - } - break; - case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) { - return ParameterEditPart.VISUAL_ID; - } - break; - case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintInActivityAsPrecondEditPart.VISUAL_ID; - } - break; - case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintInActivityAsPostcondEditPart.VISUAL_ID; - } - break; - case ActivityActivityContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) { - return ActivityPartitionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) { - return InterruptibleActivityRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) { - return ActivityEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) { - return ActivityPartitionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintEditPartCN.VISUAL_ID; - } - break; - case ActivityCNParametersCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) { - return ParameterEditPart.VISUAL_ID; - } - break; - case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintInActivityAsPrecondEditPart.VISUAL_ID; - } - break; - case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { - return ConstraintInActivityAsPostcondEditPart.VISUAL_ID; - } - break; - case ActivityCNContentCompartmentEditPart.VISUAL_ID: - if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { - return InitialNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { - return FlowFinalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { - return OpaqueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { - return CallBehaviorActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { - return CallOperationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { - return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { - return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { - return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPrecondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { - return ConstraintAsLocalPostcondEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { - return DecisionNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { - return MergeNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { - return ForkNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { - return JoinNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { - return DataStoreNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { - return SendObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { - return SendSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { - return AcceptEventActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { - return ValueSpecificationActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { - return ConditionalNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { - return ExpansionRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { - return LoopNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { - return SequenceNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { - return StructuredActivityNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) { - return ActivityPartitionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) { - return InterruptibleActivityRegionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { - return CommentEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { - return ReadSelfActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) { - return ActivityEditPartCN.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { - return CreateObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { - return ReadStructuralFeatureActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddStructuralFeatureValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { - return DestroyObjectActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { - return ReadVariableActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { - return AddVariableValueActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { - return BroadcastSignalActionEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { - return CentralBufferNodeEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) { - return ActivityParameterNodeEditPart.VISUAL_ID; - } - break; - } - return -1; - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isExpansionNode_3075(View containerView, ExpansionNode domainElement) { - return isExpansionNode_3075(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isExpansionNode_3074(View containerView, ExpansionNode domainElement) { - return isExpansionNode_3074(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isValuePin_3022(View containerView, ValuePin domainElement) { - return isValuePin_3022(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isValuePin_3025(View containerView, ValuePin domainElement) { - return isValuePin_3025(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isValuePin_3046(View containerView, ValuePin domainElement) { - return isValuePin_3046(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isValuePin_3049(View containerView, ValuePin domainElement) { - return isValuePin_3049(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isValuePin_3054(View containerView, ValuePin domainElement) { - return isValuePin_3054(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isValuePin_3060(View containerView, ValuePin domainElement) { - return isValuePin_3060(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3023(View containerView, InputPin domainElement) { - return isInputPin_3023(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3027(View containerView, InputPin domainElement) { - return isInputPin_3027(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3048(View containerView, InputPin domainElement) { - return isInputPin_3048(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3051(View containerView, InputPin domainElement) { - return isInputPin_3051(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3055(View containerView, InputPin domainElement) { - return isInputPin_3055(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3062(View containerView, InputPin domainElement) { - return isInputPin_3062(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isActionInputPin_3026(View containerView, ActionInputPin domainElement) { - return isActionInputPin_3026(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isActionInputPin_3021(View containerView, ActionInputPin domainElement) { - return isActionInputPin_3021(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isActionInputPin_3047(View containerView, ActionInputPin domainElement) { - return isActionInputPin_3047(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isActionInputPin_3050(View containerView, ActionInputPin domainElement) { - return isActionInputPin_3050(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isActionInputPin_3053(View containerView, ActionInputPin domainElement) { - return isActionInputPin_3053(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isActionInputPin_3061(View containerView, ActionInputPin domainElement) { - return isActionInputPin_3061(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isConstraint_3011(View containerView, Constraint domainElement) { - return isConstraint_3011(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isConstraint_3012(View containerView, Constraint domainElement) { - return isConstraint_3012(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isIntervalConstraint_3032(View containerView, IntervalConstraint domainElement) { - return isIntervalConstraint_3032(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isIntervalConstraint_3033(View containerView, IntervalConstraint domainElement) { - return isIntervalConstraint_3033(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isDurationConstraint_3034(View containerView, DurationConstraint domainElement) { - return isDurationConstraint_3034(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isDurationConstraint_3035(View containerView, DurationConstraint domainElement) { - return isDurationConstraint_3035(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isTimeConstraint_3036(View containerView, TimeConstraint domainElement) { - return isTimeConstraint_3036(domainElement); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isTimeConstraint_3037(View containerView, TimeConstraint domainElement) { - return isTimeConstraint_3037(domainElement); - } - - /** - * @generated - */ - public static boolean canCreateNode(View containerView, int nodeVisualID) { - String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView); - if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { - return false; - } - int containerVisualID; - if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { - containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView); - } else { - if (containerView instanceof Diagram) { - containerVisualID = ActivityDiagramEditPart.VISUAL_ID; - } else { - return false; - } - } - switch (containerVisualID) { - case ActivityDiagramEditPart.VISUAL_ID: - if (ActivityEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityEditPart.VISUAL_ID: - if (ActivityNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityIsSingleExecutionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityActivityParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityActivityContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InitialNodeEditPart.VISUAL_ID: - if (InitialNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityFinalNodeEditPart.VISUAL_ID: - if (ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case FlowFinalNodeEditPart.VISUAL_ID: - if (FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OpaqueActionEditPart.VISUAL_ID: - if (OpaqueActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInOpaqueActEditPart.VISUAL_ID: - if (ValuePinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInOActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInOpaqueActEditPart.VISUAL_ID: - if (ActionInputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInOActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInOpaqueActEditPart.VISUAL_ID: - if (InputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInOpaqueActEditPart.VISUAL_ID: - if (OutputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case CallBehaviorActionEditPart.VISUAL_ID: - if (CallBehaviorActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInCallBeActEditPart.VISUAL_ID: - if (ValuePinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCBActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInCallBeActEditPart.VISUAL_ID: - if (ActionInputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCBActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInCallBeActEditPart.VISUAL_ID: - if (InputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInCallBeActEditPart.VISUAL_ID: - if (OutputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case CallOperationActionEditPart.VISUAL_ID: - if (CallOperationActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInCallOpActEditPart.VISUAL_ID: - if (ActionInputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCOActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInCallOpActEditPart.VISUAL_ID: - if (ValuePinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCOActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInCallOpActEditPart.VISUAL_ID: - if (InputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInCallOpActEditPart.VISUAL_ID: - if (OutputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: - if (ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: - if (ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: - if (InputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: - if (DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: - if (DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: - if (TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: - if (TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: - if (IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: - if (IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ConstraintAsLocalPrecondEditPart.VISUAL_ID: - if (ConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ConstraintAsLocalPostcondEditPart.VISUAL_ID: - if (ConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case DecisionNodeEditPart.VISUAL_ID: - if (DecisionInputEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case MergeNodeEditPart.VISUAL_ID: - if (MergeNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ForkNodeEditPart.VISUAL_ID: - if (ForkNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case JoinNodeEditPart.VISUAL_ID: - if (JoinSpecEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case DataStoreNodeEditPart.VISUAL_ID: - if (DataStoreNodeLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreSelectionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case SendObjectActionEditPart.VISUAL_ID: - if (SendObjectActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: - if (ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: - if (ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInSendObjActAsReqEditPart.VISUAL_ID: - if (InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: - if (ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: - if (ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: - if (InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case SendSignalActionEditPart.VISUAL_ID: - if (SendSignalActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendSigActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInSendSigActEditPart.VISUAL_ID: - if (ActionInputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInSendSigActEditPart.VISUAL_ID: - if (ValuePinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInSendSigActEditPart.VISUAL_ID: - if (InputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: - if (ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: - if (ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: - if (InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityParameterNodeEditPart.VISUAL_ID: - if (ParameterNodeNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case AcceptEventActionEditPart.VISUAL_ID: - if (AcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptTimeEventActionLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInAcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInAcceptEventActionEditPart.VISUAL_ID: - if (OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ValueSpecificationActionEditPart.VISUAL_ID: - if (ValueSpecificationActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInValSpecActEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInValSpecActEditPart.VISUAL_ID: - if (OutputPinInValSpecActLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ConditionalNodeEditPart.VISUAL_ID: - if (ConditionalNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ExpansionRegionEditPart.VISUAL_ID: - if (ExpansionRegionKeywordEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionNodeAsInEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionNodeAsOutEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case LoopNodeEditPart.VISUAL_ID: - if (LoopNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInLoopNodeAsVariableEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInLoopNodeAsResultEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: - if (OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: - if (OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: - if (OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case SequenceNodeEditPart.VISUAL_ID: - if (SequenceNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case StructuredActivityNodeEditPart.VISUAL_ID: - if (StructuredActivityNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: - if (InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityPartitionEditPart.VISUAL_ID: - if (ActivityPartitionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InterruptibleActivityRegionEditPart.VISUAL_ID: - if (InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case CommentEditPartCN.VISUAL_ID: - if (CommentBodyLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ReadSelfActionEditPart.VISUAL_ID: - if (ReadSelfActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionOutputPinEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ReadSelfActionOutputPinEditPart.VISUAL_ID: - if (OutputPinInReadSelfActionLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityEditPartCN.VISUAL_ID: - if (ActivityNameEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityIsSingleExecutionCNEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityCNParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityCNContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case CreateObjectActionEditPart.VISUAL_ID: - if (CreateObjectActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: - if (OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ShapeNamedElementEditPart.VISUAL_ID: - if (ShapeNamedElementNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ReadStructuralFeatureActionEditPart.VISUAL_ID: - if (ReadStructuralFeatureActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: - if (InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: - if (OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case AddStructuralFeatureValueActionEditPart.VISUAL_ID: - if (AddStructuralFeatureValueActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: - if (InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: - if (InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: - if (OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case DestroyObjectActionEditPart.VISUAL_ID: - if (DestroyObjectActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInDestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInDestroyObjectActionEditPart.VISUAL_ID: - if (InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ReadVariableActionEditPart.VISUAL_ID: - if (ReadVariableActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: - if (OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case AddVariableValueActionEditPart.VISUAL_ID: - if (AddVariableValueActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: - if (InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: - if (InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case BroadcastSignalActionEditPart.VISUAL_ID: - if (BroadcastSignalActionNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInBroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: - if (InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case CentralBufferNodeEditPart.VISUAL_ID: - if (CentralBufferNodeLabelEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeSelectionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ConstraintEditPartCN.VISUAL_ID: - if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintBodyEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: - if (ParameterEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: - if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: - if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityActivityContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityCNParametersCompartmentEditPart.VISUAL_ID: - if (ParameterEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: - if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: - if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ActivityCNContentCompartmentEditPart.VISUAL_ID: - if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) { - return true; - } - if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ObjectFlowEditPart.VISUAL_ID: - if (ObjectFlowNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ObjectFlowWeightEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ObjectFlowSelectionEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ObjectFlowTransformationEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (DecisionInputFlowEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ObjectFlowGuardEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ObjectFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ObjectFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ControlFlowEditPart.VISUAL_ID: - if (ControlFlowNameEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ControlFlowWeightEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ControlFlowGuardEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ControlFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ControlFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - case ExceptionHandlerEditPart.VISUAL_ID: - if (ExceptionHandlerTypeEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - if (ExceptionHandlerIconEditPart.VISUAL_ID == nodeVisualID) { - return true; - } - break; - } - return false; - } - - /** - * @generated - */ - public static int getLinkWithClassVisualID(EObject domainElement) { - if (domainElement == null) { - return -1; - } - if (UMLPackage.eINSTANCE.getObjectFlow().isSuperTypeOf(domainElement.eClass())) { - return ObjectFlowEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getControlFlow().isSuperTypeOf(domainElement.eClass())) { - return ControlFlowEditPart.VISUAL_ID; - } - if (UMLPackage.eINSTANCE.getExceptionHandler().isSuperTypeOf(domainElement.eClass())) { - return ExceptionHandlerEditPart.VISUAL_ID; - } - return -1; - } - - /** - * User can change implementation of this method to handle some specific - * situations not covered by default logic. - * - * @generated - */ - private static boolean isDiagram(Package element) { - return true; - } - - /** - * @generated - */ - private static boolean isActionInputPin_3021(ActionInputPin domainElement) { - Object result = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isValuePin_3022(ValuePin domainElement) { - Object result = UMLOCLFactory.getExpression(1, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isInputPin_3023(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(2, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isValuePin_3025(ValuePin domainElement) { - Object result = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isActionInputPin_3026(ActionInputPin domainElement) { - Object result = UMLOCLFactory.getExpression(4, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isInputPin_3027(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(5, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isConstraint_3011(Constraint domainElement) { - Object result = UMLOCLFactory.getExpression(12, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isConstraint_3012(Constraint domainElement) { - Object result = UMLOCLFactory.getExpression(13, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isValuePin_3046(ValuePin domainElement) { - Object result = UMLOCLFactory.getExpression(14, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isActionInputPin_3047(ActionInputPin domainElement) { - Object result = UMLOCLFactory.getExpression(15, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isInputPin_3048(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(16, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isValuePin_3049(ValuePin domainElement) { - Object result = UMLOCLFactory.getExpression(17, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isActionInputPin_3050(ActionInputPin domainElement) { - Object result = UMLOCLFactory.getExpression(18, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isInputPin_3051(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(19, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isActionInputPin_3053(ActionInputPin domainElement) { - Object result = UMLOCLFactory.getExpression(20, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isValuePin_3054(ValuePin domainElement) { - Object result = UMLOCLFactory.getExpression(21, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isInputPin_3055(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(22, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isValuePin_3060(ValuePin domainElement) { - Object result = UMLOCLFactory.getExpression(23, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isActionInputPin_3061(ActionInputPin domainElement) { - Object result = UMLOCLFactory.getExpression(24, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isInputPin_3062(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(25, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isExpansionNode_3074(ExpansionNode domainElement) { - Object result = UMLOCLFactory.getExpression(26, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isExpansionNode_3075(ExpansionNode domainElement) { - Object result = UMLOCLFactory.getExpression(27, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * Redirect call to defined method - * - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3092(View containerView, InputPin domainElement) { - return isInputPin_3092(domainElement); - } - - /** - * @generated - */ - private static boolean isInputPin_3092(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(29, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3093(View containerView, InputPin domainElement) { - return isInputPin_3093(domainElement); - } - - /** - * @generated - */ - private static boolean isInputPin_3093(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(30, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3096(View containerView, InputPin domainElement) { - return isInputPin_3096(domainElement); - } - - /** - * @generated - */ - private static boolean isInputPin_3096(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(31, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isOutputPin_3098(View containerView, OutputPin domainElement) { - return isOutputPin_3098(domainElement); - } - - /** - * @generated - */ - private static boolean isOutputPin_3098(OutputPin domainElement) { - Object result = UMLOCLFactory.getExpression(32, UMLPackage.eINSTANCE.getOutputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3100(View containerView, InputPin domainElement) { - return isInputPin_3100(domainElement); - } - - /** - * @generated - */ - private static boolean isInputPin_3100(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(33, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3101(View containerView, InputPin domainElement) { - return isInputPin_3101(domainElement); - } - - /** - * @generated - */ - private static boolean isInputPin_3101(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(34, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated NOT (method generation is missing or generated calls are incorrect) - */ - private static boolean isInputPin_3103(View containerView, InputPin domainElement) { - return isInputPin_3103(domainElement); - } - - /** - * @generated - */ - private static boolean isInputPin_3103(InputPin domainElement) { - Object result = UMLOCLFactory.getExpression(35, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) { - if (candidate == -1) { - // unrecognized id is always bad - return false; - } - int basic = getNodeVisualID(containerView, domainElement); - return basic == candidate; - } - - /** - * @generated - */ - public static boolean isCompartmentVisualID(int visualID) { - switch (visualID) { - case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: - case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: - case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: - case ActivityActivityContentCompartmentEditPart.VISUAL_ID: - case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: - case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: - case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: - case ActivityCNParametersCompartmentEditPart.VISUAL_ID: - case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: - case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: - case ActivityCNContentCompartmentEditPart.VISUAL_ID: - return true; - default: - break; - } - return false; - } - - /** - * @generated - */ - public static boolean isSemanticLeafVisualID(int visualID) { - switch (visualID) { - case ActivityDiagramEditPart.VISUAL_ID: - return false; - case ParameterEditPart.VISUAL_ID: - case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: - case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: - case InitialNodeEditPart.VISUAL_ID: - case ActivityFinalNodeEditPart.VISUAL_ID: - case FlowFinalNodeEditPart.VISUAL_ID: - case ConstraintAsLocalPrecondEditPart.VISUAL_ID: - case ConstraintAsLocalPostcondEditPart.VISUAL_ID: - case InputPinInOpaqueActEditPart.VISUAL_ID: - case OutputPinInOpaqueActEditPart.VISUAL_ID: - case ValuePinInOpaqueActEditPart.VISUAL_ID: - case ActionInputPinInOpaqueActEditPart.VISUAL_ID: - case ValuePinInCallBeActEditPart.VISUAL_ID: - case ActionInputPinInCallBeActEditPart.VISUAL_ID: - case InputPinInCallBeActEditPart.VISUAL_ID: - case OutputPinInCallBeActEditPart.VISUAL_ID: - case ActionInputPinInCallOpActEditPart.VISUAL_ID: - case ValuePinInCallOpActEditPart.VISUAL_ID: - case InputPinInCallOpActEditPart.VISUAL_ID: - case OutputPinInCallOpActEditPart.VISUAL_ID: - case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: - case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: - case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: - case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: - case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: - case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: - case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: - case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: - case DecisionNodeEditPart.VISUAL_ID: - case MergeNodeEditPart.VISUAL_ID: - case ForkNodeEditPart.VISUAL_ID: - case JoinNodeEditPart.VISUAL_ID: - case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: - case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: - case InputPinInSendObjActAsReqEditPart.VISUAL_ID: - case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: - case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInSendSigActEditPart.VISUAL_ID: - case ValuePinInSendSigActEditPart.VISUAL_ID: - case InputPinInSendSigActEditPart.VISUAL_ID: - case ActivityParameterNodeEditPart.VISUAL_ID: - case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: - case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: - case OutputPinInAcceptEventActionEditPart.VISUAL_ID: - case ExpansionNodeAsInEditPart.VISUAL_ID: - case ExpansionNodeAsOutEditPart.VISUAL_ID: - case OutputPinInValSpecActEditPart.VISUAL_ID: - case DataStoreNodeEditPart.VISUAL_ID: - case CommentEditPartCN.VISUAL_ID: - case ReadSelfActionOutputPinEditPart.VISUAL_ID: - case ShapeNamedElementEditPart.VISUAL_ID: - case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: - case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: - case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: - case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: - case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: - case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: - case InputPinInDestroyObjectActionEditPart.VISUAL_ID: - case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: - case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: - case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: - case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: - case CentralBufferNodeEditPart.VISUAL_ID: - case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: - case ConstraintEditPartCN.VISUAL_ID: - return true; - default: - break; - } - return false; - } - - /** - * @generated - */ - public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() { - - /** - * @generated - */ - @Override - public int getVisualID(View view) { - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view); - } - - /** - * @generated - */ - @Override - public String getModelID(View view) { - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(view); - } - - /** - * @generated - */ - @Override - public int getNodeVisualID(View containerView, EObject domainElement) { - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement); - } - - /** - * @generated - */ - @Override - public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) { - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate); - } - - /** - * @generated - */ - @Override - public boolean isCompartmentVisualID(int visualID) { - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID); - } - - /** - * @generated - */ - @Override - public boolean isSemanticLeafVisualID(int visualID) { - return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID); - } - }; - - /** - * @generated - */ - private static boolean isIntervalConstraint_3032(IntervalConstraint domainElement) { - Object result = UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isIntervalConstraint_3033(IntervalConstraint domainElement) { - Object result = UMLOCLFactory.getExpression(11, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isDurationConstraint_3034(DurationConstraint domainElement) { - Object result = UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isDurationConstraint_3035(DurationConstraint domainElement) { - Object result = UMLOCLFactory.getExpression(7, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isTimeConstraint_3036(TimeConstraint domainElement) { - Object result = UMLOCLFactory.getExpression(8, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } - - /** - * @generated - */ - private static boolean isTimeConstraint_3037(TimeConstraint domainElement) { - Object result = UMLOCLFactory.getExpression(9, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement); - return result instanceof Boolean && ((Boolean) result).booleanValue(); - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.part; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*; +import org.eclipse.papyrus.uml.diagram.activity.expressions.UMLOCLFactory; +import org.eclipse.uml2.uml.ActionInputPin; +import org.eclipse.uml2.uml.Constraint; +import org.eclipse.uml2.uml.DurationConstraint; +import org.eclipse.uml2.uml.ExpansionNode; +import org.eclipse.uml2.uml.InputPin; +import org.eclipse.uml2.uml.IntervalConstraint; +import org.eclipse.uml2.uml.OutputPin; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.TimeConstraint; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.ValuePin; + +/** + * This registry is used to determine which type of visual object should be + * created for the corresponding Diagram, Node, ChildNode or Link represented + * by a domain model object. + * + * @generated + */ +public class UMLVisualIDRegistry { + + /** + * @generated + */ + private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.activity/debug/visualID"; //$NON-NLS-1$ + + /** + * @generated + */ + public static int getVisualID(View view) { + if (view instanceof Diagram) { + if (ActivityDiagramEditPart.MODEL_ID.equals(view.getType())) { + return ActivityDiagramEditPart.VISUAL_ID; + } else { + return -1; + } + } + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view.getType()); + } + + /** + * @generated + */ + public static String getModelID(View view) { + View diagram = view.getDiagram(); + while (view != diagram) { + EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$ + if (annotation != null) { + return annotation.getDetails().get("modelID"); //$NON-NLS-1$ + } + view = (View) view.eContainer(); + } + return diagram != null ? diagram.getType() : null; + } + + /** + * @generated + */ + public static int getVisualID(String type) { + try { + return Integer.parseInt(type); + } catch (NumberFormatException e) { + if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) { + UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type); + } + } + return -1; + } + + /** + * @generated + */ + public static String getType(int visualID) { + return Integer.toString(visualID); + } + + public static int getDiagramVisualID(EObject domainElement) { + return ActivityDiagramEditPart.VISUAL_ID; + } + + /** + * @generated + */ + public static int getNodeVisualID(View containerView, EObject domainElement) { + if (domainElement == null) { + return -1; + } + String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView); + if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { + return -1; + } + int containerVisualID; + if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { + containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView); + } else { + if (containerView instanceof Diagram) { + containerVisualID = ActivityDiagramEditPart.VISUAL_ID; + } else { + return -1; + } + } + switch (containerVisualID) { + case ActivityDiagramEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) { + return ActivityEditPart.VISUAL_ID; + } + break; + case ActivityEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityParameterNodeEditPart.VISUAL_ID; + } + break; + case OpaqueActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) { + return ValuePinInOpaqueActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) { + return ActionInputPinInOpaqueActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { + return InputPinInOpaqueActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInOpaqueActEditPart.VISUAL_ID; + } + break; + case CallBehaviorActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) { + return ValuePinInCallBeActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) { + return ActionInputPinInCallBeActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { + return InputPinInCallBeActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInCallBeActEditPart.VISUAL_ID; + } + break; + case CallOperationActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3021(containerView, (ActionInputPin) domainElement)) { + return ActionInputPinInCallOpActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3022(containerView, (ValuePin) domainElement)) { + return ValuePinInCallOpActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3023(containerView, (InputPin) domainElement)) { + return InputPinInCallOpActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInCallOpActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3025(containerView, (ValuePin) domainElement)) { + return ValuePinInCallOpActAsTargetEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3026(containerView, (ActionInputPin) domainElement)) { + return ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3027(containerView, (InputPin) domainElement)) { + return InputPinInCallOpActAsTargetEditPart.VISUAL_ID; + } + break; + case SendObjectActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3046(containerView, (ValuePin) domainElement)) { + return ValuePinInSendObjActAsReqEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3047(containerView, (ActionInputPin) domainElement)) { + return ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3048(containerView, (InputPin) domainElement)) { + return InputPinInSendObjActAsReqEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3049(containerView, (ValuePin) domainElement)) { + return ValuePinInSendObjActAsTargetEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3050(containerView, (ActionInputPin) domainElement)) { + return ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3051(containerView, (InputPin) domainElement)) { + return InputPinInSendObjActAsTargetEditPart.VISUAL_ID; + } + break; + case SendSignalActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3053(containerView, (ActionInputPin) domainElement)) { + return ActionInputPinInSendSigActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3054(containerView, (ValuePin) domainElement)) { + return ValuePinInSendSigActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3055(containerView, (InputPin) domainElement)) { + return InputPinInSendSigActEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3060(containerView, (ValuePin) domainElement)) { + return ValuePinInSendSigActAsTargetEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3061(containerView, (ActionInputPin) domainElement)) { + return ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3062(containerView, (InputPin) domainElement)) { + return InputPinInSendSigActAsTargetEditPart.VISUAL_ID; + } + break; + case AcceptEventActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInAcceptEventActionEditPart.VISUAL_ID; + } + break; + case ValueSpecificationActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInValSpecActEditPart.VISUAL_ID; + } + break; + case ExpansionRegionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3074(containerView, (ExpansionNode) domainElement)) { + return ExpansionNodeAsInEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3075(containerView, (ExpansionNode) domainElement)) { + return ExpansionNodeAsOutEditPart.VISUAL_ID; + } + break; + case LoopNodeEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { + return InputPinInLoopNodeAsVariableEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInLoopNodeAsResultEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID; + } + break; + case ReadSelfActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionOutputPinEditPart.VISUAL_ID; + } + break; + case ActivityEditPartCN.VISUAL_ID: + if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityParameterNodeEditPart.VISUAL_ID; + } + break; + case CreateObjectActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID; + } + break; + case ReadStructuralFeatureActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) { + return InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID; + } + break; + case AddStructuralFeatureValueActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3092(containerView, (InputPin) domainElement)) { + return InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3093(containerView, (InputPin) domainElement)) { + return InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) { + return OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID; + } + break; + case DestroyObjectActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3096(containerView, (InputPin) domainElement)) { + return InputPinInDestroyObjectActionEditPart.VISUAL_ID; + } + break; + case ReadVariableActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass()) && isOutputPin_3098(containerView, (OutputPin) domainElement)) { + return OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID; + } + break; + case AddVariableValueActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3100(containerView, (InputPin) domainElement)) { + return InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3101(containerView, (InputPin) domainElement)) { + return InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID; + } + break; + case BroadcastSignalActionEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3103(containerView, (InputPin) domainElement)) { + return InputPinInBroadcastSignalActionEditPart.VISUAL_ID; + } + break; + case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) { + return ParameterEditPart.VISUAL_ID; + } + break; + case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintInActivityAsPrecondEditPart.VISUAL_ID; + } + break; + case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintInActivityAsPostcondEditPart.VISUAL_ID; + } + break; + case ActivityActivityContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) { + return ActivityPartitionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) { + return InterruptibleActivityRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) { + return ActivityEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) { + return ActivityPartitionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintEditPartCN.VISUAL_ID; + } + break; + case ActivityCNParametersCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) { + return ParameterEditPart.VISUAL_ID; + } + break; + case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintInActivityAsPrecondEditPart.VISUAL_ID; + } + break; + case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) { + return ConstraintInActivityAsPostcondEditPart.VISUAL_ID; + } + break; + case ActivityCNContentCompartmentEditPart.VISUAL_ID: + if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) { + return InitialNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) { + return FlowFinalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) { + return OpaqueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) { + return CallBehaviorActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) { + return CallOperationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) { + return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) { + return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) { + return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPrecondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) { + return ConstraintAsLocalPostcondEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) { + return DecisionNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) { + return MergeNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) { + return ForkNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) { + return JoinNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) { + return DataStoreNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) { + return SendObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) { + return SendSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) { + return AcceptEventActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) { + return ValueSpecificationActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) { + return ConditionalNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) { + return ExpansionRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) { + return LoopNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) { + return SequenceNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) { + return StructuredActivityNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) { + return ActivityPartitionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) { + return InterruptibleActivityRegionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) { + return CommentEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) { + return ReadSelfActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) { + return ActivityEditPartCN.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) { + return CreateObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) { + return ReadStructuralFeatureActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddStructuralFeatureValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) { + return DestroyObjectActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) { + return ReadVariableActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) { + return AddVariableValueActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) { + return BroadcastSignalActionEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) { + return CentralBufferNodeEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) { + return ActivityParameterNodeEditPart.VISUAL_ID; + } + break; + } + return -1; + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isExpansionNode_3075(View containerView, ExpansionNode domainElement) { + return isExpansionNode_3075(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isExpansionNode_3074(View containerView, ExpansionNode domainElement) { + return isExpansionNode_3074(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isValuePin_3022(View containerView, ValuePin domainElement) { + return isValuePin_3022(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isValuePin_3025(View containerView, ValuePin domainElement) { + return isValuePin_3025(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isValuePin_3046(View containerView, ValuePin domainElement) { + return isValuePin_3046(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isValuePin_3049(View containerView, ValuePin domainElement) { + return isValuePin_3049(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isValuePin_3054(View containerView, ValuePin domainElement) { + return isValuePin_3054(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isValuePin_3060(View containerView, ValuePin domainElement) { + return isValuePin_3060(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3023(View containerView, InputPin domainElement) { + return isInputPin_3023(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3027(View containerView, InputPin domainElement) { + return isInputPin_3027(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3048(View containerView, InputPin domainElement) { + return isInputPin_3048(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3051(View containerView, InputPin domainElement) { + return isInputPin_3051(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3055(View containerView, InputPin domainElement) { + return isInputPin_3055(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3062(View containerView, InputPin domainElement) { + return isInputPin_3062(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isActionInputPin_3026(View containerView, ActionInputPin domainElement) { + return isActionInputPin_3026(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isActionInputPin_3021(View containerView, ActionInputPin domainElement) { + return isActionInputPin_3021(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isActionInputPin_3047(View containerView, ActionInputPin domainElement) { + return isActionInputPin_3047(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isActionInputPin_3050(View containerView, ActionInputPin domainElement) { + return isActionInputPin_3050(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isActionInputPin_3053(View containerView, ActionInputPin domainElement) { + return isActionInputPin_3053(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isActionInputPin_3061(View containerView, ActionInputPin domainElement) { + return isActionInputPin_3061(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isConstraint_3011(View containerView, Constraint domainElement) { + return isConstraint_3011(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isConstraint_3012(View containerView, Constraint domainElement) { + return isConstraint_3012(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isIntervalConstraint_3032(View containerView, IntervalConstraint domainElement) { + return isIntervalConstraint_3032(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isIntervalConstraint_3033(View containerView, IntervalConstraint domainElement) { + return isIntervalConstraint_3033(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isDurationConstraint_3034(View containerView, DurationConstraint domainElement) { + return isDurationConstraint_3034(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isDurationConstraint_3035(View containerView, DurationConstraint domainElement) { + return isDurationConstraint_3035(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isTimeConstraint_3036(View containerView, TimeConstraint domainElement) { + return isTimeConstraint_3036(domainElement); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isTimeConstraint_3037(View containerView, TimeConstraint domainElement) { + return isTimeConstraint_3037(domainElement); + } + + /** + * @generated + */ + public static boolean canCreateNode(View containerView, int nodeVisualID) { + String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView); + if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { + return false; + } + int containerVisualID; + if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) { + containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView); + } else { + if (containerView instanceof Diagram) { + containerVisualID = ActivityDiagramEditPart.VISUAL_ID; + } else { + return false; + } + } + switch (containerVisualID) { + case ActivityDiagramEditPart.VISUAL_ID: + if (ActivityEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityEditPart.VISUAL_ID: + if (ActivityNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityIsSingleExecutionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityActivityParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityActivityContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InitialNodeEditPart.VISUAL_ID: + if (InitialNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityFinalNodeEditPart.VISUAL_ID: + if (ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case FlowFinalNodeEditPart.VISUAL_ID: + if (FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OpaqueActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (OpaqueActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (OpaqueActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInOpaqueActEditPart.VISUAL_ID: + if (ValuePinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInOActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInOpaqueActEditPart.VISUAL_ID: + if (ActionInputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInOActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInOpaqueActEditPart.VISUAL_ID: + if (InputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInOpaqueActEditPart.VISUAL_ID: + if (OutputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case CallBehaviorActionEditPart.VISUAL_ID: + if (CallBehaviorActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + // not generated but change include on gmfgen, can be override at the generation + if (CallBehaviorActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInCallBeActEditPart.VISUAL_ID: + if (ValuePinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCBActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInCallBeActEditPart.VISUAL_ID: + if (ActionInputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCBActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInCallBeActEditPart.VISUAL_ID: + if (InputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInCallBeActEditPart.VISUAL_ID: + if (OutputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case CallOperationActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (CallOperationActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (CallOperationActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInCallOpActEditPart.VISUAL_ID: + if (ActionInputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCOActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInCallOpActEditPart.VISUAL_ID: + if (ValuePinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCOActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInCallOpActEditPart.VISUAL_ID: + if (InputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInCallOpActEditPart.VISUAL_ID: + if (OutputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: + if (ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: + if (ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: + if (InputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: + if (DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: + if (DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: + if (TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: + if (TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: + if (IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: + if (IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ConstraintAsLocalPrecondEditPart.VISUAL_ID: + if (ConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ConstraintAsLocalPostcondEditPart.VISUAL_ID: + if (ConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case DecisionNodeEditPart.VISUAL_ID: + if (DecisionInputEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case MergeNodeEditPart.VISUAL_ID: + if (MergeNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ForkNodeEditPart.VISUAL_ID: + if (ForkNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case JoinNodeEditPart.VISUAL_ID: + if (JoinSpecEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case DataStoreNodeEditPart.VISUAL_ID: + if (DataStoreNodeLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreSelectionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + // not generated but change include on gmfgen, can be override at the generation + if (DataStoreNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + break; + case SendObjectActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (SendObjectActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (SendObjectActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: + if (ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: + if (ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInSendObjActAsReqEditPart.VISUAL_ID: + if (InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: + if (ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: + if (ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: + if (InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case SendSignalActionEditPart.VISUAL_ID: + if (SendSignalActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendSigActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInSendSigActEditPart.VISUAL_ID: + if (ActionInputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInSendSigActEditPart.VISUAL_ID: + if (ValuePinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInSendSigActEditPart.VISUAL_ID: + if (InputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: + if (ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: + if (ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: + if (InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityParameterNodeEditPart.VISUAL_ID: + if (ParameterNodeNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case AcceptEventActionEditPart.VISUAL_ID: + if (AcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptTimeEventActionLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInAcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInAcceptEventActionEditPart.VISUAL_ID: + if (OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ValueSpecificationActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (ValueSpecificationActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (ValueSpecificationActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInValSpecActEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInValSpecActEditPart.VISUAL_ID: + if (OutputPinInValSpecActLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ConditionalNodeEditPart.VISUAL_ID: + if (ConditionalNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ExpansionRegionEditPart.VISUAL_ID: + if (ExpansionRegionKeywordEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionNodeAsInEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionNodeAsOutEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case LoopNodeEditPart.VISUAL_ID: + if (LoopNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInLoopNodeAsVariableEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInLoopNodeAsResultEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: + if (OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: + if (OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: + if (OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case SequenceNodeEditPart.VISUAL_ID: + if (SequenceNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case StructuredActivityNodeEditPart.VISUAL_ID: + if (StructuredActivityNodeKeywordEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: + if (InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityPartitionEditPart.VISUAL_ID: + if (ActivityPartitionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + // not generated but change include on gmfgen, can be override at the generation + if (BroadcastSignalActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + // not generated but change include on gmfgen, can be override at the generation + if (AddVariableValueActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + break; + case InterruptibleActivityRegionEditPart.VISUAL_ID: + if (InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case CommentEditPartCN.VISUAL_ID: + if (CommentBodyLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ReadSelfActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (ReadSelfActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (ReadSelfActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionOutputPinEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ReadSelfActionOutputPinEditPart.VISUAL_ID: + if (OutputPinInReadSelfActionLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityEditPartCN.VISUAL_ID: + if (ActivityNameEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityIsSingleExecutionCNEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityCNParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityCNContentCompartmentEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case CreateObjectActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (CreateObjectActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (CreateObjectActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: + if (OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ShapeNamedElementEditPart.VISUAL_ID: + if (ShapeNamedElementNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ReadStructuralFeatureActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (ReadStructuralFeatureActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: + if (InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: + if (OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case AddStructuralFeatureValueActionEditPart.VISUAL_ID: + if (AddStructuralFeatureValueActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + // not generated but change include on gmfgen, can be override at the generation + if (AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: + if (InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: + if (InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: + if (OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case DestroyObjectActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (DestroyObjectActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (DestroyObjectActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInDestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInDestroyObjectActionEditPart.VISUAL_ID: + if (InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ReadVariableActionEditPart.VISUAL_ID: + // not generated but change include on gmfgen, can be override at the generation + if (ReadVariableActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + if (ReadVariableActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: + if (OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case AddVariableValueActionEditPart.VISUAL_ID: + if (AddVariableValueActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: + if (InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: + if (InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case BroadcastSignalActionEditPart.VISUAL_ID: + if (BroadcastSignalActionNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInBroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: + if (InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case CentralBufferNodeEditPart.VISUAL_ID: + if (CentralBufferNodeLabelEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeSelectionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + // not generated but change include on gmfgen, can be override at the generation + if (CentralBufferNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + + break; + case ConstraintEditPartCN.VISUAL_ID: + if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintBodyEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: + if (ParameterEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: + if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: + if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityActivityContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityCNParametersCompartmentEditPart.VISUAL_ID: + if (ParameterEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: + if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: + if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ActivityCNContentCompartmentEditPart.VISUAL_ID: + if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CommentEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) { + return true; + } + if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ObjectFlowEditPart.VISUAL_ID: + if (ObjectFlowNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ObjectFlowWeightEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ObjectFlowSelectionEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ObjectFlowTransformationEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (DecisionInputFlowEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ObjectFlowGuardEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ObjectFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ObjectFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ControlFlowEditPart.VISUAL_ID: + if (ControlFlowNameEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ControlFlowWeightEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ControlFlowGuardEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ControlFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ControlFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + case ExceptionHandlerEditPart.VISUAL_ID: + if (ExceptionHandlerTypeEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + if (ExceptionHandlerIconEditPart.VISUAL_ID == nodeVisualID) { + return true; + } + break; + } + return false; + } + + /** + * @generated + */ + public static int getLinkWithClassVisualID(EObject domainElement) { + if (domainElement == null) { + return -1; + } + if (UMLPackage.eINSTANCE.getObjectFlow().isSuperTypeOf(domainElement.eClass())) { + return ObjectFlowEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getControlFlow().isSuperTypeOf(domainElement.eClass())) { + return ControlFlowEditPart.VISUAL_ID; + } + if (UMLPackage.eINSTANCE.getExceptionHandler().isSuperTypeOf(domainElement.eClass())) { + return ExceptionHandlerEditPart.VISUAL_ID; + } + return -1; + } + + /** + * User can change implementation of this method to handle some specific + * situations not covered by default logic. + * + * @generated + */ + private static boolean isDiagram(Package element) { + return true; + } + + /** + * @generated + */ + private static boolean isActionInputPin_3021(ActionInputPin domainElement) { + Object result = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isValuePin_3022(ValuePin domainElement) { + Object result = UMLOCLFactory.getExpression(1, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isInputPin_3023(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(2, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isValuePin_3025(ValuePin domainElement) { + Object result = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isActionInputPin_3026(ActionInputPin domainElement) { + Object result = UMLOCLFactory.getExpression(4, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isInputPin_3027(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(5, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isConstraint_3011(Constraint domainElement) { + Object result = UMLOCLFactory.getExpression(12, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isConstraint_3012(Constraint domainElement) { + Object result = UMLOCLFactory.getExpression(13, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isValuePin_3046(ValuePin domainElement) { + Object result = UMLOCLFactory.getExpression(14, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isActionInputPin_3047(ActionInputPin domainElement) { + Object result = UMLOCLFactory.getExpression(15, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isInputPin_3048(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(16, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isValuePin_3049(ValuePin domainElement) { + Object result = UMLOCLFactory.getExpression(17, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isActionInputPin_3050(ActionInputPin domainElement) { + Object result = UMLOCLFactory.getExpression(18, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isInputPin_3051(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(19, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isActionInputPin_3053(ActionInputPin domainElement) { + Object result = UMLOCLFactory.getExpression(20, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isValuePin_3054(ValuePin domainElement) { + Object result = UMLOCLFactory.getExpression(21, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isInputPin_3055(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(22, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isValuePin_3060(ValuePin domainElement) { + Object result = UMLOCLFactory.getExpression(23, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isActionInputPin_3061(ActionInputPin domainElement) { + Object result = UMLOCLFactory.getExpression(24, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isInputPin_3062(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(25, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isExpansionNode_3074(ExpansionNode domainElement) { + Object result = UMLOCLFactory.getExpression(26, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isExpansionNode_3075(ExpansionNode domainElement) { + Object result = UMLOCLFactory.getExpression(27, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * Redirect call to defined method + * + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3092(View containerView, InputPin domainElement) { + return isInputPin_3092(domainElement); + } + + /** + * @generated + */ + private static boolean isInputPin_3092(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(29, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3093(View containerView, InputPin domainElement) { + return isInputPin_3093(domainElement); + } + + /** + * @generated + */ + private static boolean isInputPin_3093(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(30, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3096(View containerView, InputPin domainElement) { + return isInputPin_3096(domainElement); + } + + /** + * @generated + */ + private static boolean isInputPin_3096(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(31, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isOutputPin_3098(View containerView, OutputPin domainElement) { + return isOutputPin_3098(domainElement); + } + + /** + * @generated + */ + private static boolean isOutputPin_3098(OutputPin domainElement) { + Object result = UMLOCLFactory.getExpression(32, UMLPackage.eINSTANCE.getOutputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3100(View containerView, InputPin domainElement) { + return isInputPin_3100(domainElement); + } + + /** + * @generated + */ + private static boolean isInputPin_3100(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(33, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3101(View containerView, InputPin domainElement) { + return isInputPin_3101(domainElement); + } + + /** + * @generated + */ + private static boolean isInputPin_3101(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(34, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated NOT (method generation is missing or generated calls are incorrect) + */ + private static boolean isInputPin_3103(View containerView, InputPin domainElement) { + return isInputPin_3103(domainElement); + } + + /** + * @generated + */ + private static boolean isInputPin_3103(InputPin domainElement) { + Object result = UMLOCLFactory.getExpression(35, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) { + if (candidate == -1) { + // unrecognized id is always bad + return false; + } + int basic = getNodeVisualID(containerView, domainElement); + return basic == candidate; + } + + /** + * @generated + */ + public static boolean isCompartmentVisualID(int visualID) { + switch (visualID) { + case ActivityActivityParametersCompartmentEditPart.VISUAL_ID: + case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID: + case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID: + case ActivityActivityContentCompartmentEditPart.VISUAL_ID: + case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID: + case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID: + case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID: + case ActivityCNParametersCompartmentEditPart.VISUAL_ID: + case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID: + case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID: + case ActivityCNContentCompartmentEditPart.VISUAL_ID: + return true; + default: + break; + } + return false; + } + + /** + * @generated + */ + public static boolean isSemanticLeafVisualID(int visualID) { + switch (visualID) { + case ActivityDiagramEditPart.VISUAL_ID: + return false; + case ParameterEditPart.VISUAL_ID: + case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: + case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: + case InitialNodeEditPart.VISUAL_ID: + case ActivityFinalNodeEditPart.VISUAL_ID: + case FlowFinalNodeEditPart.VISUAL_ID: + case ConstraintAsLocalPrecondEditPart.VISUAL_ID: + case ConstraintAsLocalPostcondEditPart.VISUAL_ID: + case InputPinInOpaqueActEditPart.VISUAL_ID: + case OutputPinInOpaqueActEditPart.VISUAL_ID: + case ValuePinInOpaqueActEditPart.VISUAL_ID: + case ActionInputPinInOpaqueActEditPart.VISUAL_ID: + case ValuePinInCallBeActEditPart.VISUAL_ID: + case ActionInputPinInCallBeActEditPart.VISUAL_ID: + case InputPinInCallBeActEditPart.VISUAL_ID: + case OutputPinInCallBeActEditPart.VISUAL_ID: + case ActionInputPinInCallOpActEditPart.VISUAL_ID: + case ValuePinInCallOpActEditPart.VISUAL_ID: + case InputPinInCallOpActEditPart.VISUAL_ID: + case OutputPinInCallOpActEditPart.VISUAL_ID: + case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: + case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: + case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: + case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: + case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: + case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: + case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: + case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: + case DecisionNodeEditPart.VISUAL_ID: + case MergeNodeEditPart.VISUAL_ID: + case ForkNodeEditPart.VISUAL_ID: + case JoinNodeEditPart.VISUAL_ID: + case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: + case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: + case InputPinInSendObjActAsReqEditPart.VISUAL_ID: + case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: + case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInSendSigActEditPart.VISUAL_ID: + case ValuePinInSendSigActEditPart.VISUAL_ID: + case InputPinInSendSigActEditPart.VISUAL_ID: + case ActivityParameterNodeEditPart.VISUAL_ID: + case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: + case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: + case OutputPinInAcceptEventActionEditPart.VISUAL_ID: + case ExpansionNodeAsInEditPart.VISUAL_ID: + case ExpansionNodeAsOutEditPart.VISUAL_ID: + case OutputPinInValSpecActEditPart.VISUAL_ID: + case DataStoreNodeEditPart.VISUAL_ID: + case CommentEditPartCN.VISUAL_ID: + case ReadSelfActionOutputPinEditPart.VISUAL_ID: + case ShapeNamedElementEditPart.VISUAL_ID: + case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: + case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: + case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: + case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: + case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: + case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: + case InputPinInDestroyObjectActionEditPart.VISUAL_ID: + case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: + case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: + case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: + case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: + case CentralBufferNodeEditPart.VISUAL_ID: + case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: + case ConstraintEditPartCN.VISUAL_ID: + return true; + default: + break; + } + return false; + } + + /** + * @generated + */ + public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() { + + /** + * @generated + */ + @Override + public int getVisualID(View view) { + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view); + } + + /** + * @generated + */ + @Override + public String getModelID(View view) { + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(view); + } + + /** + * @generated + */ + @Override + public int getNodeVisualID(View containerView, EObject domainElement) { + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement); + } + + /** + * @generated + */ + @Override + public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) { + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate); + } + + /** + * @generated + */ + @Override + public boolean isCompartmentVisualID(int visualID) { + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID); + } + + /** + * @generated + */ + @Override + public boolean isSemanticLeafVisualID(int visualID) { + return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID); + } + }; + + /** + * @generated + */ + private static boolean isIntervalConstraint_3032(IntervalConstraint domainElement) { + Object result = UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isIntervalConstraint_3033(IntervalConstraint domainElement) { + Object result = UMLOCLFactory.getExpression(11, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isDurationConstraint_3034(DurationConstraint domainElement) { + Object result = UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isDurationConstraint_3035(DurationConstraint domainElement) { + Object result = UMLOCLFactory.getExpression(7, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isTimeConstraint_3036(TimeConstraint domainElement) { + Object result = UMLOCLFactory.getExpression(8, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } + + /** + * @generated + */ + private static boolean isTimeConstraint_3037(TimeConstraint domainElement) { + Object result = UMLOCLFactory.getExpression(9, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement); + return result instanceof Boolean && ((Boolean) result).booleanValue(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java index 3382ed274c5..2bb684ffe11 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java @@ -1,3305 +1,3637 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.providers; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; -import org.eclipse.gmf.runtime.common.core.service.IOperation; -import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation; -import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; -import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider; -import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptEventActionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptTimeEventActionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityEdgeWeightParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivitySingleExecutionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallBehaviorActionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallOperationActionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.DecisionInputFlowParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.EdgeGuardParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ExceptionHandlerTypeParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.InputDecisionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.JoinSpecParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowSelectionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowTransformationParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeSelectionParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ParameterParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinValueParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PostConditionConstraintLabelParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PreConditionConstraintLabelParser; -import org.eclipse.papyrus.uml.diagram.activity.parser.custom.StructuredActivityNodeKeywordParser; -import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser; -import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser; -import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * @generated - */ -public class UMLParserProvider extends AbstractProvider implements IParserProvider { - - /** - * @generated - */ - private IParser activityName_5001Parser; - - /** - * @generated - */ - private IParser getActivityName_5001Parser() { - if (activityName_5001Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - activityName_5001Parser = parser; - } - return activityName_5001Parser; - } - - /** - * @generated - */ - private ActivitySingleExecutionParser activityIsSingleExecution_5002Parser; - - /** - * @generated - */ - private IParser getActivityIsSingleExecution_5002Parser() { - if (activityIsSingleExecution_5002Parser == null) { - activityIsSingleExecution_5002Parser = new ActivitySingleExecutionParser(); - } - return activityIsSingleExecution_5002Parser; - } - - /** - * @generated - */ - private ParameterParser parameter_3001Parser; - - /** - * @generated - */ - private IParser getParameter_3001Parser() { - if (parameter_3001Parser == null) { - parameter_3001Parser = new ParameterParser(); - } - return parameter_3001Parser; - } - - /** - * @generated - */ - private PreConditionConstraintLabelParser constraint_3002Parser; - - /** - * @generated - */ - private IParser getConstraint_3002Parser() { - if (constraint_3002Parser == null) { - constraint_3002Parser = new PreConditionConstraintLabelParser(); - } - return constraint_3002Parser; - } - - /** - * @generated - */ - private PostConditionConstraintLabelParser constraint_3003Parser; - - /** - * @generated - */ - private IParser getConstraint_3003Parser() { - if (constraint_3003Parser == null) { - constraint_3003Parser = new PostConditionConstraintLabelParser(); - } - return constraint_3003Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser initialNodeLabel_5080Parser; - - /** - * @generated - */ - private IParser getInitialNodeLabel_5080Parser() { - if (initialNodeLabel_5080Parser == null) { - initialNodeLabel_5080Parser = new AppliedStereotypeParser(); - } - return initialNodeLabel_5080Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser activityFinalNodeLabel_5081Parser; - - /** - * @generated - */ - private IParser getActivityFinalNodeLabel_5081Parser() { - if (activityFinalNodeLabel_5081Parser == null) { - activityFinalNodeLabel_5081Parser = new AppliedStereotypeParser(); - } - return activityFinalNodeLabel_5081Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser flowFinalNodeLabel_5082Parser; - - /** - * @generated - */ - private IParser getFlowFinalNodeLabel_5082Parser() { - if (flowFinalNodeLabel_5082Parser == null) { - flowFinalNodeLabel_5082Parser = new AppliedStereotypeParser(); - } - return flowFinalNodeLabel_5082Parser; - } - - /** - * @generated - */ - private IParser opaqueActionName_5003Parser; - - /** - * @generated - */ - private IParser getOpaqueActionName_5003Parser() { - if (opaqueActionName_5003Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - opaqueActionName_5003Parser = parser; - } - return opaqueActionName_5003Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5011Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5011Parser() { - if (valuePinLabel_5011Parser == null) { - valuePinLabel_5011Parser = new PinParser(); - } - return valuePinLabel_5011Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5024Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5024Parser() { - if (valuePinLabel_5024Parser == null) { - valuePinLabel_5024Parser = new PinValueParser(); - } - return valuePinLabel_5024Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5083Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5083Parser() { - if (valuePinLabel_5083Parser == null) { - valuePinLabel_5083Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5083Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5012Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5012Parser() { - if (actionInputPinLabel_5012Parser == null) { - actionInputPinLabel_5012Parser = new PinParser(); - } - return actionInputPinLabel_5012Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5025Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5025Parser() { - if (actionInputPinLabel_5025Parser == null) { - actionInputPinLabel_5025Parser = new PinValueParser(); - } - return actionInputPinLabel_5025Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5084Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5084Parser() { - if (actionInputPinLabel_5084Parser == null) { - actionInputPinLabel_5084Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5084Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5009Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5009Parser() { - if (inputPinLabel_5009Parser == null) { - inputPinLabel_5009Parser = new PinParser(); - } - return inputPinLabel_5009Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5085Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5085Parser() { - if (inputPinLabel_5085Parser == null) { - inputPinLabel_5085Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5085Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5010Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5010Parser() { - if (outputPinLabel_5010Parser == null) { - outputPinLabel_5010Parser = new PinParser(); - } - return outputPinLabel_5010Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5086Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5086Parser() { - if (outputPinLabel_5086Parser == null) { - outputPinLabel_5086Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5086Parser; - } - - /** - * @generated - */ - private CallBehaviorActionParser callBehaviorActionLabel_5004Parser; - - /** - * @generated - */ - private IParser getCallBehaviorActionLabel_5004Parser() { - if (callBehaviorActionLabel_5004Parser == null) { - callBehaviorActionLabel_5004Parser = new CallBehaviorActionParser(); - } - return callBehaviorActionLabel_5004Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5013Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5013Parser() { - if (valuePinLabel_5013Parser == null) { - valuePinLabel_5013Parser = new PinParser(); - } - return valuePinLabel_5013Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5026Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5026Parser() { - if (valuePinLabel_5026Parser == null) { - valuePinLabel_5026Parser = new PinValueParser(); - } - return valuePinLabel_5026Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5087Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5087Parser() { - if (valuePinLabel_5087Parser == null) { - valuePinLabel_5087Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5087Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5014Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5014Parser() { - if (actionInputPinLabel_5014Parser == null) { - actionInputPinLabel_5014Parser = new PinParser(); - } - return actionInputPinLabel_5014Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5027Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5027Parser() { - if (actionInputPinLabel_5027Parser == null) { - actionInputPinLabel_5027Parser = new PinValueParser(); - } - return actionInputPinLabel_5027Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5088Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5088Parser() { - if (actionInputPinLabel_5088Parser == null) { - actionInputPinLabel_5088Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5088Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5015Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5015Parser() { - if (inputPinLabel_5015Parser == null) { - inputPinLabel_5015Parser = new PinParser(); - } - return inputPinLabel_5015Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5089Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5089Parser() { - if (inputPinLabel_5089Parser == null) { - inputPinLabel_5089Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5089Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5016Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5016Parser() { - if (outputPinLabel_5016Parser == null) { - outputPinLabel_5016Parser = new PinParser(); - } - return outputPinLabel_5016Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5090Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5090Parser() { - if (outputPinLabel_5090Parser == null) { - outputPinLabel_5090Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5090Parser; - } - - /** - * @generated - */ - private CallOperationActionParser callOperationActionLabel_5006Parser; - - /** - * @generated - */ - private IParser getCallOperationActionLabel_5006Parser() { - if (callOperationActionLabel_5006Parser == null) { - callOperationActionLabel_5006Parser = new CallOperationActionParser(); - } - return callOperationActionLabel_5006Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5017Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5017Parser() { - if (actionInputPinLabel_5017Parser == null) { - actionInputPinLabel_5017Parser = new PinParser(); - } - return actionInputPinLabel_5017Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5028Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5028Parser() { - if (actionInputPinLabel_5028Parser == null) { - actionInputPinLabel_5028Parser = new PinValueParser(); - } - return actionInputPinLabel_5028Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5091Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5091Parser() { - if (actionInputPinLabel_5091Parser == null) { - actionInputPinLabel_5091Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5091Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5018Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5018Parser() { - if (valuePinLabel_5018Parser == null) { - valuePinLabel_5018Parser = new PinParser(); - } - return valuePinLabel_5018Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5029Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5029Parser() { - if (valuePinLabel_5029Parser == null) { - valuePinLabel_5029Parser = new PinValueParser(); - } - return valuePinLabel_5029Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5092Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5092Parser() { - if (valuePinLabel_5092Parser == null) { - valuePinLabel_5092Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5092Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5019Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5019Parser() { - if (inputPinLabel_5019Parser == null) { - inputPinLabel_5019Parser = new PinParser(); - } - return inputPinLabel_5019Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5093Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5093Parser() { - if (inputPinLabel_5093Parser == null) { - inputPinLabel_5093Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5093Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5020Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5020Parser() { - if (outputPinLabel_5020Parser == null) { - outputPinLabel_5020Parser = new PinParser(); - } - return outputPinLabel_5020Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5094Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5094Parser() { - if (outputPinLabel_5094Parser == null) { - outputPinLabel_5094Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5094Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5021Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5021Parser() { - if (valuePinLabel_5021Parser == null) { - valuePinLabel_5021Parser = new PinParser(); - } - return valuePinLabel_5021Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5030Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5030Parser() { - if (valuePinLabel_5030Parser == null) { - valuePinLabel_5030Parser = new PinValueParser(); - } - return valuePinLabel_5030Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5095Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5095Parser() { - if (valuePinLabel_5095Parser == null) { - valuePinLabel_5095Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5095Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5022Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5022Parser() { - if (actionInputPinLabel_5022Parser == null) { - actionInputPinLabel_5022Parser = new PinParser(); - } - return actionInputPinLabel_5022Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5031Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5031Parser() { - if (actionInputPinLabel_5031Parser == null) { - actionInputPinLabel_5031Parser = new PinValueParser(); - } - return actionInputPinLabel_5031Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5096Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5096Parser() { - if (actionInputPinLabel_5096Parser == null) { - actionInputPinLabel_5096Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5096Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5023Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5023Parser() { - if (inputPinLabel_5023Parser == null) { - inputPinLabel_5023Parser = new PinParser(); - } - return inputPinLabel_5023Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5097Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5097Parser() { - if (inputPinLabel_5097Parser == null) { - inputPinLabel_5097Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5097Parser; - } - - /** - * @generated - */ - private IParser constraintName_5007Parser; - - /** - * @generated - */ - private IParser getConstraintName_5007Parser() { - if (constraintName_5007Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - constraintName_5007Parser = parser; - } - return constraintName_5007Parser; - } - - /** - * @generated - */ - private ConstraintParser constraintLabel_5136Parser; - - /** - * @generated - */ - private IParser getConstraintLabel_5136Parser() { - if (constraintLabel_5136Parser == null) { - constraintLabel_5136Parser = new ConstraintParser(); - } - return constraintLabel_5136Parser; - } - - /** - * @generated - */ - private IParser constraintName_5008Parser; - - /** - * @generated - */ - private IParser getConstraintName_5008Parser() { - if (constraintName_5008Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - constraintName_5008Parser = parser; - } - return constraintName_5008Parser; - } - - /** - * @generated - */ - private ConstraintParser constraintLabel_5137Parser; - - /** - * @generated - */ - private IParser getConstraintLabel_5137Parser() { - if (constraintLabel_5137Parser == null) { - constraintLabel_5137Parser = new ConstraintParser(); - } - return constraintLabel_5137Parser; - } - - /** - * @generated - */ - private InputDecisionParser decisionNodeLabel_5043Parser; - - /** - * @generated - */ - private IParser getDecisionNodeLabel_5043Parser() { - if (decisionNodeLabel_5043Parser == null) { - decisionNodeLabel_5043Parser = new InputDecisionParser(); - } - return decisionNodeLabel_5043Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser decisionNodeLabel_5098Parser; - - /** - * @generated - */ - private IParser getDecisionNodeLabel_5098Parser() { - if (decisionNodeLabel_5098Parser == null) { - decisionNodeLabel_5098Parser = new AppliedStereotypeParser(); - } - return decisionNodeLabel_5098Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser mergeNodeLabel_5099Parser; - - /** - * @generated - */ - private IParser getMergeNodeLabel_5099Parser() { - if (mergeNodeLabel_5099Parser == null) { - mergeNodeLabel_5099Parser = new AppliedStereotypeParser(); - } - return mergeNodeLabel_5099Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser forkNodeLabel_5100Parser; - - /** - * @generated - */ - private IParser getForkNodeLabel_5100Parser() { - if (forkNodeLabel_5100Parser == null) { - forkNodeLabel_5100Parser = new AppliedStereotypeParser(); - } - return forkNodeLabel_5100Parser; - } - - /** - * @generated - */ - private JoinSpecParser joinNodeLabel_5042Parser; - - /** - * @generated - */ - private IParser getJoinNodeLabel_5042Parser() { - if (joinNodeLabel_5042Parser == null) { - joinNodeLabel_5042Parser = new JoinSpecParser(); - } - return joinNodeLabel_5042Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser joinNodeLabel_5101Parser; - - /** - * @generated - */ - private IParser getJoinNodeLabel_5101Parser() { - if (joinNodeLabel_5101Parser == null) { - joinNodeLabel_5101Parser = new AppliedStereotypeParser(); - } - return joinNodeLabel_5101Parser; - } - - /** - * @generated - */ - private IParser sendObjectActionName_5059Parser; - - /** - * @generated - */ - private IParser getSendObjectActionName_5059Parser() { - if (sendObjectActionName_5059Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - sendObjectActionName_5059Parser = parser; - } - return sendObjectActionName_5059Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5049Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5049Parser() { - if (valuePinLabel_5049Parser == null) { - valuePinLabel_5049Parser = new PinParser(); - } - return valuePinLabel_5049Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5050Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5050Parser() { - if (valuePinLabel_5050Parser == null) { - valuePinLabel_5050Parser = new PinValueParser(); - } - return valuePinLabel_5050Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5102Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5102Parser() { - if (valuePinLabel_5102Parser == null) { - valuePinLabel_5102Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5102Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5051Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5051Parser() { - if (actionInputPinLabel_5051Parser == null) { - actionInputPinLabel_5051Parser = new PinParser(); - } - return actionInputPinLabel_5051Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5052Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5052Parser() { - if (actionInputPinLabel_5052Parser == null) { - actionInputPinLabel_5052Parser = new PinValueParser(); - } - return actionInputPinLabel_5052Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5103Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5103Parser() { - if (actionInputPinLabel_5103Parser == null) { - actionInputPinLabel_5103Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5103Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5053Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5053Parser() { - if (inputPinLabel_5053Parser == null) { - inputPinLabel_5053Parser = new PinParser(); - } - return inputPinLabel_5053Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5104Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5104Parser() { - if (inputPinLabel_5104Parser == null) { - inputPinLabel_5104Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5104Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5054Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5054Parser() { - if (valuePinLabel_5054Parser == null) { - valuePinLabel_5054Parser = new PinParser(); - } - return valuePinLabel_5054Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5055Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5055Parser() { - if (valuePinLabel_5055Parser == null) { - valuePinLabel_5055Parser = new PinValueParser(); - } - return valuePinLabel_5055Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5105Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5105Parser() { - if (valuePinLabel_5105Parser == null) { - valuePinLabel_5105Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5105Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5056Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5056Parser() { - if (actionInputPinLabel_5056Parser == null) { - actionInputPinLabel_5056Parser = new PinParser(); - } - return actionInputPinLabel_5056Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5057Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5057Parser() { - if (actionInputPinLabel_5057Parser == null) { - actionInputPinLabel_5057Parser = new PinValueParser(); - } - return actionInputPinLabel_5057Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5106Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5106Parser() { - if (actionInputPinLabel_5106Parser == null) { - actionInputPinLabel_5106Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5106Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5058Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5058Parser() { - if (inputPinLabel_5058Parser == null) { - inputPinLabel_5058Parser = new PinParser(); - } - return inputPinLabel_5058Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5107Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5107Parser() { - if (inputPinLabel_5107Parser == null) { - inputPinLabel_5107Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5107Parser; - } - - /** - * @generated - */ - private IParser sendSignalActionName_5060Parser; - - /** - * @generated - */ - private IParser getSendSignalActionName_5060Parser() { - if (sendSignalActionName_5060Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - sendSignalActionName_5060Parser = parser; - } - return sendSignalActionName_5060Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5061Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5061Parser() { - if (actionInputPinLabel_5061Parser == null) { - actionInputPinLabel_5061Parser = new PinParser(); - } - return actionInputPinLabel_5061Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5062Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5062Parser() { - if (actionInputPinLabel_5062Parser == null) { - actionInputPinLabel_5062Parser = new PinValueParser(); - } - return actionInputPinLabel_5062Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5108Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5108Parser() { - if (actionInputPinLabel_5108Parser == null) { - actionInputPinLabel_5108Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5108Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5063Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5063Parser() { - if (valuePinLabel_5063Parser == null) { - valuePinLabel_5063Parser = new PinParser(); - } - return valuePinLabel_5063Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5064Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5064Parser() { - if (valuePinLabel_5064Parser == null) { - valuePinLabel_5064Parser = new PinValueParser(); - } - return valuePinLabel_5064Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5109Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5109Parser() { - if (valuePinLabel_5109Parser == null) { - valuePinLabel_5109Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5109Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5065Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5065Parser() { - if (inputPinLabel_5065Parser == null) { - inputPinLabel_5065Parser = new PinParser(); - } - return inputPinLabel_5065Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5110Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5110Parser() { - if (inputPinLabel_5110Parser == null) { - inputPinLabel_5110Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5110Parser; - } - - /** - * @generated - */ - private PinParser valuePinLabel_5072Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5072Parser() { - if (valuePinLabel_5072Parser == null) { - valuePinLabel_5072Parser = new PinParser(); - } - return valuePinLabel_5072Parser; - } - - /** - * @generated - */ - private PinValueParser valuePinLabel_5073Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5073Parser() { - if (valuePinLabel_5073Parser == null) { - valuePinLabel_5073Parser = new PinValueParser(); - } - return valuePinLabel_5073Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser valuePinLabel_5111Parser; - - /** - * @generated - */ - private IParser getValuePinLabel_5111Parser() { - if (valuePinLabel_5111Parser == null) { - valuePinLabel_5111Parser = new AppliedStereotypeParser(); - } - return valuePinLabel_5111Parser; - } - - /** - * @generated - */ - private PinParser actionInputPinLabel_5074Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5074Parser() { - if (actionInputPinLabel_5074Parser == null) { - actionInputPinLabel_5074Parser = new PinParser(); - } - return actionInputPinLabel_5074Parser; - } - - /** - * @generated - */ - private PinValueParser actionInputPinLabel_5075Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5075Parser() { - if (actionInputPinLabel_5075Parser == null) { - actionInputPinLabel_5075Parser = new PinValueParser(); - } - return actionInputPinLabel_5075Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser actionInputPinLabel_5112Parser; - - /** - * @generated - */ - private IParser getActionInputPinLabel_5112Parser() { - if (actionInputPinLabel_5112Parser == null) { - actionInputPinLabel_5112Parser = new AppliedStereotypeParser(); - } - return actionInputPinLabel_5112Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5076Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5076Parser() { - if (inputPinLabel_5076Parser == null) { - inputPinLabel_5076Parser = new PinParser(); - } - return inputPinLabel_5076Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5113Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5113Parser() { - if (inputPinLabel_5113Parser == null) { - inputPinLabel_5113Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5113Parser; - } - - /** - * @generated - */ - private ActivityParameterNodeParser activityParameterNodeLabel_5071Parser; - - /** - * @generated - */ - private IParser getActivityParameterNodeLabel_5071Parser() { - if (activityParameterNodeLabel_5071Parser == null) { - activityParameterNodeLabel_5071Parser = new ActivityParameterNodeParser(); - } - return activityParameterNodeLabel_5071Parser; - } - - /** - * @generated - */ - private AcceptEventActionParser acceptEventActionLabel_5078Parser; - - /** - * @generated - */ - private IParser getAcceptEventActionLabel_5078Parser() { - if (acceptEventActionLabel_5078Parser == null) { - acceptEventActionLabel_5078Parser = new AcceptEventActionParser(); - } - return acceptEventActionLabel_5078Parser; - } - - /** - * @generated - */ - private AcceptTimeEventActionParser acceptEventActionLabel_5079Parser; - - /** - * @generated - */ - private IParser getAcceptEventActionLabel_5079Parser() { - if (acceptEventActionLabel_5079Parser == null) { - acceptEventActionLabel_5079Parser = new AcceptTimeEventActionParser(); - } - return acceptEventActionLabel_5079Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser acceptEventActionLabel_5115Parser; - - /** - * @generated - */ - private IParser getAcceptEventActionLabel_5115Parser() { - if (acceptEventActionLabel_5115Parser == null) { - acceptEventActionLabel_5115Parser = new AppliedStereotypeParser(); - } - return acceptEventActionLabel_5115Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5077Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5077Parser() { - if (outputPinLabel_5077Parser == null) { - outputPinLabel_5077Parser = new PinParser(); - } - return outputPinLabel_5077Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5114Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5114Parser() { - if (outputPinLabel_5114Parser == null) { - outputPinLabel_5114Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5114Parser; - } - - /** - * @generated - */ - private StructuredActivityNodeKeywordParser structuredActivityNodeLabel_5117Parser; - - /** - * @generated - */ - private IParser getStructuredActivityNodeLabel_5117Parser() { - if (structuredActivityNodeLabel_5117Parser == null) { - structuredActivityNodeLabel_5117Parser = new StructuredActivityNodeKeywordParser(); - } - return structuredActivityNodeLabel_5117Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5178Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5178Parser() { - if (inputPinLabel_5178Parser == null) { - inputPinLabel_5178Parser = new PinParser(); - } - return inputPinLabel_5178Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5179Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5179Parser() { - if (inputPinLabel_5179Parser == null) { - inputPinLabel_5179Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5179Parser; - } - - /** - * @generated - */ - private IParser activityPartitionName_5118Parser; - - /** - * @generated - */ - private IParser getActivityPartitionName_5118Parser() { - if (activityPartitionName_5118Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - activityPartitionName_5118Parser = parser; - } - return activityPartitionName_5118Parser; - } - - /** - * @generated - */ - private ActivitySingleExecutionParser namedElementName_5129Parser; - - /** - * @generated - */ - private IParser getNamedElementName_5129Parser() { - if (namedElementName_5129Parser == null) { - namedElementName_5129Parser = new ActivitySingleExecutionParser(); - } - return namedElementName_5129Parser; - } - - /** - * @generated - */ - private IParser createObjectActionName_5148Parser; - - /** - * @generated - */ - private IParser getCreateObjectActionName_5148Parser() { - if (createObjectActionName_5148Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - createObjectActionName_5148Parser = parser; - } - return createObjectActionName_5148Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5146Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5146Parser() { - if (outputPinLabel_5146Parser == null) { - outputPinLabel_5146Parser = new PinParser(); - } - return outputPinLabel_5146Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5147Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5147Parser() { - if (outputPinLabel_5147Parser == null) { - outputPinLabel_5147Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5147Parser; - } - - /** - * @generated - */ - private IParser readStructuralFeatureActionName_5153Parser; - - /** - * @generated - */ - private IParser getReadStructuralFeatureActionName_5153Parser() { - if (readStructuralFeatureActionName_5153Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - readStructuralFeatureActionName_5153Parser = parser; - } - return readStructuralFeatureActionName_5153Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5149Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5149Parser() { - if (inputPinLabel_5149Parser == null) { - inputPinLabel_5149Parser = new PinParser(); - } - return inputPinLabel_5149Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5150Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5150Parser() { - if (inputPinLabel_5150Parser == null) { - inputPinLabel_5150Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5150Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5151Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5151Parser() { - if (outputPinLabel_5151Parser == null) { - outputPinLabel_5151Parser = new PinParser(); - } - return outputPinLabel_5151Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5152Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5152Parser() { - if (outputPinLabel_5152Parser == null) { - outputPinLabel_5152Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5152Parser; - } - - /** - * @generated - */ - private IParser addStructuralFeatureValueActionName_5160Parser; - - /** - * @generated - */ - private IParser getAddStructuralFeatureValueActionName_5160Parser() { - if (addStructuralFeatureValueActionName_5160Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - addStructuralFeatureValueActionName_5160Parser = parser; - } - return addStructuralFeatureValueActionName_5160Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5154Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5154Parser() { - if (inputPinLabel_5154Parser == null) { - inputPinLabel_5154Parser = new PinParser(); - } - return inputPinLabel_5154Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5155Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5155Parser() { - if (inputPinLabel_5155Parser == null) { - inputPinLabel_5155Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5155Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5156Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5156Parser() { - if (inputPinLabel_5156Parser == null) { - inputPinLabel_5156Parser = new PinParser(); - } - return inputPinLabel_5156Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5157Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5157Parser() { - if (inputPinLabel_5157Parser == null) { - inputPinLabel_5157Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5157Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5158Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5158Parser() { - if (outputPinLabel_5158Parser == null) { - outputPinLabel_5158Parser = new PinParser(); - } - return outputPinLabel_5158Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5159Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5159Parser() { - if (outputPinLabel_5159Parser == null) { - outputPinLabel_5159Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5159Parser; - } - - /** - * @generated - */ - private IParser destroyObjectActionName_5163Parser; - - /** - * @generated - */ - private IParser getDestroyObjectActionName_5163Parser() { - if (destroyObjectActionName_5163Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - destroyObjectActionName_5163Parser = parser; - } - return destroyObjectActionName_5163Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5161Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5161Parser() { - if (inputPinLabel_5161Parser == null) { - inputPinLabel_5161Parser = new PinParser(); - } - return inputPinLabel_5161Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5162Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5162Parser() { - if (inputPinLabel_5162Parser == null) { - inputPinLabel_5162Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5162Parser; - } - - /** - * @generated - */ - private IParser readVariableActionName_5166Parser; - - /** - * @generated - */ - private IParser getReadVariableActionName_5166Parser() { - if (readVariableActionName_5166Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - readVariableActionName_5166Parser = parser; - } - return readVariableActionName_5166Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5164Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5164Parser() { - if (outputPinLabel_5164Parser == null) { - outputPinLabel_5164Parser = new PinParser(); - } - return outputPinLabel_5164Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5165Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5165Parser() { - if (outputPinLabel_5165Parser == null) { - outputPinLabel_5165Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5165Parser; - } - - /** - * @generated - */ - private IParser addVariableValueActionName_5171Parser; - - /** - * @generated - */ - private IParser getAddVariableValueActionName_5171Parser() { - if (addVariableValueActionName_5171Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - addVariableValueActionName_5171Parser = parser; - } - return addVariableValueActionName_5171Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5167Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5167Parser() { - if (inputPinLabel_5167Parser == null) { - inputPinLabel_5167Parser = new PinParser(); - } - return inputPinLabel_5167Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5168Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5168Parser() { - if (inputPinLabel_5168Parser == null) { - inputPinLabel_5168Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5168Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5169Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5169Parser() { - if (inputPinLabel_5169Parser == null) { - inputPinLabel_5169Parser = new PinParser(); - } - return inputPinLabel_5169Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5170Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5170Parser() { - if (inputPinLabel_5170Parser == null) { - inputPinLabel_5170Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5170Parser; - } - - /** - * @generated - */ - private IParser broadcastSignalActionName_5175Parser; - - /** - * @generated - */ - private IParser getBroadcastSignalActionName_5175Parser() { - if (broadcastSignalActionName_5175Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - broadcastSignalActionName_5175Parser = parser; - } - return broadcastSignalActionName_5175Parser; - } - - /** - * @generated - */ - private PinParser inputPinLabel_5172Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5172Parser() { - if (inputPinLabel_5172Parser == null) { - inputPinLabel_5172Parser = new PinParser(); - } - return inputPinLabel_5172Parser; - } - - /** - * @generated - */ - private PinValueParser inputPinLabel_5173Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5173Parser() { - if (inputPinLabel_5173Parser == null) { - inputPinLabel_5173Parser = new PinValueParser(); - } - return inputPinLabel_5173Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser inputPinLabel_5174Parser; - - /** - * @generated - */ - private IParser getInputPinLabel_5174Parser() { - if (inputPinLabel_5174Parser == null) { - inputPinLabel_5174Parser = new AppliedStereotypeParser(); - } - return inputPinLabel_5174Parser; - } - - /** - * @generated - */ - private ObjectNodeParser centralBufferNodeLabel_5176Parser; - - /** - * @generated - */ - private IParser getCentralBufferNodeLabel_5176Parser() { - if (centralBufferNodeLabel_5176Parser == null) { - centralBufferNodeLabel_5176Parser = new ObjectNodeParser(); - } - return centralBufferNodeLabel_5176Parser; - } - - /** - * @generated - */ - private ObjectNodeSelectionParser centralBufferNodeLabel_5177Parser; - - /** - * @generated - */ - private IParser getCentralBufferNodeLabel_5177Parser() { - if (centralBufferNodeLabel_5177Parser == null) { - centralBufferNodeLabel_5177Parser = new ObjectNodeSelectionParser(); - } - return centralBufferNodeLabel_5177Parser; - } - - /** - * @generated - */ - private IParser constraintName_5189Parser; - - /** - * @generated - */ - private IParser getConstraintName_5189Parser() { - if (constraintName_5189Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - constraintName_5189Parser = parser; - } - return constraintName_5189Parser; - } - - /** - * @generated - */ - private ConstraintParser constraintSpecification_5190Parser; - - /** - * @generated - */ - private IParser getConstraintSpecification_5190Parser() { - if (constraintSpecification_5190Parser == null) { - constraintSpecification_5190Parser = new ConstraintParser(); - } - return constraintSpecification_5190Parser; - } - - /** - * @generated - */ - private CommentParser commentBody_5138Parser; - - /** - * @generated - */ - private IParser getCommentBody_5138Parser() { - if (commentBody_5138Parser == null) { - commentBody_5138Parser = new CommentParser(); - } - return commentBody_5138Parser; - } - - /** - * @generated - */ - private IParser readSelfActionName_5139Parser; - - /** - * @generated - */ - private IParser getReadSelfActionName_5139Parser() { - if (readSelfActionName_5139Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - readSelfActionName_5139Parser = parser; - } - return readSelfActionName_5139Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5144Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5144Parser() { - if (outputPinLabel_5144Parser == null) { - outputPinLabel_5144Parser = new PinParser(); - } - return outputPinLabel_5144Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5145Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5145Parser() { - if (outputPinLabel_5145Parser == null) { - outputPinLabel_5145Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5145Parser; - } - - /** - * @generated - */ - private IParser activityName_5142Parser; - - /** - * @generated - */ - private IParser getActivityName_5142Parser() { - if (activityName_5142Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - activityName_5142Parser = parser; - } - return activityName_5142Parser; - } - - /** - * @generated - */ - private ActivitySingleExecutionParser activityIsSingleExecution_5143Parser; - - /** - * @generated - */ - private IParser getActivityIsSingleExecution_5143Parser() { - if (activityIsSingleExecution_5143Parser == null) { - activityIsSingleExecution_5143Parser = new ActivitySingleExecutionParser(); - } - return activityIsSingleExecution_5143Parser; - } - - /** - * @generated - */ - private IParser valueSpecificationActionName_5126Parser; - - /** - * @generated - */ - private IParser getValueSpecificationActionName_5126Parser() { - if (valueSpecificationActionName_5126Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - valueSpecificationActionName_5126Parser = parser; - } - return valueSpecificationActionName_5126Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5124Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5124Parser() { - if (outputPinLabel_5124Parser == null) { - outputPinLabel_5124Parser = new PinParser(); - } - return outputPinLabel_5124Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5125Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5125Parser() { - if (outputPinLabel_5125Parser == null) { - outputPinLabel_5125Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5125Parser; - } - - /** - * @generated - */ - private ObjectNodeParser dataStoreNodeLabel_5127Parser; - - /** - * @generated - */ - private IParser getDataStoreNodeLabel_5127Parser() { - if (dataStoreNodeLabel_5127Parser == null) { - dataStoreNodeLabel_5127Parser = new ObjectNodeParser(); - } - return dataStoreNodeLabel_5127Parser; - } - - /** - * @generated - */ - private ObjectNodeSelectionParser dataStoreNodeLabel_5128Parser; - - /** - * @generated - */ - private IParser getDataStoreNodeLabel_5128Parser() { - if (dataStoreNodeLabel_5128Parser == null) { - dataStoreNodeLabel_5128Parser = new ObjectNodeSelectionParser(); - } - return dataStoreNodeLabel_5128Parser; - } - - /** - * @generated - */ - private StructuredActivityNodeKeywordParser conditionalNodeLabel_5119Parser; - - /** - * @generated - */ - private IParser getConditionalNodeLabel_5119Parser() { - if (conditionalNodeLabel_5119Parser == null) { - conditionalNodeLabel_5119Parser = new StructuredActivityNodeKeywordParser(); - } - return conditionalNodeLabel_5119Parser; - } - - /** - * @generated - */ - private StructuredActivityNodeKeywordParser expansionRegionLabel_5120Parser; - - /** - * @generated - */ - private IParser getExpansionRegionLabel_5120Parser() { - if (expansionRegionLabel_5120Parser == null) { - expansionRegionLabel_5120Parser = new StructuredActivityNodeKeywordParser(); - } - return expansionRegionLabel_5120Parser; - } - - /** - * @generated - */ - private StructuredActivityNodeKeywordParser loopNodeLabel_5121Parser; - - /** - * @generated - */ - private IParser getLoopNodeLabel_5121Parser() { - if (loopNodeLabel_5121Parser == null) { - loopNodeLabel_5121Parser = new StructuredActivityNodeKeywordParser(); - } - return loopNodeLabel_5121Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5184Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5184Parser() { - if (outputPinLabel_5184Parser == null) { - outputPinLabel_5184Parser = new PinParser(); - } - return outputPinLabel_5184Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5185Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5185Parser() { - if (outputPinLabel_5185Parser == null) { - outputPinLabel_5185Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5185Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5186Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5186Parser() { - if (outputPinLabel_5186Parser == null) { - outputPinLabel_5186Parser = new PinParser(); - } - return outputPinLabel_5186Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5183Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5183Parser() { - if (outputPinLabel_5183Parser == null) { - outputPinLabel_5183Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5183Parser; - } - - /** - * @generated - */ - private PinParser outputPinLabel_5187Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5187Parser() { - if (outputPinLabel_5187Parser == null) { - outputPinLabel_5187Parser = new PinParser(); - } - return outputPinLabel_5187Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser outputPinLabel_5188Parser; - - /** - * @generated - */ - private IParser getOutputPinLabel_5188Parser() { - if (outputPinLabel_5188Parser == null) { - outputPinLabel_5188Parser = new AppliedStereotypeParser(); - } - return outputPinLabel_5188Parser; - } - - /** - * @generated - */ - private StructuredActivityNodeKeywordParser sequenceNodeLabel_5123Parser; - - /** - * @generated - */ - private IParser getSequenceNodeLabel_5123Parser() { - if (sequenceNodeLabel_5123Parser == null) { - sequenceNodeLabel_5123Parser = new StructuredActivityNodeKeywordParser(); - } - return sequenceNodeLabel_5123Parser; - } - - /** - * @generated - */ - private IParser intervalConstraintName_5036Parser; - - /** - * @generated - */ - private IParser getIntervalConstraintName_5036Parser() { - if (intervalConstraintName_5036Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - intervalConstraintName_5036Parser = parser; - } - return intervalConstraintName_5036Parser; - } - - /** - * @generated - */ - private ConstraintParser intervalConstraintLabel_5134Parser; - - /** - * @generated - */ - private IParser getIntervalConstraintLabel_5134Parser() { - if (intervalConstraintLabel_5134Parser == null) { - intervalConstraintLabel_5134Parser = new ConstraintParser(); - } - return intervalConstraintLabel_5134Parser; - } - - /** - * @generated - */ - private IParser intervalConstraintName_5037Parser; - - /** - * @generated - */ - private IParser getIntervalConstraintName_5037Parser() { - if (intervalConstraintName_5037Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - intervalConstraintName_5037Parser = parser; - } - return intervalConstraintName_5037Parser; - } - - /** - * @generated - */ - private ConstraintParser intervalConstraintLabel_5135Parser; - - /** - * @generated - */ - private IParser getIntervalConstraintLabel_5135Parser() { - if (intervalConstraintLabel_5135Parser == null) { - intervalConstraintLabel_5135Parser = new ConstraintParser(); - } - return intervalConstraintLabel_5135Parser; - } - - /** - * @generated - */ - private IParser durationConstraintName_5038Parser; - - /** - * @generated - */ - private IParser getDurationConstraintName_5038Parser() { - if (durationConstraintName_5038Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - durationConstraintName_5038Parser = parser; - } - return durationConstraintName_5038Parser; - } - - /** - * @generated - */ - private ConstraintParser durationConstraintLabel_5130Parser; - - /** - * @generated - */ - private IParser getDurationConstraintLabel_5130Parser() { - if (durationConstraintLabel_5130Parser == null) { - durationConstraintLabel_5130Parser = new ConstraintParser(); - } - return durationConstraintLabel_5130Parser; - } - - /** - * @generated - */ - private IParser durationConstraintName_5039Parser; - - /** - * @generated - */ - private IParser getDurationConstraintName_5039Parser() { - if (durationConstraintName_5039Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - durationConstraintName_5039Parser = parser; - } - return durationConstraintName_5039Parser; - } - - /** - * @generated - */ - private ConstraintParser durationConstraintLabel_5131Parser; - - /** - * @generated - */ - private IParser getDurationConstraintLabel_5131Parser() { - if (durationConstraintLabel_5131Parser == null) { - durationConstraintLabel_5131Parser = new ConstraintParser(); - } - return durationConstraintLabel_5131Parser; - } - - /** - * @generated - */ - private IParser timeConstraintName_5040Parser; - - /** - * @generated - */ - private IParser getTimeConstraintName_5040Parser() { - if (timeConstraintName_5040Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - timeConstraintName_5040Parser = parser; - } - return timeConstraintName_5040Parser; - } - - /** - * @generated - */ - private ConstraintParser timeConstraintLabel_5132Parser; - - /** - * @generated - */ - private IParser getTimeConstraintLabel_5132Parser() { - if (timeConstraintLabel_5132Parser == null) { - timeConstraintLabel_5132Parser = new ConstraintParser(); - } - return timeConstraintLabel_5132Parser; - } - - /** - * @generated - */ - private IParser timeConstraintName_5041Parser; - - /** - * @generated - */ - private IParser getTimeConstraintName_5041Parser() { - if (timeConstraintName_5041Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - timeConstraintName_5041Parser = parser; - } - return timeConstraintName_5041Parser; - } - - /** - * @generated - */ - private ConstraintParser timeConstraintLabel_5133Parser; - - /** - * @generated - */ - private IParser getTimeConstraintLabel_5133Parser() { - if (timeConstraintLabel_5133Parser == null) { - timeConstraintLabel_5133Parser = new ConstraintParser(); - } - return timeConstraintLabel_5133Parser; - } - - /** - * @generated - */ - private IParser objectFlowName_6001Parser; - - /** - * @generated - */ - private IParser getObjectFlowName_6001Parser() { - if (objectFlowName_6001Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - objectFlowName_6001Parser = parser; - } - return objectFlowName_6001Parser; - } - - /** - * @generated - */ - private ActivityEdgeWeightParser objectFlowLabel_6002Parser; - - /** - * @generated - */ - private IParser getObjectFlowLabel_6002Parser() { - if (objectFlowLabel_6002Parser == null) { - objectFlowLabel_6002Parser = new ActivityEdgeWeightParser(); - } - return objectFlowLabel_6002Parser; - } - - /** - * @generated - */ - private ObjectFlowSelectionParser objectFlowLabel_6005Parser; - - /** - * @generated - */ - private IParser getObjectFlowLabel_6005Parser() { - if (objectFlowLabel_6005Parser == null) { - objectFlowLabel_6005Parser = new ObjectFlowSelectionParser(); - } - return objectFlowLabel_6005Parser; - } - - /** - * @generated - */ - private ObjectFlowTransformationParser objectFlowLabel_6006Parser; - - /** - * @generated - */ - private IParser getObjectFlowLabel_6006Parser() { - if (objectFlowLabel_6006Parser == null) { - objectFlowLabel_6006Parser = new ObjectFlowTransformationParser(); - } - return objectFlowLabel_6006Parser; - } - - /** - * @generated - */ - private DecisionInputFlowParser objectFlowLabel_6007Parser; - - /** - * @generated - */ - private IParser getObjectFlowLabel_6007Parser() { - if (objectFlowLabel_6007Parser == null) { - objectFlowLabel_6007Parser = new DecisionInputFlowParser(); - } - return objectFlowLabel_6007Parser; - } - - /** - * @generated - */ - private EdgeGuardParser objectFlowLabel_6008Parser; - - /** - * @generated - */ - private IParser getObjectFlowLabel_6008Parser() { - if (objectFlowLabel_6008Parser == null) { - objectFlowLabel_6008Parser = new EdgeGuardParser(); - } - return objectFlowLabel_6008Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser objectFlowLabel_6010Parser; - - /** - * @generated - */ - private IParser getObjectFlowLabel_6010Parser() { - if (objectFlowLabel_6010Parser == null) { - objectFlowLabel_6010Parser = new AppliedStereotypeParser(); - } - return objectFlowLabel_6010Parser; - } - - /** - * @generated - */ - private IParser controlFlowName_6003Parser; - - /** - * @generated - */ - private IParser getControlFlowName_6003Parser() { - if (controlFlowName_6003Parser == null) { - EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; - MessageFormatParser parser = new MessageFormatParser(features); - controlFlowName_6003Parser = parser; - } - return controlFlowName_6003Parser; - } - - /** - * @generated - */ - private ActivityEdgeWeightParser controlFlowLabel_6004Parser; - - /** - * @generated - */ - private IParser getControlFlowLabel_6004Parser() { - if (controlFlowLabel_6004Parser == null) { - controlFlowLabel_6004Parser = new ActivityEdgeWeightParser(); - } - return controlFlowLabel_6004Parser; - } - - /** - * @generated - */ - private EdgeGuardParser controlFlowLabel_6009Parser; - - /** - * @generated - */ - private IParser getControlFlowLabel_6009Parser() { - if (controlFlowLabel_6009Parser == null) { - controlFlowLabel_6009Parser = new EdgeGuardParser(); - } - return controlFlowLabel_6009Parser; - } - - /** - * @generated - */ - private AppliedStereotypeParser controlFlowLabel_6011Parser; - - /** - * @generated - */ - private IParser getControlFlowLabel_6011Parser() { - if (controlFlowLabel_6011Parser == null) { - controlFlowLabel_6011Parser = new AppliedStereotypeParser(); - } - return controlFlowLabel_6011Parser; - } - - /** - * @generated - */ - private ExceptionHandlerTypeParser exceptionHandlerLabel_6012Parser; - - /** - * @generated - */ - private IParser getExceptionHandlerLabel_6012Parser() { - if (exceptionHandlerLabel_6012Parser == null) { - exceptionHandlerLabel_6012Parser = new ExceptionHandlerTypeParser(); - } - return exceptionHandlerLabel_6012Parser; - } - - /** - * @generated - */ - protected IParser getParser(int visualID) { - switch (visualID) { - case ActivityNameEditPart.VISUAL_ID: - return getActivityName_5001Parser(); - case ActivityIsSingleExecutionEditPart.VISUAL_ID: - return getActivityIsSingleExecution_5002Parser(); - case ParameterEditPart.VISUAL_ID: - return getParameter_3001Parser(); - case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: - return getConstraint_3002Parser(); - case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: - return getConstraint_3003Parser(); - case InitialNodeAppliedStereotypeEditPart.VISUAL_ID: - return getInitialNodeLabel_5080Parser(); - case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID: - return getActivityFinalNodeLabel_5081Parser(); - case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID: - return getFlowFinalNodeLabel_5082Parser(); - case OpaqueActionNameEditPart.VISUAL_ID: - return getOpaqueActionName_5003Parser(); - case ValuePinInOActLabelEditPart.VISUAL_ID: - return getValuePinLabel_5011Parser(); - case ValuePinInOActValueEditPart.VISUAL_ID: - return getValuePinLabel_5024Parser(); - case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5083Parser(); - case ActionInputPinInOActLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5012Parser(); - case ActionInputPinInOActValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5025Parser(); - case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5084Parser(); - case InputPinInOActLabelEditPart.VISUAL_ID: - return getInputPinLabel_5009Parser(); - case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5085Parser(); - case OutputPinInOActLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5010Parser(); - case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5086Parser(); - case CallBehaviorActionNameEditPart.VISUAL_ID: - return getCallBehaviorActionLabel_5004Parser(); - case ValuePinInCBActLabelEditPart.VISUAL_ID: - return getValuePinLabel_5013Parser(); - case ValuePinInCBActValueEditPart.VISUAL_ID: - return getValuePinLabel_5026Parser(); - case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5087Parser(); - case ActionInputPinInCBActLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5014Parser(); - case ActionInputPinInCBActValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5027Parser(); - case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5088Parser(); - case InputPinInCBActLabelEditPart.VISUAL_ID: - return getInputPinLabel_5015Parser(); - case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5089Parser(); - case OutputPinInCBActLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5016Parser(); - case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5090Parser(); - case CallOperationActionNameEditPart.VISUAL_ID: - return getCallOperationActionLabel_5006Parser(); - case ActionInputPinInCOActLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5017Parser(); - case ActionInputPinInCOActValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5028Parser(); - case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5091Parser(); - case ValuePinInCOActLabelEditPart.VISUAL_ID: - return getValuePinLabel_5018Parser(); - case ValuePinInCOActValueEditPart.VISUAL_ID: - return getValuePinLabel_5029Parser(); - case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5092Parser(); - case InputPinInCOActLabelEditPart.VISUAL_ID: - return getInputPinLabel_5019Parser(); - case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5093Parser(); - case OutputPinInCOActLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5020Parser(); - case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5094Parser(); - case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID: - return getValuePinLabel_5021Parser(); - case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID: - return getValuePinLabel_5030Parser(); - case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5095Parser(); - case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5022Parser(); - case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5031Parser(); - case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5096Parser(); - case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID: - return getInputPinLabel_5023Parser(); - case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5097Parser(); - case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return getDurationConstraintName_5038Parser(); - case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return getDurationConstraintLabel_5130Parser(); - case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return getDurationConstraintName_5039Parser(); - case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return getDurationConstraintLabel_5131Parser(); - case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return getTimeConstraintName_5040Parser(); - case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return getTimeConstraintLabel_5132Parser(); - case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return getTimeConstraintName_5041Parser(); - case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return getTimeConstraintLabel_5133Parser(); - case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return getIntervalConstraintName_5036Parser(); - case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return getIntervalConstraintLabel_5134Parser(); - case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return getIntervalConstraintName_5037Parser(); - case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return getIntervalConstraintLabel_5135Parser(); - case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID: - return getConstraintName_5007Parser(); - case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: - return getConstraintLabel_5136Parser(); - case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID: - return getConstraintName_5008Parser(); - case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: - return getConstraintLabel_5137Parser(); - case DecisionInputEditPart.VISUAL_ID: - return getDecisionNodeLabel_5043Parser(); - case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID: - return getDecisionNodeLabel_5098Parser(); - case MergeNodeAppliedStereotypeEditPart.VISUAL_ID: - return getMergeNodeLabel_5099Parser(); - case ForkNodeAppliedStereotypeEditPart.VISUAL_ID: - return getForkNodeLabel_5100Parser(); - case JoinSpecEditPart.VISUAL_ID: - return getJoinNodeLabel_5042Parser(); - case JoinNodeAppliedStereotypeEditPart.VISUAL_ID: - return getJoinNodeLabel_5101Parser(); - case DataStoreNodeLabelEditPart.VISUAL_ID: - return getDataStoreNodeLabel_5127Parser(); - case DataStoreSelectionEditPart.VISUAL_ID: - return getDataStoreNodeLabel_5128Parser(); - case SendObjectActionNameEditPart.VISUAL_ID: - return getSendObjectActionName_5059Parser(); - case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID: - return getValuePinLabel_5049Parser(); - case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID: - return getValuePinLabel_5050Parser(); - case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5102Parser(); - case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5051Parser(); - case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5052Parser(); - case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5103Parser(); - case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: - return getInputPinLabel_5053Parser(); - case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5104Parser(); - case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID: - return getValuePinLabel_5054Parser(); - case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID: - return getValuePinLabel_5055Parser(); - case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5105Parser(); - case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5056Parser(); - case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5057Parser(); - case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5106Parser(); - case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: - return getInputPinLabel_5058Parser(); - case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5107Parser(); - case SendSignalActionNameEditPart.VISUAL_ID: - return getSendSignalActionName_5060Parser(); - case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5061Parser(); - case ActionInputPinInSendSigActValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5062Parser(); - case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5108Parser(); - case ValuePinInSendSigActLabelEditPart.VISUAL_ID: - return getValuePinLabel_5063Parser(); - case ValuePinInSendSigActValueEditPart.VISUAL_ID: - return getValuePinLabel_5064Parser(); - case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5109Parser(); - case InputPinInSendSigActLabelEditPart.VISUAL_ID: - return getInputPinLabel_5065Parser(); - case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5110Parser(); - case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID: - return getValuePinLabel_5072Parser(); - case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID: - return getValuePinLabel_5073Parser(); - case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getValuePinLabel_5111Parser(); - case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: - return getActionInputPinLabel_5074Parser(); - case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID: - return getActionInputPinLabel_5075Parser(); - case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getActionInputPinLabel_5112Parser(); - case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: - return getInputPinLabel_5076Parser(); - case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5113Parser(); - case ParameterNodeNameEditPart.VISUAL_ID: - return getActivityParameterNodeLabel_5071Parser(); - case AcceptEventActionLabelEditPart.VISUAL_ID: - return getAcceptEventActionLabel_5078Parser(); - case AcceptTimeEventActionLabelEditPart.VISUAL_ID: - return getAcceptEventActionLabel_5079Parser(); - case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID: - return getAcceptEventActionLabel_5115Parser(); - case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5077Parser(); - case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5114Parser(); - case ValueSpecificationActionNameEditPart.VISUAL_ID: - return getValueSpecificationActionName_5126Parser(); - case OutputPinInValSpecActLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5124Parser(); - case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5125Parser(); - case ConditionalNodeKeywordEditPart.VISUAL_ID: - return getConditionalNodeLabel_5119Parser(); - case ExpansionRegionKeywordEditPart.VISUAL_ID: - return getExpansionRegionLabel_5120Parser(); - case LoopNodeKeywordEditPart.VISUAL_ID: - return getLoopNodeLabel_5121Parser(); - case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5184Parser(); - case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5185Parser(); - case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5186Parser(); - case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5183Parser(); - case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5187Parser(); - case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5188Parser(); - case SequenceNodeKeywordEditPart.VISUAL_ID: - return getSequenceNodeLabel_5123Parser(); - case StructuredActivityNodeKeywordEditPart.VISUAL_ID: - return getStructuredActivityNodeLabel_5117Parser(); - case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID: - return getInputPinLabel_5178Parser(); - case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID: - return getInputPinLabel_5179Parser(); - case ActivityPartitionNameEditPart.VISUAL_ID: - return getActivityPartitionName_5118Parser(); - case CommentBodyLabelEditPart.VISUAL_ID: - return getCommentBody_5138Parser(); - case ReadSelfActionNameEditPart.VISUAL_ID: - return getReadSelfActionName_5139Parser(); - case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5144Parser(); - case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID: - return getOutputPinLabel_5145Parser(); - case ActivityNameEditPartCN.VISUAL_ID: - return getActivityName_5142Parser(); - case ActivityIsSingleExecutionCNEditPart.VISUAL_ID: - return getActivityIsSingleExecution_5143Parser(); - case CreateObjectActionNameEditPart.VISUAL_ID: - return getCreateObjectActionName_5148Parser(); - case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5146Parser(); - case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5147Parser(); - case ShapeNamedElementNameEditPart.VISUAL_ID: - return getNamedElementName_5129Parser(); - case ReadStructuralFeatureActionNameEditPart.VISUAL_ID: - return getReadStructuralFeatureActionName_5153Parser(); - case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID: - return getInputPinLabel_5149Parser(); - case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getInputPinLabel_5150Parser(); - case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5151Parser(); - case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5152Parser(); - case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID: - return getAddStructuralFeatureValueActionName_5160Parser(); - case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID: - return getInputPinLabel_5154Parser(); - case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getInputPinLabel_5155Parser(); - case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID: - return getInputPinLabel_5156Parser(); - case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID: - return getInputPinLabel_5157Parser(); - case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID: - return getOutputPinLabel_5158Parser(); - case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID: - return getOutputPinLabel_5159Parser(); - case DestroyObjectActionNameEditPart.VISUAL_ID: - return getDestroyObjectActionName_5163Parser(); - case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID: - return getInputPinLabel_5161Parser(); - case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getInputPinLabel_5162Parser(); - case ReadVariableActionNameEditPart.VISUAL_ID: - return getReadVariableActionName_5166Parser(); - case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5164Parser(); - case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getOutputPinLabel_5165Parser(); - case AddVariableValueActionNameEditPart.VISUAL_ID: - return getAddVariableValueActionName_5171Parser(); - case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID: - return getInputPinLabel_5167Parser(); - case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getInputPinLabel_5168Parser(); - case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID: - return getInputPinLabel_5169Parser(); - case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getInputPinLabel_5170Parser(); - case BroadcastSignalActionNameEditPart.VISUAL_ID: - return getBroadcastSignalActionName_5175Parser(); - case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID: - return getInputPinLabel_5172Parser(); - case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID: - return getInputPinLabel_5173Parser(); - case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: - return getInputPinLabel_5174Parser(); - case CentralBufferNodeLabelEditPart.VISUAL_ID: - return getCentralBufferNodeLabel_5176Parser(); - case CentralBufferNodeSelectionEditPart.VISUAL_ID: - return getCentralBufferNodeLabel_5177Parser(); - case ConstraintNameEditPartCN.VISUAL_ID: - return getConstraintName_5189Parser(); - case ConstraintBodyEditPartCN.VISUAL_ID: - return getConstraintSpecification_5190Parser(); - case ObjectFlowNameEditPart.VISUAL_ID: - return getObjectFlowName_6001Parser(); - case ObjectFlowWeightEditPart.VISUAL_ID: - return getObjectFlowLabel_6002Parser(); - case ObjectFlowSelectionEditPart.VISUAL_ID: - return getObjectFlowLabel_6005Parser(); - case ObjectFlowTransformationEditPart.VISUAL_ID: - return getObjectFlowLabel_6006Parser(); - case DecisionInputFlowEditPart.VISUAL_ID: - return getObjectFlowLabel_6007Parser(); - case ObjectFlowGuardEditPart.VISUAL_ID: - return getObjectFlowLabel_6008Parser(); - case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID: - return getObjectFlowLabel_6010Parser(); - case ControlFlowNameEditPart.VISUAL_ID: - return getControlFlowName_6003Parser(); - case ControlFlowWeightEditPart.VISUAL_ID: - return getControlFlowLabel_6004Parser(); - case ControlFlowGuardEditPart.VISUAL_ID: - return getControlFlowLabel_6009Parser(); - case ControlFlowAppliedStereotypeEditPart.VISUAL_ID: - return getControlFlowLabel_6011Parser(); - case ExceptionHandlerTypeEditPart.VISUAL_ID: - return getExceptionHandlerLabel_6012Parser(); - } - return null; - } - - /** - * Utility method that consults ParserService - * - * @generated - */ - public static IParser getParser(IElementType type, EObject object, String parserHint) { - return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint)); - } - - /** - * @generated - */ - @Override - public IParser getParser(IAdaptable hint) { - String vid = (String) hint.getAdapter(String.class); - if (vid != null) { - return getParser(UMLVisualIDRegistry.getVisualID(vid)); - } - View view = (View) hint.getAdapter(View.class); - if (view != null) { - return getParser(UMLVisualIDRegistry.getVisualID(view)); - } - return null; - } - - /** - * @generated - */ - @Override - public boolean provides(IOperation operation) { - if (operation instanceof GetParserOperation) { - IAdaptable hint = ((GetParserOperation) operation).getHint(); - if (UMLElementTypes.getElement(hint) == null) { - return false; - } - return getParser(hint) != null; - } - return false; - } - - /** - * @generated - */ - private static class HintAdapter extends ParserHintAdapter { - - /** - * @generated - */ - private final IElementType elementType; - - /** - * @generated - */ - public HintAdapter(IElementType type, EObject object, String parserHint) { - super(object, parserHint); - assert type != null; - elementType = type; - } - - /** - * @generated - */ - @Override - public Object getAdapter(Class adapter) { - if (IElementType.class.equals(adapter)) { - return elementType; - } - return super.getAdapter(adapter); - } - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.providers; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; +import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptEventActionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptTimeEventActionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityEdgeWeightParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivitySingleExecutionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallBehaviorActionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallOperationActionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.DecisionInputFlowParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.EdgeGuardParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ExceptionHandlerTypeParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.InputDecisionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.JoinSpecParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowSelectionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowTransformationParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeSelectionParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ParameterParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinValueParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PostConditionConstraintLabelParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PreConditionConstraintLabelParser; +import org.eclipse.papyrus.uml.diagram.activity.parser.custom.StructuredActivityNodeKeywordParser; +import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser; +import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser; +import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * @generated + */ +public class UMLParserProvider extends AbstractProvider implements IParserProvider { + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser dataStoreNodeFloatingName_6031Parser; + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser getDataStoreNodeFloatingName_6031Parser() { + if (dataStoreNodeFloatingName_6031Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + dataStoreNodeFloatingName_6031Parser = parser; + } + return dataStoreNodeFloatingName_6031Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser centralBufferNodeFloatingName_6030Parser; + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser getCentralBufferNodeFloatingName_6030Parser() { + if (centralBufferNodeFloatingName_6030Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + centralBufferNodeFloatingName_6030Parser = parser; + } + return centralBufferNodeFloatingName_6030Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser addStructuralFeatureValueActionFloatingName_6019Parser; + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser getAddStructuralFeatureValueActionFloatingName_6019Parser() { + if (addStructuralFeatureValueActionFloatingName_6019Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + addStructuralFeatureValueActionFloatingName_6019Parser = parser; + } + return addStructuralFeatureValueActionFloatingName_6019Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser callOperationActionFloatingName_6020Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getCallOperationActionFloatingName_6020Parser() { + if (callOperationActionFloatingName_6020Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + callOperationActionFloatingName_6020Parser = parser; + } + return callOperationActionFloatingName_6020Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser createObjectActionFloatingName_6024Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getCreateObjectActionFloatingName_6024Parser() { + if (createObjectActionFloatingName_6024Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + createObjectActionFloatingName_6024Parser = parser; + } + return createObjectActionFloatingName_6024Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser destroyObjectActionFloatingName_6022Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getDestroyObjectActionFloatingName_6022Parser() { + if (destroyObjectActionFloatingName_6022Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + destroyObjectActionFloatingName_6022Parser = parser; + } + return destroyObjectActionFloatingName_6022Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser opaqueActionFloatingName_6028Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getOpaqueActionFloatingName_6028Parser() { + if (opaqueActionFloatingName_6028Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + opaqueActionFloatingName_6028Parser = parser; + } + return opaqueActionFloatingName_6028Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser readSelfActionFloatingName_6025Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getReadSelfActionFloatingName_6025Parser() { + if (readSelfActionFloatingName_6025Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + readSelfActionFloatingName_6025Parser = parser; + } + return readSelfActionFloatingName_6025Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser readStructuralFeatureActionFloatingName_6023Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getReadStructuralFeatureActionFloatingName_6023Parser() { + if (readStructuralFeatureActionFloatingName_6023Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + readStructuralFeatureActionFloatingName_6023Parser = parser; + } + return readStructuralFeatureActionFloatingName_6023Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser readVariableActionFloatingName_6021Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getReadVariableActionFloatingName_6021Parser() { + if (readVariableActionFloatingName_6021Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + readVariableActionFloatingName_6021Parser = parser; + } + return readVariableActionFloatingName_6021Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser sendObjectActionFloatingName_6027Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getSendObjectActionFloatingName_6027Parser() { + if (sendObjectActionFloatingName_6027Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + sendObjectActionFloatingName_6027Parser = parser; + } + return sendObjectActionFloatingName_6027Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser valueSpecificationActionFloatingName_6026Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getValueSpecificationActionFloatingName_6026Parser() { + if (valueSpecificationActionFloatingName_6026Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + valueSpecificationActionFloatingName_6026Parser = parser; + } + return valueSpecificationActionFloatingName_6026Parser; + } + + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser callBehaviorActionFloatingName_8520Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getCallBehaviorActionFloatingName_6029Parser() { + if (callBehaviorActionFloatingName_8520Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + callBehaviorActionFloatingName_8520Parser = parser; + } + return callBehaviorActionFloatingName_8520Parser; + } + + /** + * @generated + */ + private IParser activityName_5001Parser; + + /** + * @generated + */ + private IParser getActivityName_5001Parser() { + if (activityName_5001Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + activityName_5001Parser = parser; + } + return activityName_5001Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser addVariableValueActionFoatingName_6018Parser; + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser getAddVariableValueActionFloatingName_6018Parser() { + if (addVariableValueActionFoatingName_6018Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + addVariableValueActionFoatingName_6018Parser = parser; + } + return addVariableValueActionFoatingName_6018Parser; + } + + /** + * @generated + * not generated but changes include on gmfgen, can be override at the generation + */ + private IParser broadcastSignalActionName_6017Parser; + + /** + * @generated + * not generated but change include on gmfgen, can be override at the generation + */ + private IParser getBroadcastSignalActionFloatingName_6017Parser() { + if (broadcastSignalActionName_6017Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + broadcastSignalActionName_6017Parser = parser; + } + return broadcastSignalActionName_6017Parser; + } + + + /** + * @generated + */ + private ActivitySingleExecutionParser activityIsSingleExecution_5002Parser; + + /** + * @generated + */ + private IParser getActivityIsSingleExecution_5002Parser() { + if (activityIsSingleExecution_5002Parser == null) { + activityIsSingleExecution_5002Parser = new ActivitySingleExecutionParser(); + } + return activityIsSingleExecution_5002Parser; + } + + /** + * @generated + */ + private ParameterParser parameter_3001Parser; + + /** + * @generated + */ + private IParser getParameter_3001Parser() { + if (parameter_3001Parser == null) { + parameter_3001Parser = new ParameterParser(); + } + return parameter_3001Parser; + } + + /** + * @generated + */ + private PreConditionConstraintLabelParser constraint_3002Parser; + + /** + * @generated + */ + private IParser getConstraint_3002Parser() { + if (constraint_3002Parser == null) { + constraint_3002Parser = new PreConditionConstraintLabelParser(); + } + return constraint_3002Parser; + } + + /** + * @generated + */ + private PostConditionConstraintLabelParser constraint_3003Parser; + + /** + * @generated + */ + private IParser getConstraint_3003Parser() { + if (constraint_3003Parser == null) { + constraint_3003Parser = new PostConditionConstraintLabelParser(); + } + return constraint_3003Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser initialNodeLabel_5080Parser; + + /** + * @generated + */ + private IParser getInitialNodeLabel_5080Parser() { + if (initialNodeLabel_5080Parser == null) { + initialNodeLabel_5080Parser = new AppliedStereotypeParser(); + } + return initialNodeLabel_5080Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser activityFinalNodeLabel_5081Parser; + + /** + * @generated + */ + private IParser getActivityFinalNodeLabel_5081Parser() { + if (activityFinalNodeLabel_5081Parser == null) { + activityFinalNodeLabel_5081Parser = new AppliedStereotypeParser(); + } + return activityFinalNodeLabel_5081Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser flowFinalNodeLabel_5082Parser; + + /** + * @generated + */ + private IParser getFlowFinalNodeLabel_5082Parser() { + if (flowFinalNodeLabel_5082Parser == null) { + flowFinalNodeLabel_5082Parser = new AppliedStereotypeParser(); + } + return flowFinalNodeLabel_5082Parser; + } + + /** + * @generated + */ + private IParser opaqueActionName_5003Parser; + + /** + * @generated + */ + private IParser getOpaqueActionName_5003Parser() { + if (opaqueActionName_5003Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + opaqueActionName_5003Parser = parser; + } + return opaqueActionName_5003Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5011Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5011Parser() { + if (valuePinLabel_5011Parser == null) { + valuePinLabel_5011Parser = new PinParser(); + } + return valuePinLabel_5011Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5024Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5024Parser() { + if (valuePinLabel_5024Parser == null) { + valuePinLabel_5024Parser = new PinValueParser(); + } + return valuePinLabel_5024Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5083Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5083Parser() { + if (valuePinLabel_5083Parser == null) { + valuePinLabel_5083Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5083Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5012Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5012Parser() { + if (actionInputPinLabel_5012Parser == null) { + actionInputPinLabel_5012Parser = new PinParser(); + } + return actionInputPinLabel_5012Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5025Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5025Parser() { + if (actionInputPinLabel_5025Parser == null) { + actionInputPinLabel_5025Parser = new PinValueParser(); + } + return actionInputPinLabel_5025Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5084Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5084Parser() { + if (actionInputPinLabel_5084Parser == null) { + actionInputPinLabel_5084Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5084Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5009Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5009Parser() { + if (inputPinLabel_5009Parser == null) { + inputPinLabel_5009Parser = new PinParser(); + } + return inputPinLabel_5009Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5085Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5085Parser() { + if (inputPinLabel_5085Parser == null) { + inputPinLabel_5085Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5085Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5010Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5010Parser() { + if (outputPinLabel_5010Parser == null) { + outputPinLabel_5010Parser = new PinParser(); + } + return outputPinLabel_5010Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5086Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5086Parser() { + if (outputPinLabel_5086Parser == null) { + outputPinLabel_5086Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5086Parser; + } + + /** + * @generated + */ + private CallBehaviorActionParser callBehaviorActionLabel_5004Parser; + + /** + * @generated + */ + private IParser getCallBehaviorActionLabel_5004Parser() { + if (callBehaviorActionLabel_5004Parser == null) { + callBehaviorActionLabel_5004Parser = new CallBehaviorActionParser(); + } + return callBehaviorActionLabel_5004Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5013Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5013Parser() { + if (valuePinLabel_5013Parser == null) { + valuePinLabel_5013Parser = new PinParser(); + } + return valuePinLabel_5013Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5026Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5026Parser() { + if (valuePinLabel_5026Parser == null) { + valuePinLabel_5026Parser = new PinValueParser(); + } + return valuePinLabel_5026Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5087Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5087Parser() { + if (valuePinLabel_5087Parser == null) { + valuePinLabel_5087Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5087Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5014Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5014Parser() { + if (actionInputPinLabel_5014Parser == null) { + actionInputPinLabel_5014Parser = new PinParser(); + } + return actionInputPinLabel_5014Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5027Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5027Parser() { + if (actionInputPinLabel_5027Parser == null) { + actionInputPinLabel_5027Parser = new PinValueParser(); + } + return actionInputPinLabel_5027Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5088Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5088Parser() { + if (actionInputPinLabel_5088Parser == null) { + actionInputPinLabel_5088Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5088Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5015Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5015Parser() { + if (inputPinLabel_5015Parser == null) { + inputPinLabel_5015Parser = new PinParser(); + } + return inputPinLabel_5015Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5089Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5089Parser() { + if (inputPinLabel_5089Parser == null) { + inputPinLabel_5089Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5089Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5016Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5016Parser() { + if (outputPinLabel_5016Parser == null) { + outputPinLabel_5016Parser = new PinParser(); + } + return outputPinLabel_5016Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5090Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5090Parser() { + if (outputPinLabel_5090Parser == null) { + outputPinLabel_5090Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5090Parser; + } + + /** + * @generated + */ + private CallOperationActionParser callOperationActionLabel_5006Parser; + + /** + * @generated + */ + private IParser getCallOperationActionLabel_5006Parser() { + if (callOperationActionLabel_5006Parser == null) { + callOperationActionLabel_5006Parser = new CallOperationActionParser(); + } + return callOperationActionLabel_5006Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5017Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5017Parser() { + if (actionInputPinLabel_5017Parser == null) { + actionInputPinLabel_5017Parser = new PinParser(); + } + return actionInputPinLabel_5017Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5028Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5028Parser() { + if (actionInputPinLabel_5028Parser == null) { + actionInputPinLabel_5028Parser = new PinValueParser(); + } + return actionInputPinLabel_5028Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5091Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5091Parser() { + if (actionInputPinLabel_5091Parser == null) { + actionInputPinLabel_5091Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5091Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5018Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5018Parser() { + if (valuePinLabel_5018Parser == null) { + valuePinLabel_5018Parser = new PinParser(); + } + return valuePinLabel_5018Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5029Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5029Parser() { + if (valuePinLabel_5029Parser == null) { + valuePinLabel_5029Parser = new PinValueParser(); + } + return valuePinLabel_5029Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5092Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5092Parser() { + if (valuePinLabel_5092Parser == null) { + valuePinLabel_5092Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5092Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5019Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5019Parser() { + if (inputPinLabel_5019Parser == null) { + inputPinLabel_5019Parser = new PinParser(); + } + return inputPinLabel_5019Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5093Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5093Parser() { + if (inputPinLabel_5093Parser == null) { + inputPinLabel_5093Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5093Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5020Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5020Parser() { + if (outputPinLabel_5020Parser == null) { + outputPinLabel_5020Parser = new PinParser(); + } + return outputPinLabel_5020Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5094Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5094Parser() { + if (outputPinLabel_5094Parser == null) { + outputPinLabel_5094Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5094Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5021Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5021Parser() { + if (valuePinLabel_5021Parser == null) { + valuePinLabel_5021Parser = new PinParser(); + } + return valuePinLabel_5021Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5030Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5030Parser() { + if (valuePinLabel_5030Parser == null) { + valuePinLabel_5030Parser = new PinValueParser(); + } + return valuePinLabel_5030Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5095Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5095Parser() { + if (valuePinLabel_5095Parser == null) { + valuePinLabel_5095Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5095Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5022Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5022Parser() { + if (actionInputPinLabel_5022Parser == null) { + actionInputPinLabel_5022Parser = new PinParser(); + } + return actionInputPinLabel_5022Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5031Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5031Parser() { + if (actionInputPinLabel_5031Parser == null) { + actionInputPinLabel_5031Parser = new PinValueParser(); + } + return actionInputPinLabel_5031Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5096Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5096Parser() { + if (actionInputPinLabel_5096Parser == null) { + actionInputPinLabel_5096Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5096Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5023Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5023Parser() { + if (inputPinLabel_5023Parser == null) { + inputPinLabel_5023Parser = new PinParser(); + } + return inputPinLabel_5023Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5097Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5097Parser() { + if (inputPinLabel_5097Parser == null) { + inputPinLabel_5097Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5097Parser; + } + + /** + * @generated + */ + private IParser constraintName_5007Parser; + + /** + * @generated + */ + private IParser getConstraintName_5007Parser() { + if (constraintName_5007Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + constraintName_5007Parser = parser; + } + return constraintName_5007Parser; + } + + /** + * @generated + */ + private ConstraintParser constraintLabel_5136Parser; + + /** + * @generated + */ + private IParser getConstraintLabel_5136Parser() { + if (constraintLabel_5136Parser == null) { + constraintLabel_5136Parser = new ConstraintParser(); + } + return constraintLabel_5136Parser; + } + + /** + * @generated + */ + private IParser constraintName_5008Parser; + + /** + * @generated + */ + private IParser getConstraintName_5008Parser() { + if (constraintName_5008Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + constraintName_5008Parser = parser; + } + return constraintName_5008Parser; + } + + /** + * @generated + */ + private ConstraintParser constraintLabel_5137Parser; + + /** + * @generated + */ + private IParser getConstraintLabel_5137Parser() { + if (constraintLabel_5137Parser == null) { + constraintLabel_5137Parser = new ConstraintParser(); + } + return constraintLabel_5137Parser; + } + + /** + * @generated + */ + private InputDecisionParser decisionNodeLabel_5043Parser; + + /** + * @generated + */ + private IParser getDecisionNodeLabel_5043Parser() { + if (decisionNodeLabel_5043Parser == null) { + decisionNodeLabel_5043Parser = new InputDecisionParser(); + } + return decisionNodeLabel_5043Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser decisionNodeLabel_5098Parser; + + /** + * @generated + */ + private IParser getDecisionNodeLabel_5098Parser() { + if (decisionNodeLabel_5098Parser == null) { + decisionNodeLabel_5098Parser = new AppliedStereotypeParser(); + } + return decisionNodeLabel_5098Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser mergeNodeLabel_5099Parser; + + /** + * @generated + */ + private IParser getMergeNodeLabel_5099Parser() { + if (mergeNodeLabel_5099Parser == null) { + mergeNodeLabel_5099Parser = new AppliedStereotypeParser(); + } + return mergeNodeLabel_5099Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser forkNodeLabel_5100Parser; + + /** + * @generated + */ + private IParser getForkNodeLabel_5100Parser() { + if (forkNodeLabel_5100Parser == null) { + forkNodeLabel_5100Parser = new AppliedStereotypeParser(); + } + return forkNodeLabel_5100Parser; + } + + /** + * @generated + */ + private JoinSpecParser joinNodeLabel_5042Parser; + + /** + * @generated + */ + private IParser getJoinNodeLabel_5042Parser() { + if (joinNodeLabel_5042Parser == null) { + joinNodeLabel_5042Parser = new JoinSpecParser(); + } + return joinNodeLabel_5042Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser joinNodeLabel_5101Parser; + + /** + * @generated + */ + private IParser getJoinNodeLabel_5101Parser() { + if (joinNodeLabel_5101Parser == null) { + joinNodeLabel_5101Parser = new AppliedStereotypeParser(); + } + return joinNodeLabel_5101Parser; + } + + /** + * @generated + */ + private IParser sendObjectActionName_5059Parser; + + /** + * @generated + */ + private IParser getSendObjectActionName_5059Parser() { + if (sendObjectActionName_5059Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + sendObjectActionName_5059Parser = parser; + } + return sendObjectActionName_5059Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5049Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5049Parser() { + if (valuePinLabel_5049Parser == null) { + valuePinLabel_5049Parser = new PinParser(); + } + return valuePinLabel_5049Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5050Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5050Parser() { + if (valuePinLabel_5050Parser == null) { + valuePinLabel_5050Parser = new PinValueParser(); + } + return valuePinLabel_5050Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5102Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5102Parser() { + if (valuePinLabel_5102Parser == null) { + valuePinLabel_5102Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5102Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5051Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5051Parser() { + if (actionInputPinLabel_5051Parser == null) { + actionInputPinLabel_5051Parser = new PinParser(); + } + return actionInputPinLabel_5051Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5052Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5052Parser() { + if (actionInputPinLabel_5052Parser == null) { + actionInputPinLabel_5052Parser = new PinValueParser(); + } + return actionInputPinLabel_5052Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5103Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5103Parser() { + if (actionInputPinLabel_5103Parser == null) { + actionInputPinLabel_5103Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5103Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5053Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5053Parser() { + if (inputPinLabel_5053Parser == null) { + inputPinLabel_5053Parser = new PinParser(); + } + return inputPinLabel_5053Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5104Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5104Parser() { + if (inputPinLabel_5104Parser == null) { + inputPinLabel_5104Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5104Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5054Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5054Parser() { + if (valuePinLabel_5054Parser == null) { + valuePinLabel_5054Parser = new PinParser(); + } + return valuePinLabel_5054Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5055Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5055Parser() { + if (valuePinLabel_5055Parser == null) { + valuePinLabel_5055Parser = new PinValueParser(); + } + return valuePinLabel_5055Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5105Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5105Parser() { + if (valuePinLabel_5105Parser == null) { + valuePinLabel_5105Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5105Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5056Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5056Parser() { + if (actionInputPinLabel_5056Parser == null) { + actionInputPinLabel_5056Parser = new PinParser(); + } + return actionInputPinLabel_5056Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5057Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5057Parser() { + if (actionInputPinLabel_5057Parser == null) { + actionInputPinLabel_5057Parser = new PinValueParser(); + } + return actionInputPinLabel_5057Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5106Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5106Parser() { + if (actionInputPinLabel_5106Parser == null) { + actionInputPinLabel_5106Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5106Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5058Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5058Parser() { + if (inputPinLabel_5058Parser == null) { + inputPinLabel_5058Parser = new PinParser(); + } + return inputPinLabel_5058Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5107Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5107Parser() { + if (inputPinLabel_5107Parser == null) { + inputPinLabel_5107Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5107Parser; + } + + /** + * @generated + */ + private IParser sendSignalActionName_5060Parser; + + /** + * @generated + */ + private IParser getSendSignalActionName_5060Parser() { + if (sendSignalActionName_5060Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + sendSignalActionName_5060Parser = parser; + } + return sendSignalActionName_5060Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5061Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5061Parser() { + if (actionInputPinLabel_5061Parser == null) { + actionInputPinLabel_5061Parser = new PinParser(); + } + return actionInputPinLabel_5061Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5062Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5062Parser() { + if (actionInputPinLabel_5062Parser == null) { + actionInputPinLabel_5062Parser = new PinValueParser(); + } + return actionInputPinLabel_5062Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5108Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5108Parser() { + if (actionInputPinLabel_5108Parser == null) { + actionInputPinLabel_5108Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5108Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5063Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5063Parser() { + if (valuePinLabel_5063Parser == null) { + valuePinLabel_5063Parser = new PinParser(); + } + return valuePinLabel_5063Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5064Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5064Parser() { + if (valuePinLabel_5064Parser == null) { + valuePinLabel_5064Parser = new PinValueParser(); + } + return valuePinLabel_5064Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5109Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5109Parser() { + if (valuePinLabel_5109Parser == null) { + valuePinLabel_5109Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5109Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5065Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5065Parser() { + if (inputPinLabel_5065Parser == null) { + inputPinLabel_5065Parser = new PinParser(); + } + return inputPinLabel_5065Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5110Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5110Parser() { + if (inputPinLabel_5110Parser == null) { + inputPinLabel_5110Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5110Parser; + } + + /** + * @generated + */ + private PinParser valuePinLabel_5072Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5072Parser() { + if (valuePinLabel_5072Parser == null) { + valuePinLabel_5072Parser = new PinParser(); + } + return valuePinLabel_5072Parser; + } + + /** + * @generated + */ + private PinValueParser valuePinLabel_5073Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5073Parser() { + if (valuePinLabel_5073Parser == null) { + valuePinLabel_5073Parser = new PinValueParser(); + } + return valuePinLabel_5073Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser valuePinLabel_5111Parser; + + /** + * @generated + */ + private IParser getValuePinLabel_5111Parser() { + if (valuePinLabel_5111Parser == null) { + valuePinLabel_5111Parser = new AppliedStereotypeParser(); + } + return valuePinLabel_5111Parser; + } + + /** + * @generated + */ + private PinParser actionInputPinLabel_5074Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5074Parser() { + if (actionInputPinLabel_5074Parser == null) { + actionInputPinLabel_5074Parser = new PinParser(); + } + return actionInputPinLabel_5074Parser; + } + + /** + * @generated + */ + private PinValueParser actionInputPinLabel_5075Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5075Parser() { + if (actionInputPinLabel_5075Parser == null) { + actionInputPinLabel_5075Parser = new PinValueParser(); + } + return actionInputPinLabel_5075Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser actionInputPinLabel_5112Parser; + + /** + * @generated + */ + private IParser getActionInputPinLabel_5112Parser() { + if (actionInputPinLabel_5112Parser == null) { + actionInputPinLabel_5112Parser = new AppliedStereotypeParser(); + } + return actionInputPinLabel_5112Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5076Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5076Parser() { + if (inputPinLabel_5076Parser == null) { + inputPinLabel_5076Parser = new PinParser(); + } + return inputPinLabel_5076Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5113Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5113Parser() { + if (inputPinLabel_5113Parser == null) { + inputPinLabel_5113Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5113Parser; + } + + /** + * @generated + */ + private ActivityParameterNodeParser activityParameterNodeLabel_5071Parser; + + /** + * @generated + */ + private IParser getActivityParameterNodeLabel_5071Parser() { + if (activityParameterNodeLabel_5071Parser == null) { + activityParameterNodeLabel_5071Parser = new ActivityParameterNodeParser(); + } + return activityParameterNodeLabel_5071Parser; + } + + /** + * @generated + */ + private AcceptEventActionParser acceptEventActionLabel_5078Parser; + + /** + * @generated + */ + private IParser getAcceptEventActionLabel_5078Parser() { + if (acceptEventActionLabel_5078Parser == null) { + acceptEventActionLabel_5078Parser = new AcceptEventActionParser(); + } + return acceptEventActionLabel_5078Parser; + } + + /** + * @generated + */ + private AcceptTimeEventActionParser acceptEventActionLabel_5079Parser; + + /** + * @generated + */ + private IParser getAcceptEventActionLabel_5079Parser() { + if (acceptEventActionLabel_5079Parser == null) { + acceptEventActionLabel_5079Parser = new AcceptTimeEventActionParser(); + } + return acceptEventActionLabel_5079Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser acceptEventActionLabel_5115Parser; + + /** + * @generated + */ + private IParser getAcceptEventActionLabel_5115Parser() { + if (acceptEventActionLabel_5115Parser == null) { + acceptEventActionLabel_5115Parser = new AppliedStereotypeParser(); + } + return acceptEventActionLabel_5115Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5077Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5077Parser() { + if (outputPinLabel_5077Parser == null) { + outputPinLabel_5077Parser = new PinParser(); + } + return outputPinLabel_5077Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5114Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5114Parser() { + if (outputPinLabel_5114Parser == null) { + outputPinLabel_5114Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5114Parser; + } + + /** + * @generated + */ + private StructuredActivityNodeKeywordParser structuredActivityNodeLabel_5117Parser; + + /** + * @generated + */ + private IParser getStructuredActivityNodeLabel_5117Parser() { + if (structuredActivityNodeLabel_5117Parser == null) { + structuredActivityNodeLabel_5117Parser = new StructuredActivityNodeKeywordParser(); + } + return structuredActivityNodeLabel_5117Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5178Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5178Parser() { + if (inputPinLabel_5178Parser == null) { + inputPinLabel_5178Parser = new PinParser(); + } + return inputPinLabel_5178Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5179Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5179Parser() { + if (inputPinLabel_5179Parser == null) { + inputPinLabel_5179Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5179Parser; + } + + /** + * @generated + */ + private IParser activityPartitionName_5118Parser; + + /** + * @generated + */ + private IParser getActivityPartitionName_5118Parser() { + if (activityPartitionName_5118Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + activityPartitionName_5118Parser = parser; + } + return activityPartitionName_5118Parser; + } + + /** + * @generated + */ + private ActivitySingleExecutionParser namedElementName_5129Parser; + + /** + * @generated + */ + private IParser getNamedElementName_5129Parser() { + if (namedElementName_5129Parser == null) { + namedElementName_5129Parser = new ActivitySingleExecutionParser(); + } + return namedElementName_5129Parser; + } + + /** + * @generated + */ + private IParser createObjectActionName_5148Parser; + + /** + * @generated + */ + private IParser getCreateObjectActionName_5148Parser() { + if (createObjectActionName_5148Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + createObjectActionName_5148Parser = parser; + } + return createObjectActionName_5148Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5146Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5146Parser() { + if (outputPinLabel_5146Parser == null) { + outputPinLabel_5146Parser = new PinParser(); + } + return outputPinLabel_5146Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5147Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5147Parser() { + if (outputPinLabel_5147Parser == null) { + outputPinLabel_5147Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5147Parser; + } + + /** + * @generated + */ + private IParser readStructuralFeatureActionName_5153Parser; + + /** + * @generated + */ + private IParser getReadStructuralFeatureActionName_5153Parser() { + if (readStructuralFeatureActionName_5153Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + readStructuralFeatureActionName_5153Parser = parser; + } + return readStructuralFeatureActionName_5153Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5149Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5149Parser() { + if (inputPinLabel_5149Parser == null) { + inputPinLabel_5149Parser = new PinParser(); + } + return inputPinLabel_5149Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5150Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5150Parser() { + if (inputPinLabel_5150Parser == null) { + inputPinLabel_5150Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5150Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5151Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5151Parser() { + if (outputPinLabel_5151Parser == null) { + outputPinLabel_5151Parser = new PinParser(); + } + return outputPinLabel_5151Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5152Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5152Parser() { + if (outputPinLabel_5152Parser == null) { + outputPinLabel_5152Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5152Parser; + } + + /** + * @generated + */ + private IParser addStructuralFeatureValueActionName_5160Parser; + + /** + * @generated + */ + private IParser getAddStructuralFeatureValueActionName_5160Parser() { + if (addStructuralFeatureValueActionName_5160Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + addStructuralFeatureValueActionName_5160Parser = parser; + } + return addStructuralFeatureValueActionName_5160Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5154Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5154Parser() { + if (inputPinLabel_5154Parser == null) { + inputPinLabel_5154Parser = new PinParser(); + } + return inputPinLabel_5154Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5155Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5155Parser() { + if (inputPinLabel_5155Parser == null) { + inputPinLabel_5155Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5155Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5156Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5156Parser() { + if (inputPinLabel_5156Parser == null) { + inputPinLabel_5156Parser = new PinParser(); + } + return inputPinLabel_5156Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5157Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5157Parser() { + if (inputPinLabel_5157Parser == null) { + inputPinLabel_5157Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5157Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5158Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5158Parser() { + if (outputPinLabel_5158Parser == null) { + outputPinLabel_5158Parser = new PinParser(); + } + return outputPinLabel_5158Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5159Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5159Parser() { + if (outputPinLabel_5159Parser == null) { + outputPinLabel_5159Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5159Parser; + } + + /** + * @generated + */ + private IParser destroyObjectActionName_5163Parser; + + /** + * @generated + */ + private IParser getDestroyObjectActionName_5163Parser() { + if (destroyObjectActionName_5163Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + destroyObjectActionName_5163Parser = parser; + } + return destroyObjectActionName_5163Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5161Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5161Parser() { + if (inputPinLabel_5161Parser == null) { + inputPinLabel_5161Parser = new PinParser(); + } + return inputPinLabel_5161Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5162Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5162Parser() { + if (inputPinLabel_5162Parser == null) { + inputPinLabel_5162Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5162Parser; + } + + /** + * @generated + */ + private IParser readVariableActionName_5166Parser; + + /** + * @generated + */ + private IParser getReadVariableActionName_5166Parser() { + if (readVariableActionName_5166Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + readVariableActionName_5166Parser = parser; + } + return readVariableActionName_5166Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5164Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5164Parser() { + if (outputPinLabel_5164Parser == null) { + outputPinLabel_5164Parser = new PinParser(); + } + return outputPinLabel_5164Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5165Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5165Parser() { + if (outputPinLabel_5165Parser == null) { + outputPinLabel_5165Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5165Parser; + } + + /** + * @generated + */ + private IParser addVariableValueActionName_5171Parser; + + /** + * @generated + */ + private IParser getAddVariableValueActionName_5171Parser() { + if (addVariableValueActionName_5171Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + addVariableValueActionName_5171Parser = parser; + } + return addVariableValueActionName_5171Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5167Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5167Parser() { + if (inputPinLabel_5167Parser == null) { + inputPinLabel_5167Parser = new PinParser(); + } + return inputPinLabel_5167Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5168Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5168Parser() { + if (inputPinLabel_5168Parser == null) { + inputPinLabel_5168Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5168Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5169Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5169Parser() { + if (inputPinLabel_5169Parser == null) { + inputPinLabel_5169Parser = new PinParser(); + } + return inputPinLabel_5169Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5170Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5170Parser() { + if (inputPinLabel_5170Parser == null) { + inputPinLabel_5170Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5170Parser; + } + + /** + * @generated + */ + private IParser broadcastSignalActionName_5175Parser; + + /** + * @generated + */ + private IParser getBroadcastSignalActionName_5175Parser() { + if (broadcastSignalActionName_5175Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + broadcastSignalActionName_5175Parser = parser; + } + return broadcastSignalActionName_5175Parser; + } + + /** + * @generated + */ + private PinParser inputPinLabel_5172Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5172Parser() { + if (inputPinLabel_5172Parser == null) { + inputPinLabel_5172Parser = new PinParser(); + } + return inputPinLabel_5172Parser; + } + + /** + * @generated + */ + private PinValueParser inputPinLabel_5173Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5173Parser() { + if (inputPinLabel_5173Parser == null) { + inputPinLabel_5173Parser = new PinValueParser(); + } + return inputPinLabel_5173Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser inputPinLabel_5174Parser; + + /** + * @generated + */ + private IParser getInputPinLabel_5174Parser() { + if (inputPinLabel_5174Parser == null) { + inputPinLabel_5174Parser = new AppliedStereotypeParser(); + } + return inputPinLabel_5174Parser; + } + + /** + * @generated + */ + private ObjectNodeParser centralBufferNodeLabel_5176Parser; + + /** + * @generated + */ + private IParser getCentralBufferNodeLabel_5176Parser() { + if (centralBufferNodeLabel_5176Parser == null) { + centralBufferNodeLabel_5176Parser = new ObjectNodeParser(); + } + return centralBufferNodeLabel_5176Parser; + } + + /** + * @generated + */ + private ObjectNodeSelectionParser centralBufferNodeLabel_5177Parser; + + /** + * @generated + */ + private IParser getCentralBufferNodeLabel_5177Parser() { + if (centralBufferNodeLabel_5177Parser == null) { + centralBufferNodeLabel_5177Parser = new ObjectNodeSelectionParser(); + } + return centralBufferNodeLabel_5177Parser; + } + + /** + * @generated + */ + private IParser constraintName_5189Parser; + + /** + * @generated + */ + private IParser getConstraintName_5189Parser() { + if (constraintName_5189Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + constraintName_5189Parser = parser; + } + return constraintName_5189Parser; + } + + /** + * @generated + */ + private ConstraintParser constraintSpecification_5190Parser; + + /** + * @generated + */ + private IParser getConstraintSpecification_5190Parser() { + if (constraintSpecification_5190Parser == null) { + constraintSpecification_5190Parser = new ConstraintParser(); + } + return constraintSpecification_5190Parser; + } + + /** + * @generated + */ + private CommentParser commentBody_5138Parser; + + /** + * @generated + */ + private IParser getCommentBody_5138Parser() { + if (commentBody_5138Parser == null) { + commentBody_5138Parser = new CommentParser(); + } + return commentBody_5138Parser; + } + + /** + * @generated + */ + private IParser readSelfActionName_5139Parser; + + /** + * @generated + */ + private IParser getReadSelfActionName_5139Parser() { + if (readSelfActionName_5139Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + readSelfActionName_5139Parser = parser; + } + return readSelfActionName_5139Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5144Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5144Parser() { + if (outputPinLabel_5144Parser == null) { + outputPinLabel_5144Parser = new PinParser(); + } + return outputPinLabel_5144Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5145Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5145Parser() { + if (outputPinLabel_5145Parser == null) { + outputPinLabel_5145Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5145Parser; + } + + /** + * @generated + */ + private IParser activityName_5142Parser; + + /** + * @generated + */ + private IParser getActivityName_5142Parser() { + if (activityName_5142Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + activityName_5142Parser = parser; + } + return activityName_5142Parser; + } + + /** + * @generated + */ + private ActivitySingleExecutionParser activityIsSingleExecution_5143Parser; + + /** + * @generated + */ + private IParser getActivityIsSingleExecution_5143Parser() { + if (activityIsSingleExecution_5143Parser == null) { + activityIsSingleExecution_5143Parser = new ActivitySingleExecutionParser(); + } + return activityIsSingleExecution_5143Parser; + } + + /** + * @generated + */ + private IParser valueSpecificationActionName_5126Parser; + + /** + * @generated + */ + private IParser getValueSpecificationActionName_5126Parser() { + if (valueSpecificationActionName_5126Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + valueSpecificationActionName_5126Parser = parser; + } + return valueSpecificationActionName_5126Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5124Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5124Parser() { + if (outputPinLabel_5124Parser == null) { + outputPinLabel_5124Parser = new PinParser(); + } + return outputPinLabel_5124Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5125Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5125Parser() { + if (outputPinLabel_5125Parser == null) { + outputPinLabel_5125Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5125Parser; + } + + /** + * @generated + */ + private ObjectNodeParser dataStoreNodeLabel_5127Parser; + + /** + * @generated + */ + private IParser getDataStoreNodeLabel_5127Parser() { + if (dataStoreNodeLabel_5127Parser == null) { + dataStoreNodeLabel_5127Parser = new ObjectNodeParser(); + } + return dataStoreNodeLabel_5127Parser; + } + + /** + * @generated + */ + private ObjectNodeSelectionParser dataStoreNodeLabel_5128Parser; + + /** + * @generated + */ + private IParser getDataStoreNodeLabel_5128Parser() { + if (dataStoreNodeLabel_5128Parser == null) { + dataStoreNodeLabel_5128Parser = new ObjectNodeSelectionParser(); + } + return dataStoreNodeLabel_5128Parser; + } + + /** + * @generated + */ + private StructuredActivityNodeKeywordParser conditionalNodeLabel_5119Parser; + + /** + * @generated + */ + private IParser getConditionalNodeLabel_5119Parser() { + if (conditionalNodeLabel_5119Parser == null) { + conditionalNodeLabel_5119Parser = new StructuredActivityNodeKeywordParser(); + } + return conditionalNodeLabel_5119Parser; + } + + /** + * @generated + */ + private StructuredActivityNodeKeywordParser expansionRegionLabel_5120Parser; + + /** + * @generated + */ + private IParser getExpansionRegionLabel_5120Parser() { + if (expansionRegionLabel_5120Parser == null) { + expansionRegionLabel_5120Parser = new StructuredActivityNodeKeywordParser(); + } + return expansionRegionLabel_5120Parser; + } + + /** + * @generated + */ + private StructuredActivityNodeKeywordParser loopNodeLabel_5121Parser; + + /** + * @generated + */ + private IParser getLoopNodeLabel_5121Parser() { + if (loopNodeLabel_5121Parser == null) { + loopNodeLabel_5121Parser = new StructuredActivityNodeKeywordParser(); + } + return loopNodeLabel_5121Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5184Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5184Parser() { + if (outputPinLabel_5184Parser == null) { + outputPinLabel_5184Parser = new PinParser(); + } + return outputPinLabel_5184Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5185Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5185Parser() { + if (outputPinLabel_5185Parser == null) { + outputPinLabel_5185Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5185Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5186Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5186Parser() { + if (outputPinLabel_5186Parser == null) { + outputPinLabel_5186Parser = new PinParser(); + } + return outputPinLabel_5186Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5183Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5183Parser() { + if (outputPinLabel_5183Parser == null) { + outputPinLabel_5183Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5183Parser; + } + + /** + * @generated + */ + private PinParser outputPinLabel_5187Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5187Parser() { + if (outputPinLabel_5187Parser == null) { + outputPinLabel_5187Parser = new PinParser(); + } + return outputPinLabel_5187Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser outputPinLabel_5188Parser; + + /** + * @generated + */ + private IParser getOutputPinLabel_5188Parser() { + if (outputPinLabel_5188Parser == null) { + outputPinLabel_5188Parser = new AppliedStereotypeParser(); + } + return outputPinLabel_5188Parser; + } + + /** + * @generated + */ + private StructuredActivityNodeKeywordParser sequenceNodeLabel_5123Parser; + + /** + * @generated + */ + private IParser getSequenceNodeLabel_5123Parser() { + if (sequenceNodeLabel_5123Parser == null) { + sequenceNodeLabel_5123Parser = new StructuredActivityNodeKeywordParser(); + } + return sequenceNodeLabel_5123Parser; + } + + /** + * @generated + */ + private IParser intervalConstraintName_5036Parser; + + /** + * @generated + */ + private IParser getIntervalConstraintName_5036Parser() { + if (intervalConstraintName_5036Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + intervalConstraintName_5036Parser = parser; + } + return intervalConstraintName_5036Parser; + } + + /** + * @generated + */ + private ConstraintParser intervalConstraintLabel_5134Parser; + + /** + * @generated + */ + private IParser getIntervalConstraintLabel_5134Parser() { + if (intervalConstraintLabel_5134Parser == null) { + intervalConstraintLabel_5134Parser = new ConstraintParser(); + } + return intervalConstraintLabel_5134Parser; + } + + /** + * @generated + */ + private IParser intervalConstraintName_5037Parser; + + /** + * @generated + */ + private IParser getIntervalConstraintName_5037Parser() { + if (intervalConstraintName_5037Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + intervalConstraintName_5037Parser = parser; + } + return intervalConstraintName_5037Parser; + } + + /** + * @generated + */ + private ConstraintParser intervalConstraintLabel_5135Parser; + + /** + * @generated + */ + private IParser getIntervalConstraintLabel_5135Parser() { + if (intervalConstraintLabel_5135Parser == null) { + intervalConstraintLabel_5135Parser = new ConstraintParser(); + } + return intervalConstraintLabel_5135Parser; + } + + /** + * @generated + */ + private IParser durationConstraintName_5038Parser; + + /** + * @generated + */ + private IParser getDurationConstraintName_5038Parser() { + if (durationConstraintName_5038Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + durationConstraintName_5038Parser = parser; + } + return durationConstraintName_5038Parser; + } + + /** + * @generated + */ + private ConstraintParser durationConstraintLabel_5130Parser; + + /** + * @generated + */ + private IParser getDurationConstraintLabel_5130Parser() { + if (durationConstraintLabel_5130Parser == null) { + durationConstraintLabel_5130Parser = new ConstraintParser(); + } + return durationConstraintLabel_5130Parser; + } + + /** + * @generated + */ + private IParser durationConstraintName_5039Parser; + + /** + * @generated + */ + private IParser getDurationConstraintName_5039Parser() { + if (durationConstraintName_5039Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + durationConstraintName_5039Parser = parser; + } + return durationConstraintName_5039Parser; + } + + /** + * @generated + */ + private ConstraintParser durationConstraintLabel_5131Parser; + + /** + * @generated + */ + private IParser getDurationConstraintLabel_5131Parser() { + if (durationConstraintLabel_5131Parser == null) { + durationConstraintLabel_5131Parser = new ConstraintParser(); + } + return durationConstraintLabel_5131Parser; + } + + /** + * @generated + */ + private IParser timeConstraintName_5040Parser; + + /** + * @generated + */ + private IParser getTimeConstraintName_5040Parser() { + if (timeConstraintName_5040Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + timeConstraintName_5040Parser = parser; + } + return timeConstraintName_5040Parser; + } + + /** + * @generated + */ + private ConstraintParser timeConstraintLabel_5132Parser; + + /** + * @generated + */ + private IParser getTimeConstraintLabel_5132Parser() { + if (timeConstraintLabel_5132Parser == null) { + timeConstraintLabel_5132Parser = new ConstraintParser(); + } + return timeConstraintLabel_5132Parser; + } + + /** + * @generated + */ + private IParser timeConstraintName_5041Parser; + + /** + * @generated + */ + private IParser getTimeConstraintName_5041Parser() { + if (timeConstraintName_5041Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + timeConstraintName_5041Parser = parser; + } + return timeConstraintName_5041Parser; + } + + /** + * @generated + */ + private ConstraintParser timeConstraintLabel_5133Parser; + + /** + * @generated + */ + private IParser getTimeConstraintLabel_5133Parser() { + if (timeConstraintLabel_5133Parser == null) { + timeConstraintLabel_5133Parser = new ConstraintParser(); + } + return timeConstraintLabel_5133Parser; + } + + /** + * @generated + */ + private IParser objectFlowName_6001Parser; + + /** + * @generated + */ + private IParser getObjectFlowName_6001Parser() { + if (objectFlowName_6001Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + objectFlowName_6001Parser = parser; + } + return objectFlowName_6001Parser; + } + + /** + * @generated + */ + private ActivityEdgeWeightParser objectFlowLabel_6002Parser; + + /** + * @generated + */ + private IParser getObjectFlowLabel_6002Parser() { + if (objectFlowLabel_6002Parser == null) { + objectFlowLabel_6002Parser = new ActivityEdgeWeightParser(); + } + return objectFlowLabel_6002Parser; + } + + /** + * @generated + */ + private ObjectFlowSelectionParser objectFlowLabel_6005Parser; + + /** + * @generated + */ + private IParser getObjectFlowLabel_6005Parser() { + if (objectFlowLabel_6005Parser == null) { + objectFlowLabel_6005Parser = new ObjectFlowSelectionParser(); + } + return objectFlowLabel_6005Parser; + } + + /** + * @generated + */ + private ObjectFlowTransformationParser objectFlowLabel_6006Parser; + + /** + * @generated + */ + private IParser getObjectFlowLabel_6006Parser() { + if (objectFlowLabel_6006Parser == null) { + objectFlowLabel_6006Parser = new ObjectFlowTransformationParser(); + } + return objectFlowLabel_6006Parser; + } + + /** + * @generated + */ + private DecisionInputFlowParser objectFlowLabel_6007Parser; + + /** + * @generated + */ + private IParser getObjectFlowLabel_6007Parser() { + if (objectFlowLabel_6007Parser == null) { + objectFlowLabel_6007Parser = new DecisionInputFlowParser(); + } + return objectFlowLabel_6007Parser; + } + + /** + * @generated + */ + private EdgeGuardParser objectFlowLabel_6008Parser; + + /** + * @generated + */ + private IParser getObjectFlowLabel_6008Parser() { + if (objectFlowLabel_6008Parser == null) { + objectFlowLabel_6008Parser = new EdgeGuardParser(); + } + return objectFlowLabel_6008Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser objectFlowLabel_6010Parser; + + /** + * @generated + */ + private IParser getObjectFlowLabel_6010Parser() { + if (objectFlowLabel_6010Parser == null) { + objectFlowLabel_6010Parser = new AppliedStereotypeParser(); + } + return objectFlowLabel_6010Parser; + } + + /** + * @generated + */ + private IParser controlFlowName_6003Parser; + + /** + * @generated + */ + private IParser getControlFlowName_6003Parser() { + if (controlFlowName_6003Parser == null) { + EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() }; + MessageFormatParser parser = new MessageFormatParser(features); + controlFlowName_6003Parser = parser; + } + return controlFlowName_6003Parser; + } + + /** + * @generated + */ + private ActivityEdgeWeightParser controlFlowLabel_6004Parser; + + /** + * @generated + */ + private IParser getControlFlowLabel_6004Parser() { + if (controlFlowLabel_6004Parser == null) { + controlFlowLabel_6004Parser = new ActivityEdgeWeightParser(); + } + return controlFlowLabel_6004Parser; + } + + /** + * @generated + */ + private EdgeGuardParser controlFlowLabel_6009Parser; + + /** + * @generated + */ + private IParser getControlFlowLabel_6009Parser() { + if (controlFlowLabel_6009Parser == null) { + controlFlowLabel_6009Parser = new EdgeGuardParser(); + } + return controlFlowLabel_6009Parser; + } + + /** + * @generated + */ + private AppliedStereotypeParser controlFlowLabel_6011Parser; + + /** + * @generated + */ + private IParser getControlFlowLabel_6011Parser() { + if (controlFlowLabel_6011Parser == null) { + controlFlowLabel_6011Parser = new AppliedStereotypeParser(); + } + return controlFlowLabel_6011Parser; + } + + /** + * @generated + */ + private ExceptionHandlerTypeParser exceptionHandlerLabel_6012Parser; + + /** + * @generated + */ + private IParser getExceptionHandlerLabel_6012Parser() { + if (exceptionHandlerLabel_6012Parser == null) { + exceptionHandlerLabel_6012Parser = new ExceptionHandlerTypeParser(); + } + return exceptionHandlerLabel_6012Parser; + } + + /** + * @generated + */ + protected IParser getParser(int visualID) { + switch (visualID) { + case ActivityNameEditPart.VISUAL_ID: + return getActivityName_5001Parser(); + // not generated but change include on gmfgen, can be override at the generation + case BroadcastSignalActionFloatingNameEditPart.VISUAL_ID: + return getBroadcastSignalActionFloatingName_6017Parser(); + // not generated but change include on gmfgen, can be override at the generation + case CentralBufferNodeFloatingNameEditPart.VISUAL_ID: + return getCentralBufferNodeFloatingName_6030Parser(); + // not generated but change include on gmfgen, can be override at the generation + case DataStoreNodeFloatingNameEditPart.VISUAL_ID: + return getDataStoreNodeFloatingName_6031Parser(); + // not generated but change include on gmfgen, can be override at the generation + case AddVariableValueActionFloatingNameEditPart.VISUAL_ID: + return getAddVariableValueActionFloatingName_6018Parser(); + // not generated but change include on gmfgen, can be override at the generation + case CallBehaviorActionFloatingNameEditPart.VISUAL_ID: + return getCallBehaviorActionFloatingName_6029Parser(); + // not generated but change include on gmfgen, can be override at the generation + case AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID: + return getAddStructuralFeatureValueActionFloatingName_6019Parser(); + // not generated but change include on gmfgen, can be override at the generation + case CallOperationActionFloatingNameEditPart.VISUAL_ID: + return getCallOperationActionFloatingName_6020Parser(); + // not generated but change include on gmfgen, can be override at the generation + case CreateObjectActionFloatingNameEditPart.VISUAL_ID: + return getCreateObjectActionFloatingName_6024Parser(); + // not generated but change include on gmfgen, can be override at the generation + case DestroyObjectActionFloatingNameEditPart.VISUAL_ID: + return getDestroyObjectActionFloatingName_6022Parser(); + // not generated but change include on gmfgen, can be override at the generation + case OpaqueActionFloatingNameEditPart.VISUAL_ID: + return getOpaqueActionFloatingName_6028Parser(); + // not generated but change include on gmfgen, can be override at the generation + case ReadSelfActionFloatingNameEditPart.VISUAL_ID: + return getReadSelfActionFloatingName_6025Parser(); + // not generated but change include on gmfgen, can be override at the generation + case ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID: + return getReadStructuralFeatureActionFloatingName_6023Parser(); + // not generated but change include on gmfgen, can be override at the generation + case ReadVariableActionFloatingNameEditPart.VISUAL_ID: + return getReadVariableActionFloatingName_6021Parser(); + // not generated but change include on gmfgen, can be override at the generation + case SendObjectActionFloatingNameEditPart.VISUAL_ID: + return getSendObjectActionFloatingName_6027Parser(); + // not generated but change include on gmfgen, can be override at the generation + case ValueSpecificationActionFloatingNameEditPart.VISUAL_ID: + return getValueSpecificationActionFloatingName_6026Parser(); + case ActivityIsSingleExecutionEditPart.VISUAL_ID: + return getActivityIsSingleExecution_5002Parser(); + case ParameterEditPart.VISUAL_ID: + return getParameter_3001Parser(); + case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: + return getConstraint_3002Parser(); + case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: + return getConstraint_3003Parser(); + case InitialNodeAppliedStereotypeEditPart.VISUAL_ID: + return getInitialNodeLabel_5080Parser(); + case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID: + return getActivityFinalNodeLabel_5081Parser(); + case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID: + return getFlowFinalNodeLabel_5082Parser(); + case OpaqueActionNameEditPart.VISUAL_ID: + return getOpaqueActionName_5003Parser(); + case ValuePinInOActLabelEditPart.VISUAL_ID: + return getValuePinLabel_5011Parser(); + case ValuePinInOActValueEditPart.VISUAL_ID: + return getValuePinLabel_5024Parser(); + case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5083Parser(); + case ActionInputPinInOActLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5012Parser(); + case ActionInputPinInOActValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5025Parser(); + case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5084Parser(); + case InputPinInOActLabelEditPart.VISUAL_ID: + return getInputPinLabel_5009Parser(); + case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5085Parser(); + case OutputPinInOActLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5010Parser(); + case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5086Parser(); + case CallBehaviorActionNameEditPart.VISUAL_ID: + return getCallBehaviorActionLabel_5004Parser(); + case ValuePinInCBActLabelEditPart.VISUAL_ID: + return getValuePinLabel_5013Parser(); + case ValuePinInCBActValueEditPart.VISUAL_ID: + return getValuePinLabel_5026Parser(); + case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5087Parser(); + case ActionInputPinInCBActLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5014Parser(); + case ActionInputPinInCBActValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5027Parser(); + case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5088Parser(); + case InputPinInCBActLabelEditPart.VISUAL_ID: + return getInputPinLabel_5015Parser(); + case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5089Parser(); + case OutputPinInCBActLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5016Parser(); + case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5090Parser(); + case CallOperationActionNameEditPart.VISUAL_ID: + return getCallOperationActionLabel_5006Parser(); + case ActionInputPinInCOActLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5017Parser(); + case ActionInputPinInCOActValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5028Parser(); + case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5091Parser(); + case ValuePinInCOActLabelEditPart.VISUAL_ID: + return getValuePinLabel_5018Parser(); + case ValuePinInCOActValueEditPart.VISUAL_ID: + return getValuePinLabel_5029Parser(); + case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5092Parser(); + case InputPinInCOActLabelEditPart.VISUAL_ID: + return getInputPinLabel_5019Parser(); + case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5093Parser(); + case OutputPinInCOActLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5020Parser(); + case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5094Parser(); + case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID: + return getValuePinLabel_5021Parser(); + case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID: + return getValuePinLabel_5030Parser(); + case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5095Parser(); + case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5022Parser(); + case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5031Parser(); + case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5096Parser(); + case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID: + return getInputPinLabel_5023Parser(); + case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5097Parser(); + case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return getDurationConstraintName_5038Parser(); + case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return getDurationConstraintLabel_5130Parser(); + case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return getDurationConstraintName_5039Parser(); + case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return getDurationConstraintLabel_5131Parser(); + case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return getTimeConstraintName_5040Parser(); + case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return getTimeConstraintLabel_5132Parser(); + case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return getTimeConstraintName_5041Parser(); + case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return getTimeConstraintLabel_5133Parser(); + case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return getIntervalConstraintName_5036Parser(); + case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return getIntervalConstraintLabel_5134Parser(); + case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return getIntervalConstraintName_5037Parser(); + case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return getIntervalConstraintLabel_5135Parser(); + case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID: + return getConstraintName_5007Parser(); + case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID: + return getConstraintLabel_5136Parser(); + case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID: + return getConstraintName_5008Parser(); + case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID: + return getConstraintLabel_5137Parser(); + case DecisionInputEditPart.VISUAL_ID: + return getDecisionNodeLabel_5043Parser(); + case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID: + return getDecisionNodeLabel_5098Parser(); + case MergeNodeAppliedStereotypeEditPart.VISUAL_ID: + return getMergeNodeLabel_5099Parser(); + case ForkNodeAppliedStereotypeEditPart.VISUAL_ID: + return getForkNodeLabel_5100Parser(); + case JoinSpecEditPart.VISUAL_ID: + return getJoinNodeLabel_5042Parser(); + case JoinNodeAppliedStereotypeEditPart.VISUAL_ID: + return getJoinNodeLabel_5101Parser(); + case DataStoreNodeLabelEditPart.VISUAL_ID: + return getDataStoreNodeLabel_5127Parser(); + case DataStoreSelectionEditPart.VISUAL_ID: + return getDataStoreNodeLabel_5128Parser(); + case SendObjectActionNameEditPart.VISUAL_ID: + return getSendObjectActionName_5059Parser(); + case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID: + return getValuePinLabel_5049Parser(); + case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID: + return getValuePinLabel_5050Parser(); + case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5102Parser(); + case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5051Parser(); + case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5052Parser(); + case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5103Parser(); + case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID: + return getInputPinLabel_5053Parser(); + case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5104Parser(); + case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID: + return getValuePinLabel_5054Parser(); + case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID: + return getValuePinLabel_5055Parser(); + case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5105Parser(); + case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5056Parser(); + case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5057Parser(); + case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5106Parser(); + case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID: + return getInputPinLabel_5058Parser(); + case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5107Parser(); + case SendSignalActionNameEditPart.VISUAL_ID: + return getSendSignalActionName_5060Parser(); + case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5061Parser(); + case ActionInputPinInSendSigActValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5062Parser(); + case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5108Parser(); + case ValuePinInSendSigActLabelEditPart.VISUAL_ID: + return getValuePinLabel_5063Parser(); + case ValuePinInSendSigActValueEditPart.VISUAL_ID: + return getValuePinLabel_5064Parser(); + case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5109Parser(); + case InputPinInSendSigActLabelEditPart.VISUAL_ID: + return getInputPinLabel_5065Parser(); + case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5110Parser(); + case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID: + return getValuePinLabel_5072Parser(); + case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID: + return getValuePinLabel_5073Parser(); + case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getValuePinLabel_5111Parser(); + case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: + return getActionInputPinLabel_5074Parser(); + case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID: + return getActionInputPinLabel_5075Parser(); + case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getActionInputPinLabel_5112Parser(); + case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID: + return getInputPinLabel_5076Parser(); + case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5113Parser(); + case ParameterNodeNameEditPart.VISUAL_ID: + return getActivityParameterNodeLabel_5071Parser(); + case AcceptEventActionLabelEditPart.VISUAL_ID: + return getAcceptEventActionLabel_5078Parser(); + case AcceptTimeEventActionLabelEditPart.VISUAL_ID: + return getAcceptEventActionLabel_5079Parser(); + case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID: + return getAcceptEventActionLabel_5115Parser(); + case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5077Parser(); + case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5114Parser(); + case ValueSpecificationActionNameEditPart.VISUAL_ID: + return getValueSpecificationActionName_5126Parser(); + case OutputPinInValSpecActLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5124Parser(); + case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5125Parser(); + case ConditionalNodeKeywordEditPart.VISUAL_ID: + return getConditionalNodeLabel_5119Parser(); + case ExpansionRegionKeywordEditPart.VISUAL_ID: + return getExpansionRegionLabel_5120Parser(); + case LoopNodeKeywordEditPart.VISUAL_ID: + return getLoopNodeLabel_5121Parser(); + case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5184Parser(); + case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5185Parser(); + case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5186Parser(); + case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5183Parser(); + case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5187Parser(); + case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5188Parser(); + case SequenceNodeKeywordEditPart.VISUAL_ID: + return getSequenceNodeLabel_5123Parser(); + case StructuredActivityNodeKeywordEditPart.VISUAL_ID: + return getStructuredActivityNodeLabel_5117Parser(); + case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID: + return getInputPinLabel_5178Parser(); + case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID: + return getInputPinLabel_5179Parser(); + case ActivityPartitionNameEditPart.VISUAL_ID: + return getActivityPartitionName_5118Parser(); + case CommentBodyLabelEditPart.VISUAL_ID: + return getCommentBody_5138Parser(); + case ReadSelfActionNameEditPart.VISUAL_ID: + return getReadSelfActionName_5139Parser(); + case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5144Parser(); + case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID: + return getOutputPinLabel_5145Parser(); + case ActivityNameEditPartCN.VISUAL_ID: + return getActivityName_5142Parser(); + case ActivityIsSingleExecutionCNEditPart.VISUAL_ID: + return getActivityIsSingleExecution_5143Parser(); + case CreateObjectActionNameEditPart.VISUAL_ID: + return getCreateObjectActionName_5148Parser(); + case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5146Parser(); + case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5147Parser(); + case ShapeNamedElementNameEditPart.VISUAL_ID: + return getNamedElementName_5129Parser(); + case ReadStructuralFeatureActionNameEditPart.VISUAL_ID: + return getReadStructuralFeatureActionName_5153Parser(); + case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID: + return getInputPinLabel_5149Parser(); + case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getInputPinLabel_5150Parser(); + case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5151Parser(); + case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5152Parser(); + case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID: + return getAddStructuralFeatureValueActionName_5160Parser(); + case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID: + return getInputPinLabel_5154Parser(); + case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getInputPinLabel_5155Parser(); + case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID: + return getInputPinLabel_5156Parser(); + case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID: + return getInputPinLabel_5157Parser(); + case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID: + return getOutputPinLabel_5158Parser(); + case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID: + return getOutputPinLabel_5159Parser(); + case DestroyObjectActionNameEditPart.VISUAL_ID: + return getDestroyObjectActionName_5163Parser(); + case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID: + return getInputPinLabel_5161Parser(); + case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getInputPinLabel_5162Parser(); + case ReadVariableActionNameEditPart.VISUAL_ID: + return getReadVariableActionName_5166Parser(); + case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5164Parser(); + case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getOutputPinLabel_5165Parser(); + case AddVariableValueActionNameEditPart.VISUAL_ID: + return getAddVariableValueActionName_5171Parser(); + case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID: + return getInputPinLabel_5167Parser(); + case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getInputPinLabel_5168Parser(); + case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID: + return getInputPinLabel_5169Parser(); + case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getInputPinLabel_5170Parser(); + case BroadcastSignalActionNameEditPart.VISUAL_ID: + return getBroadcastSignalActionName_5175Parser(); + case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID: + return getInputPinLabel_5172Parser(); + case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID: + return getInputPinLabel_5173Parser(); + case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID: + return getInputPinLabel_5174Parser(); + case CentralBufferNodeLabelEditPart.VISUAL_ID: + return getCentralBufferNodeLabel_5176Parser(); + case CentralBufferNodeSelectionEditPart.VISUAL_ID: + return getCentralBufferNodeLabel_5177Parser(); + case ConstraintNameEditPartCN.VISUAL_ID: + return getConstraintName_5189Parser(); + case ConstraintBodyEditPartCN.VISUAL_ID: + return getConstraintSpecification_5190Parser(); + case ObjectFlowNameEditPart.VISUAL_ID: + return getObjectFlowName_6001Parser(); + case ObjectFlowWeightEditPart.VISUAL_ID: + return getObjectFlowLabel_6002Parser(); + case ObjectFlowSelectionEditPart.VISUAL_ID: + return getObjectFlowLabel_6005Parser(); + case ObjectFlowTransformationEditPart.VISUAL_ID: + return getObjectFlowLabel_6006Parser(); + case DecisionInputFlowEditPart.VISUAL_ID: + return getObjectFlowLabel_6007Parser(); + case ObjectFlowGuardEditPart.VISUAL_ID: + return getObjectFlowLabel_6008Parser(); + case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID: + return getObjectFlowLabel_6010Parser(); + case ControlFlowNameEditPart.VISUAL_ID: + return getControlFlowName_6003Parser(); + case ControlFlowWeightEditPart.VISUAL_ID: + return getControlFlowLabel_6004Parser(); + case ControlFlowGuardEditPart.VISUAL_ID: + return getControlFlowLabel_6009Parser(); + case ControlFlowAppliedStereotypeEditPart.VISUAL_ID: + return getControlFlowLabel_6011Parser(); + case ExceptionHandlerTypeEditPart.VISUAL_ID: + return getExceptionHandlerLabel_6012Parser(); + } + return null; + } + + /** + * Utility method that consults ParserService + * + * @generated + */ + public static IParser getParser(IElementType type, EObject object, String parserHint) { + return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint)); + } + + /** + * @generated + */ + @Override + public IParser getParser(IAdaptable hint) { + String vid = (String) hint.getAdapter(String.class); + if (vid != null) { + return getParser(UMLVisualIDRegistry.getVisualID(vid)); + } + View view = (View) hint.getAdapter(View.class); + if (view != null) { + return getParser(UMLVisualIDRegistry.getVisualID(view)); + } + return null; + } + + /** + * @generated + */ + @Override + public boolean provides(IOperation operation) { + if (operation instanceof GetParserOperation) { + IAdaptable hint = ((GetParserOperation) operation).getHint(); + if (UMLElementTypes.getElement(hint) == null) { + return false; + } + return getParser(hint) != null; + } + return false; + } + + /** + * @generated + */ + private static class HintAdapter extends ParserHintAdapter { + + /** + * @generated + */ + private final IElementType elementType; + + /** + * @generated + */ + public HintAdapter(IElementType type, EObject object, String parserHint) { + super(object, parserHint); + assert type != null; + elementType = type; + } + + /** + * @generated + */ + @Override + public Object getAdapter(Class adapter) { + if (IElementType.class.equals(adapter)) { + return elementType; + } + return super.getAdapter(adapter); + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java index 196ea679ddf..de8fa7689d5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java @@ -1,3411 +1,3517 @@ -/***************************************************************************** - * Copyright (c) 2009 Atos Origin. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Atos Origin - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.activity.providers; - -import java.util.ArrayList; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; -import org.eclipse.gmf.runtime.common.core.service.IOperation; -import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; -import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider; -import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation; -import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation; -import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; -import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation; -import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation; -import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; -import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.IHintedType; -import org.eclipse.gmf.runtime.notation.Bounds; -import org.eclipse.gmf.runtime.notation.Connector; -import org.eclipse.gmf.runtime.notation.DecorationNode; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.gmf.runtime.notation.Edge; -import org.eclipse.gmf.runtime.notation.FillStyle; -import org.eclipse.gmf.runtime.notation.FontStyle; -import org.eclipse.gmf.runtime.notation.Location; -import org.eclipse.gmf.runtime.notation.MeasurementUnit; -import org.eclipse.gmf.runtime.notation.Node; -import org.eclipse.gmf.runtime.notation.NotationFactory; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.RelativeBendpoints; -import org.eclipse.gmf.runtime.notation.Shape; -import org.eclipse.gmf.runtime.notation.TitleStyle; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; -import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils; -import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; -import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils; -import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; -import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*; -import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; -import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.uml2.uml.ActionInputPin; -import org.eclipse.uml2.uml.CallBehaviorAction; -import org.eclipse.uml2.uml.CallOperationAction; -import org.eclipse.uml2.uml.InputPin; -import org.eclipse.uml2.uml.OpaqueAction; -import org.eclipse.uml2.uml.OutputPin; -import org.eclipse.uml2.uml.ValuePin; - -/** - * @generated - */ -public class UMLViewProvider extends AbstractProvider implements IViewProvider { - - /** - * @generated - */ - @Override - public final boolean provides(IOperation operation) { - if (operation instanceof CreateViewForKindOperation) { - return provides((CreateViewForKindOperation) operation); - } - assert operation instanceof CreateViewOperation; - if (operation instanceof CreateDiagramViewOperation) { - return provides((CreateDiagramViewOperation) operation); - } else if (operation instanceof CreateEdgeViewOperation) { - return provides((CreateEdgeViewOperation) operation); - } else if (operation instanceof CreateNodeViewOperation) { - return provides((CreateNodeViewOperation) operation); - } - return false; - } - - /** - * @generated - */ - protected boolean provides(CreateViewForKindOperation op) { - /* - * if (op.getViewKind() == Node.class) - * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null; - * if (op.getViewKind() == Edge.class) - * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null; - */ - // check Diagram Type should be the class diagram - String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView()); - if (!getDiagramProvidedId().equals(modelID)) { - return false; - } - int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint()); - if (Node.class.isAssignableFrom(op.getViewKind())) { - return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID); - } - return true; - } - - /** - * Indicates for which diagram this provider works for. - *

- * This method can be overloaded when diagram editor inherits from another one - *

- * - * @return the unique identifier of the diagram for which views are provided. - */ - protected String getDiagramProvidedId() { - return ActivityDiagramEditPart.MODEL_ID; - } - - /** - * @generated - */ - protected boolean provides(CreateDiagramViewOperation op) { - return ActivityDiagramEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1; - } - - /** - * @generated - */ - protected boolean provides(CreateNodeViewOperation op) { - if (op.getContainerView() == null) { - return false; - } - IElementType elementType = getSemanticElementType(op.getSemanticAdapter()); - EObject domainElement = getSemanticElement(op.getSemanticAdapter()); - int visualID; - if (op.getSemanticHint() == null) { - // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy. - // In this situation there should be NO elementType, visualID will be determined - // by VisualIDRegistry.getNodeVisualID() for domainElement. - if (elementType != null || domainElement == null) { - return false; - } - visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); - } else { - visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint()); - if (elementType != null) { - if (elementType instanceof IExtendedHintedElementType) { - IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType); - if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) { - return false; // foreign element type. - } - } else { - if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { - return false; // foreign element type - } - } - String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); - if (!op.getSemanticHint().equals(elementTypeHint)) { - return false; // if semantic hint is specified it should be the same as in element type - } - if (domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) { - return false; // visual id for node EClass should match visual id from element type - } - } else { - if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) { - return false; // foreign diagram - } - switch (visualID) { - case ActivityEditPart.VISUAL_ID: - case ParameterEditPart.VISUAL_ID: - case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: - case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: - case InitialNodeEditPart.VISUAL_ID: - case ActivityFinalNodeEditPart.VISUAL_ID: - case FlowFinalNodeEditPart.VISUAL_ID: - case OpaqueActionEditPart.VISUAL_ID: - case ValuePinInOpaqueActEditPart.VISUAL_ID: - case ActionInputPinInOpaqueActEditPart.VISUAL_ID: - case InputPinInOpaqueActEditPart.VISUAL_ID: - case OutputPinInOpaqueActEditPart.VISUAL_ID: - case CallBehaviorActionEditPart.VISUAL_ID: - case ValuePinInCallBeActEditPart.VISUAL_ID: - case ActionInputPinInCallBeActEditPart.VISUAL_ID: - case InputPinInCallBeActEditPart.VISUAL_ID: - case OutputPinInCallBeActEditPart.VISUAL_ID: - case CallOperationActionEditPart.VISUAL_ID: - case ActionInputPinInCallOpActEditPart.VISUAL_ID: - case ValuePinInCallOpActEditPart.VISUAL_ID: - case InputPinInCallOpActEditPart.VISUAL_ID: - case OutputPinInCallOpActEditPart.VISUAL_ID: - case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: - case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: - case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: - case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: - case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: - case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: - case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: - case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: - case ConstraintAsLocalPrecondEditPart.VISUAL_ID: - case ConstraintAsLocalPostcondEditPart.VISUAL_ID: - case DecisionNodeEditPart.VISUAL_ID: - case MergeNodeEditPart.VISUAL_ID: - case ForkNodeEditPart.VISUAL_ID: - case JoinNodeEditPart.VISUAL_ID: - case DataStoreNodeEditPart.VISUAL_ID: - case SendObjectActionEditPart.VISUAL_ID: - case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: - case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: - case InputPinInSendObjActAsReqEditPart.VISUAL_ID: - case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: - case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: - case SendSignalActionEditPart.VISUAL_ID: - case ActionInputPinInSendSigActEditPart.VISUAL_ID: - case ValuePinInSendSigActEditPart.VISUAL_ID: - case InputPinInSendSigActEditPart.VISUAL_ID: - case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: - case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: - case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: - case ActivityParameterNodeEditPart.VISUAL_ID: - case AcceptEventActionEditPart.VISUAL_ID: - case OutputPinInAcceptEventActionEditPart.VISUAL_ID: - case ValueSpecificationActionEditPart.VISUAL_ID: - case OutputPinInValSpecActEditPart.VISUAL_ID: - case ConditionalNodeEditPart.VISUAL_ID: - case ExpansionRegionEditPart.VISUAL_ID: - case ExpansionNodeAsInEditPart.VISUAL_ID: - case ExpansionNodeAsOutEditPart.VISUAL_ID: - case LoopNodeEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: - case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: - case SequenceNodeEditPart.VISUAL_ID: - case StructuredActivityNodeEditPart.VISUAL_ID: - case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: - case ActivityPartitionEditPart.VISUAL_ID: - case InterruptibleActivityRegionEditPart.VISUAL_ID: - case CommentEditPartCN.VISUAL_ID: - case ReadSelfActionEditPart.VISUAL_ID: - case ReadSelfActionOutputPinEditPart.VISUAL_ID: - case ActivityEditPartCN.VISUAL_ID: - case CreateObjectActionEditPart.VISUAL_ID: - case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: - case ShapeNamedElementEditPart.VISUAL_ID: - case ReadStructuralFeatureActionEditPart.VISUAL_ID: - case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: - case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: - case AddStructuralFeatureValueActionEditPart.VISUAL_ID: - case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: - case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: - case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: - case DestroyObjectActionEditPart.VISUAL_ID: - case InputPinInDestroyObjectActionEditPart.VISUAL_ID: - case ReadVariableActionEditPart.VISUAL_ID: - case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: - case AddVariableValueActionEditPart.VISUAL_ID: - case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: - case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: - case BroadcastSignalActionEditPart.VISUAL_ID: - case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: - case CentralBufferNodeEditPart.VISUAL_ID: - case ConstraintEditPartCN.VISUAL_ID: - if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) { - return false; // visual id in semantic hint should match visual id for domain element - } - break; - default: - return false; - } - } - } - return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID); - } - - /** - * @generated - */ - protected boolean provides(CreateEdgeViewOperation op) { - IElementType elementType = getSemanticElementType(op.getSemanticAdapter()); - // RS: add code for extended types creation - if (elementType instanceof IExtendedHintedElementType) { - IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType); - if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) { - return false; // foreign element type. - } - } else { - if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { - return false; // foreign element type - } - } - // if (!org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) { - // return false; // foreign element type - // } - // END R.S. - String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); - if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) { - return false; // our hint is visual id and must be specified, and it should be the same as in element type - } - int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint); - EObject domainElement = getSemanticElement(op.getSemanticAdapter()); - if (domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) { - return false; // visual id for link EClass should match visual id from element type - } - return true; - } - - /** - * @generated - */ - @Override - public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) { - Diagram diagram = NotationFactory.eINSTANCE.createDiagram(); - DiagramVersioningUtils.stampCurrentVersion(diagram); - diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle()); - diagram.setType(ActivityDiagramEditPart.MODEL_ID); - diagram.setElement(getSemanticElement(semanticAdapter)); - diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL); - return diagram; - } - - /** - * @generated - */ - @Override - public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { - final EObject domainElement = getSemanticElement(semanticAdapter); - final int visualID; - if (semanticHint == null) { - visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement); - } else { - visualID = UMLVisualIDRegistry.getVisualID(semanticHint); - } - switch (visualID) { - case ActivityEditPart.VISUAL_ID: - return createActivity_2001(domainElement, containerView, index, persisted, preferencesHint); - case ParameterEditPart.VISUAL_ID: - return createParameter_3001(domainElement, containerView, index, persisted, preferencesHint); - case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: - return createConstraint_3002(domainElement, containerView, index, persisted, preferencesHint); - case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: - return createConstraint_3003(domainElement, containerView, index, persisted, preferencesHint); - case InitialNodeEditPart.VISUAL_ID: - return createInitialNode_3004(domainElement, containerView, index, persisted, preferencesHint); - case ActivityFinalNodeEditPart.VISUAL_ID: - return createActivityFinalNode_3005(domainElement, containerView, index, persisted, preferencesHint); - case FlowFinalNodeEditPart.VISUAL_ID: - return createFlowFinalNode_3006(domainElement, containerView, index, persisted, preferencesHint); - case OpaqueActionEditPart.VISUAL_ID: - return createOpaqueAction_3007(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInOpaqueActEditPart.VISUAL_ID: - return createValuePin_3015(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInOpaqueActEditPart.VISUAL_ID: - return createActionInputPin_3016(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInOpaqueActEditPart.VISUAL_ID: - return createInputPin_3013(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInOpaqueActEditPart.VISUAL_ID: - return createOutputPin_3014(domainElement, containerView, index, persisted, preferencesHint); - case CallBehaviorActionEditPart.VISUAL_ID: - return createCallBehaviorAction_3008(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInCallBeActEditPart.VISUAL_ID: - return createValuePin_3017(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInCallBeActEditPart.VISUAL_ID: - return createActionInputPin_3018(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInCallBeActEditPart.VISUAL_ID: - return createInputPin_3019(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInCallBeActEditPart.VISUAL_ID: - return createOutputPin_3020(domainElement, containerView, index, persisted, preferencesHint); - case CallOperationActionEditPart.VISUAL_ID: - return createCallOperationAction_3010(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInCallOpActEditPart.VISUAL_ID: - return createActionInputPin_3021(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInCallOpActEditPart.VISUAL_ID: - return createValuePin_3022(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInCallOpActEditPart.VISUAL_ID: - return createInputPin_3023(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInCallOpActEditPart.VISUAL_ID: - return createOutputPin_3024(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: - return createValuePin_3025(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: - return createActionInputPin_3026(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: - return createInputPin_3027(domainElement, containerView, index, persisted, preferencesHint); - case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: - return createDurationConstraint_3034(domainElement, containerView, index, persisted, preferencesHint); - case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: - return createDurationConstraint_3035(domainElement, containerView, index, persisted, preferencesHint); - case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: - return createTimeConstraint_3036(domainElement, containerView, index, persisted, preferencesHint); - case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: - return createTimeConstraint_3037(domainElement, containerView, index, persisted, preferencesHint); - case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: - return createIntervalConstraint_3032(domainElement, containerView, index, persisted, preferencesHint); - case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: - return createIntervalConstraint_3033(domainElement, containerView, index, persisted, preferencesHint); - case ConstraintAsLocalPrecondEditPart.VISUAL_ID: - return createConstraint_3011(domainElement, containerView, index, persisted, preferencesHint); - case ConstraintAsLocalPostcondEditPart.VISUAL_ID: - return createConstraint_3012(domainElement, containerView, index, persisted, preferencesHint); - case DecisionNodeEditPart.VISUAL_ID: - return createDecisionNode_3038(domainElement, containerView, index, persisted, preferencesHint); - case MergeNodeEditPart.VISUAL_ID: - return createMergeNode_3039(domainElement, containerView, index, persisted, preferencesHint); - case ForkNodeEditPart.VISUAL_ID: - return createForkNode_3040(domainElement, containerView, index, persisted, preferencesHint); - case JoinNodeEditPart.VISUAL_ID: - return createJoinNode_3041(domainElement, containerView, index, persisted, preferencesHint); - case DataStoreNodeEditPart.VISUAL_ID: - return createDataStoreNode_3078(domainElement, containerView, index, persisted, preferencesHint); - case SendObjectActionEditPart.VISUAL_ID: - return createSendObjectAction_3042(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: - return createValuePin_3046(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: - return createActionInputPin_3047(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInSendObjActAsReqEditPart.VISUAL_ID: - return createInputPin_3048(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: - return createValuePin_3049(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: - return createActionInputPin_3050(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: - return createInputPin_3051(domainElement, containerView, index, persisted, preferencesHint); - case SendSignalActionEditPart.VISUAL_ID: - return createSendSignalAction_3052(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInSendSigActEditPart.VISUAL_ID: - return createActionInputPin_3053(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInSendSigActEditPart.VISUAL_ID: - return createValuePin_3054(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInSendSigActEditPart.VISUAL_ID: - return createInputPin_3055(domainElement, containerView, index, persisted, preferencesHint); - case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: - return createValuePin_3060(domainElement, containerView, index, persisted, preferencesHint); - case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: - return createActionInputPin_3061(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: - return createInputPin_3062(domainElement, containerView, index, persisted, preferencesHint); - case ActivityParameterNodeEditPart.VISUAL_ID: - return createActivityParameterNode_3059(domainElement, containerView, index, persisted, preferencesHint); - case AcceptEventActionEditPart.VISUAL_ID: - return createAcceptEventAction_3063(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInAcceptEventActionEditPart.VISUAL_ID: - return createOutputPin_3064(domainElement, containerView, index, persisted, preferencesHint); - case ValueSpecificationActionEditPart.VISUAL_ID: - return createValueSpecificationAction_3076(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInValSpecActEditPart.VISUAL_ID: - return createOutputPin_3077(domainElement, containerView, index, persisted, preferencesHint); - case ConditionalNodeEditPart.VISUAL_ID: - return createConditionalNode_3069(domainElement, containerView, index, persisted, preferencesHint); - case ExpansionRegionEditPart.VISUAL_ID: - return createExpansionRegion_3070(domainElement, containerView, index, persisted, preferencesHint); - case ExpansionNodeAsInEditPart.VISUAL_ID: - return createExpansionNode_3074(domainElement, containerView, index, persisted, preferencesHint); - case ExpansionNodeAsOutEditPart.VISUAL_ID: - return createExpansionNode_3075(domainElement, containerView, index, persisted, preferencesHint); - case LoopNodeEditPart.VISUAL_ID: - return createLoopNode_3071(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: - return createOutputPin_3109(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: - return createOutputPin_3110(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: - return createOutputPin_3111(domainElement, containerView, index, persisted, preferencesHint); - case SequenceNodeEditPart.VISUAL_ID: - return createSequenceNode_3073(domainElement, containerView, index, persisted, preferencesHint); - case StructuredActivityNodeEditPart.VISUAL_ID: - return createStructuredActivityNode_3065(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: - return createInputPin_3105(domainElement, containerView, index, persisted, preferencesHint); - case ActivityPartitionEditPart.VISUAL_ID: - return createActivityPartition_3067(domainElement, containerView, index, persisted, preferencesHint); - case InterruptibleActivityRegionEditPart.VISUAL_ID: - return createInterruptibleActivityRegion_3068(domainElement, containerView, index, persisted, preferencesHint); - case CommentEditPartCN.VISUAL_ID: - return createComment_3080(domainElement, containerView, index, persisted, preferencesHint); - case ReadSelfActionEditPart.VISUAL_ID: - return createReadSelfAction_3081(domainElement, containerView, index, persisted, preferencesHint); - case ReadSelfActionOutputPinEditPart.VISUAL_ID: - return createOutputPin_3084(domainElement, containerView, index, persisted, preferencesHint); - case ActivityEditPartCN.VISUAL_ID: - return createActivity_3083(domainElement, containerView, index, persisted, preferencesHint); - case CreateObjectActionEditPart.VISUAL_ID: - return createCreateObjectAction_3086(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: - return createOutputPin_3087(domainElement, containerView, index, persisted, preferencesHint); - case ShapeNamedElementEditPart.VISUAL_ID: - return createNamedElement_3085(domainElement, containerView, index, persisted, preferencesHint); - case ReadStructuralFeatureActionEditPart.VISUAL_ID: - return createReadStructuralFeatureAction_3088(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: - return createInputPin_3089(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: - return createOutputPin_3090(domainElement, containerView, index, persisted, preferencesHint); - case AddStructuralFeatureValueActionEditPart.VISUAL_ID: - return createAddStructuralFeatureValueAction_3091(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: - return createInputPin_3092(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: - return createInputPin_3093(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: - return createOutputPin_3094(domainElement, containerView, index, persisted, preferencesHint); - case DestroyObjectActionEditPart.VISUAL_ID: - return createDestroyObjectAction_3095(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInDestroyObjectActionEditPart.VISUAL_ID: - return createInputPin_3096(domainElement, containerView, index, persisted, preferencesHint); - case ReadVariableActionEditPart.VISUAL_ID: - return createReadVariableAction_3097(domainElement, containerView, index, persisted, preferencesHint); - case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: - return createOutputPin_3098(domainElement, containerView, index, persisted, preferencesHint); - case AddVariableValueActionEditPart.VISUAL_ID: - return createAddVariableValueAction_3099(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: - return createInputPin_3100(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: - return createInputPin_3101(domainElement, containerView, index, persisted, preferencesHint); - case BroadcastSignalActionEditPart.VISUAL_ID: - return createBroadcastSignalAction_3102(domainElement, containerView, index, persisted, preferencesHint); - case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: - return createInputPin_3103(domainElement, containerView, index, persisted, preferencesHint); - case CentralBufferNodeEditPart.VISUAL_ID: - return createCentralBufferNode_3104(domainElement, containerView, index, persisted, preferencesHint); - case ConstraintEditPartCN.VISUAL_ID: - return createConstraint_3112(domainElement, containerView, index, persisted, preferencesHint); - } - // can't happen, provided #provides(CreateNodeViewOperation) is correct - return null; - } - - /** - * @generated - */ - @Override - public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { - IElementType elementType = getSemanticElementType(semanticAdapter); - String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); - switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) { - case ActionLocalPreconditionEditPart.VISUAL_ID: - return createActionLocalPrecondition_4001(containerView, index, persisted, preferencesHint); - case ActionLocalPostconditionEditPart.VISUAL_ID: - return createActionLocalPostcondition_4002(containerView, index, persisted, preferencesHint); - case ObjectFlowEditPart.VISUAL_ID: - return createObjectFlow_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); - case ControlFlowEditPart.VISUAL_ID: - return createControlFlow_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); - case ExceptionHandlerEditPart.VISUAL_ID: - return createExceptionHandler_4005(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); - case CommentLinkEditPart.VISUAL_ID: - return createCommentAnnotatedElement_4006(containerView, index, persisted, preferencesHint); - case ConstraintConstrainedElementEditPart.VISUAL_ID: - return createConstraintConstrainedElement_4007(containerView, index, persisted, preferencesHint); - } - // can never happen, provided #provides(CreateEdgeViewOperation) is correct - return null; - } - - /** - * @generated - */ - public Node createActivity_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActivityEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - stampShortcut(containerView, node); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity"); - Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID)); - Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID), false, false, true, true); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity"); - return node; - } - - /** - * @generated - */ - public Node createParameter_3001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Node node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - node.setType(UMLVisualIDRegistry.getType(ParameterEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Parameter"); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Parameter"); - return node; - } - - /** - * @generated - */ - public Node createConstraint_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Node node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPrecondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); - return node; - } - - /** - * @generated - */ - public Node createConstraint_3003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Node node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPostcondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); - return node; - } - - /** - * @generated - */ - public Node createInitialNode_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InitialNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InitialNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InitialNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InitialNode"); - Node label5080 = createLabel(node, UMLVisualIDRegistry.getType(InitialNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5080.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5080 = (Location) label5080.getLayoutConstraint(); - location5080.setX(0); - location5080.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActivityFinalNode_3005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActivityFinalNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityFinalNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityFinalNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityFinalNode"); - Node label5081 = createLabel(node, UMLVisualIDRegistry.getType(ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5081.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5081 = (Location) label5081.getLayoutConstraint(); - location5081.setX(0); - location5081.setY(5); - return node; - } - - /** - * @generated - */ - public Node createFlowFinalNode_3006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(FlowFinalNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "FlowFinalNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FlowFinalNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "FlowFinalNode"); - Node label5082 = createLabel(node, UMLVisualIDRegistry.getType(FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5082.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5082 = (Location) label5082.getLayoutConstraint(); - location5082.setX(0); - location5082.setY(5); - return node; - } - - /** - * @generated NOT addition of pins initialization and height adaptation to pins - */ - public Node createOpaqueAction_3007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - // adapt the height to contained pins - Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds(); - PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement); - node.setLayoutConstraint(boundsConstraint); - node.setType(UMLVisualIDRegistry.getType(OpaqueActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OpaqueAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OpaqueAction"); - Node label5003 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID)); - // Add pins - createPins(domainElement, node, persisted, preferencesHint); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInOpaqueActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5011 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActLabelEditPart.VISUAL_ID)); - label5011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5011 = (Location) label5011.getLayoutConstraint(); - location5011.setX(0); - location5011.setY(5); - Node label5024 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActValueEditPart.VISUAL_ID)); - label5024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5024 = (Location) label5024.getLayoutConstraint(); - location5024.setX(0); - location5024.setY(5); - Node label5083 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID)); - label5083.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5083 = (Location) label5083.getLayoutConstraint(); - location5083.setX(0); - location5083.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInOpaqueActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5012 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActLabelEditPart.VISUAL_ID)); - label5012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5012 = (Location) label5012.getLayoutConstraint(); - location5012.setX(0); - location5012.setY(5); - Node label5025 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActValueEditPart.VISUAL_ID)); - label5025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5025 = (Location) label5025.getLayoutConstraint(); - location5025.setX(0); - location5025.setY(5); - Node label5084 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID)); - label5084.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5084 = (Location) label5084.getLayoutConstraint(); - location5084.setX(0); - location5084.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInOpaqueActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5009 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActLabelEditPart.VISUAL_ID)); - label5009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5009 = (Location) label5009.getLayoutConstraint(); - location5009.setX(0); - location5009.setY(5); - Node label5085 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActAppliedStereotypeEditPart.VISUAL_ID)); - label5085.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5085 = (Location) label5085.getLayoutConstraint(); - location5085.setX(0); - location5085.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInOpaqueActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5010 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActLabelEditPart.VISUAL_ID)); - label5010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5010 = (Location) label5010.getLayoutConstraint(); - location5010.setX(0); - location5010.setY(5); - Node label5086 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID)); - label5086.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5086 = (Location) label5086.getLayoutConstraint(); - location5086.setX(0); - location5086.setY(5); - return node; - } - - /** - * @generated NOT addition of pins initialization and height adaptation to pins - */ - public Node createCallBehaviorAction_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - // adapt the height to contained pins - Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds(); - PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement); - node.setLayoutConstraint(boundsConstraint); - node.setType(UMLVisualIDRegistry.getType(CallBehaviorActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallBehaviorAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallBehaviorAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallBehaviorAction"); - Node label5004 = createLabel(node, UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID)); - // Add pins - createPins(domainElement, node, persisted, preferencesHint); - return node; - } - - /** - * Create pins in an action's node - * - * @param domainElement - * the model action - * @param node - * the action node - * @param persisted - * the persisted property of views to create - * @param preferencesHint - * the preference hint - * @generated NOT - */ - private void createPins(EObject domainElement, Shape node, boolean persisted, PreferencesHint preferencesHint) { - if (domainElement instanceof OpaqueAction) { - // pins of an opaque action : input values and output values - int index = 0; - for (InputPin pin : ((OpaqueAction) domainElement).getInputValues()) { - if (pin instanceof ValuePin) { - createValuePin_3015(pin, node, index, persisted, preferencesHint); - } else if (pin instanceof ActionInputPin) { - createActionInputPin_3016(pin, node, index, persisted, preferencesHint); - } else { - createInputPin_3013(pin, node, index, persisted, preferencesHint); - } - index++; - } - index = 0; - for (OutputPin pin : ((OpaqueAction) domainElement).getOutputValues()) { - createOutputPin_3014(pin, node, index, persisted, preferencesHint); - } - } else if (domainElement instanceof CallBehaviorAction) { - // pins of a call behavior action : arguments and results - int index = 0; - for (InputPin pin : ((CallBehaviorAction) domainElement).getArguments()) { - if (pin instanceof ValuePin) { - createValuePin_3017(pin, node, index, persisted, preferencesHint); - } else if (pin instanceof ActionInputPin) { - createActionInputPin_3018(pin, node, index, persisted, preferencesHint); - } else { - createInputPin_3019(pin, node, index, persisted, preferencesHint); - } - index++; - } - index = 0; - for (OutputPin pin : ((CallBehaviorAction) domainElement).getResults()) { - createOutputPin_3020(pin, node, index, persisted, preferencesHint); - } - } else if (domainElement instanceof CallOperationAction) { - // pins of a call operation action : arguments, target and results - int index = 0; - for (InputPin pin : ((CallOperationAction) domainElement).getArguments()) { - if (pin instanceof ValuePin) { - createValuePin_3022(pin, node, index, persisted, preferencesHint); - } else if (pin instanceof ActionInputPin) { - createActionInputPin_3021(pin, node, index, persisted, preferencesHint); - } else { - createInputPin_3023(pin, node, index, persisted, preferencesHint); - } - index++; - } - InputPin target = ((CallOperationAction) domainElement).getTarget(); - if (target instanceof ValuePin) { - createValuePin_3025(target, node, index, persisted, preferencesHint); - } else if (target instanceof ActionInputPin) { - createActionInputPin_3026(target, node, index, persisted, preferencesHint); - } else if (target != null) { - createInputPin_3027(target, node, index, persisted, preferencesHint); - } - index = 0; - for (OutputPin pin : ((CallOperationAction) domainElement).getResults()) { - createOutputPin_3024(pin, node, index, persisted, preferencesHint); - } - } - } - - /** - * @generated - */ - public Node createValuePin_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInCallBeActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5013 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActLabelEditPart.VISUAL_ID)); - label5013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5013 = (Location) label5013.getLayoutConstraint(); - location5013.setX(0); - location5013.setY(5); - Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActValueEditPart.VISUAL_ID)); - label5026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5026 = (Location) label5026.getLayoutConstraint(); - location5026.setX(0); - location5026.setY(5); - Node label5087 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID)); - label5087.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5087 = (Location) label5087.getLayoutConstraint(); - location5087.setX(0); - location5087.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallBeActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActLabelEditPart.VISUAL_ID)); - label5014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5014 = (Location) label5014.getLayoutConstraint(); - location5014.setX(0); - location5014.setY(5); - Node label5027 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActValueEditPart.VISUAL_ID)); - label5027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5027 = (Location) label5027.getLayoutConstraint(); - location5027.setX(0); - location5027.setY(5); - Node label5088 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID)); - label5088.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5088 = (Location) label5088.getLayoutConstraint(); - location5088.setX(0); - location5088.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInCallBeActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5015 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActLabelEditPart.VISUAL_ID)); - label5015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5015 = (Location) label5015.getLayoutConstraint(); - location5015.setX(0); - location5015.setY(5); - Node label5089 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID)); - label5089.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5089 = (Location) label5089.getLayoutConstraint(); - location5089.setX(0); - location5089.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInCallBeActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5016 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActLabelEditPart.VISUAL_ID)); - label5016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5016 = (Location) label5016.getLayoutConstraint(); - location5016.setX(0); - location5016.setY(5); - Node label5090 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID)); - label5090.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5090 = (Location) label5090.getLayoutConstraint(); - location5090.setX(0); - location5090.setY(5); - return node; - } - - /** - * @generated NOT addition of pins initialization and height adaptation to pins - */ - public Node createCallOperationAction_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - // adapt the height to contained pins - Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds(); - PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement); - node.setLayoutConstraint(boundsConstraint); - node.setType(UMLVisualIDRegistry.getType(CallOperationActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallOperationAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallOperationAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallOperationAction"); - Node label5006 = createLabel(node, UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID)); - // Add pins - createPins(domainElement, node, persisted, preferencesHint); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3021(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5017 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActLabelEditPart.VISUAL_ID)); - label5017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5017 = (Location) label5017.getLayoutConstraint(); - location5017.setX(0); - location5017.setY(5); - Node label5028 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActValueEditPart.VISUAL_ID)); - label5028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5028 = (Location) label5028.getLayoutConstraint(); - location5028.setX(0); - location5028.setY(5); - Node label5091 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID)); - label5091.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5091 = (Location) label5091.getLayoutConstraint(); - location5091.setX(0); - location5091.setY(5); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3022(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5018 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActLabelEditPart.VISUAL_ID)); - label5018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5018 = (Location) label5018.getLayoutConstraint(); - location5018.setX(0); - location5018.setY(5); - Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActValueEditPart.VISUAL_ID)); - label5029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5029 = (Location) label5029.getLayoutConstraint(); - location5029.setX(0); - location5029.setY(5); - Node label5092 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID)); - label5092.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5092 = (Location) label5092.getLayoutConstraint(); - location5092.setX(0); - location5092.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3023(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5019 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActLabelEditPart.VISUAL_ID)); - label5019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5019 = (Location) label5019.getLayoutConstraint(); - location5019.setX(0); - location5019.setY(5); - Node label5093 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID)); - label5093.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5093 = (Location) label5093.getLayoutConstraint(); - location5093.setX(0); - location5093.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3024(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInCallOpActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5020 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActLabelEditPart.VISUAL_ID)); - label5020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5020 = (Location) label5020.getLayoutConstraint(); - location5020.setX(0); - location5020.setY(5); - Node label5094 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID)); - label5094.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5094 = (Location) label5094.getLayoutConstraint(); - location5094.setX(0); - location5094.setY(5); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3025(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5021 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID)); - label5021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5021 = (Location) label5021.getLayoutConstraint(); - location5021.setX(0); - location5021.setY(5); - Node label5030 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetValueEditPart.VISUAL_ID)); - label5030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5030 = (Location) label5030.getLayoutConstraint(); - location5030.setX(0); - location5030.setY(5); - Node label5095 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5095.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5095 = (Location) label5095.getLayoutConstraint(); - location5095.setX(0); - location5095.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3026(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5022 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID)); - label5022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5022 = (Location) label5022.getLayoutConstraint(); - location5022.setX(0); - location5022.setY(5); - Node label5031 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID)); - label5031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5031 = (Location) label5031.getLayoutConstraint(); - location5031.setX(0); - location5031.setY(5); - Node label5096 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5096.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5096 = (Location) label5096.getLayoutConstraint(); - location5096.setX(0); - location5096.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3027(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetLabelEditPart.VISUAL_ID)); - label5023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5023 = (Location) label5023.getLayoutConstraint(); - location5023.setX(0); - location5023.setY(5); - Node label5097 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5097.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5097 = (Location) label5097.getLayoutConstraint(); - location5097.setX(0); - location5097.setY(5); - return node; - } - - /** - * @generated - */ - public Node createConstraint_3011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint"); - Node label5007 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); - Node label5136 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createConstraint_3012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint"); - Node label5008 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); - Node label5137 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createDecisionNode_3038(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(DecisionNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DecisionNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DecisionNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DecisionNode"); - Node label5043 = createLabel(node, UMLVisualIDRegistry.getType(DecisionInputEditPart.VISUAL_ID)); - label5043.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5043 = (Location) label5043.getLayoutConstraint(); - location5043.setX(0); - location5043.setY(5); - Node label5098 = createLabel(node, UMLVisualIDRegistry.getType(DecisionNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5098.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5098 = (Location) label5098.getLayoutConstraint(); - location5098.setX(0); - location5098.setY(5); - return node; - } - - /** - * @generated - */ - public Node createMergeNode_3039(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(MergeNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "MergeNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "MergeNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "MergeNode"); - Node label5099 = createLabel(node, UMLVisualIDRegistry.getType(MergeNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5099.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5099 = (Location) label5099.getLayoutConstraint(); - location5099.setX(0); - location5099.setY(5); - return node; - } - - /** - * @generated - */ - public Node createForkNode_3040(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ForkNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ForkNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ForkNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ForkNode"); - Node label5100 = createLabel(node, UMLVisualIDRegistry.getType(ForkNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5100.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5100 = (Location) label5100.getLayoutConstraint(); - location5100.setX(0); - location5100.setY(5); - return node; - } - - /** - * @generated - */ - public Node createJoinNode_3041(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(JoinNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "JoinNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "JoinNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "JoinNode"); - Node label5042 = createLabel(node, UMLVisualIDRegistry.getType(JoinSpecEditPart.VISUAL_ID)); - label5042.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5042 = (Location) label5042.getLayoutConstraint(); - location5042.setX(0); - location5042.setY(5); - Node label5101 = createLabel(node, UMLVisualIDRegistry.getType(JoinNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5101.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5101 = (Location) label5101.getLayoutConstraint(); - location5101.setX(0); - location5101.setY(5); - return node; - } - - /** - * @generated - */ - public Node createSendObjectAction_3042(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(SendObjectActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendObjectAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendObjectAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendObjectAction"); - Node label5059 = createLabel(node, UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3046(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5049 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID)); - label5049.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5049 = (Location) label5049.getLayoutConstraint(); - location5049.setX(0); - location5049.setY(5); - Node label5050 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID)); - label5050.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5050 = (Location) label5050.getLayoutConstraint(); - location5050.setX(0); - location5050.setY(5); - Node label5102 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID)); - label5102.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5102 = (Location) label5102.getLayoutConstraint(); - location5102.setX(0); - location5102.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3047(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5051 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID)); - label5051.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5051 = (Location) label5051.getLayoutConstraint(); - location5051.setX(0); - location5051.setY(5); - Node label5052 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID)); - label5052.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5052 = (Location) label5052.getLayoutConstraint(); - location5052.setX(0); - location5052.setY(5); - Node label5103 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID)); - label5103.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5103 = (Location) label5103.getLayoutConstraint(); - location5103.setX(0); - location5103.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3048(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5053 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID)); - label5053.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5053 = (Location) label5053.getLayoutConstraint(); - location5053.setX(0); - location5053.setY(5); - Node label5104 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID)); - label5104.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5104 = (Location) label5104.getLayoutConstraint(); - location5104.setX(0); - location5104.setY(5); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3049(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5054 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID)); - label5054.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5054 = (Location) label5054.getLayoutConstraint(); - location5054.setX(0); - location5054.setY(5); - Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID)); - label5055.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5055 = (Location) label5055.getLayoutConstraint(); - location5055.setX(0); - location5055.setY(5); - Node label5105 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5105.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5105 = (Location) label5105.getLayoutConstraint(); - location5105.setX(0); - location5105.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3050(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5056 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID)); - label5056.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5056 = (Location) label5056.getLayoutConstraint(); - location5056.setX(0); - location5056.setY(5); - Node label5057 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID)); - label5057.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5057 = (Location) label5057.getLayoutConstraint(); - location5057.setX(0); - location5057.setY(5); - Node label5106 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5106.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5106 = (Location) label5106.getLayoutConstraint(); - location5106.setX(0); - location5106.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3051(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID)); - label5058.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5058 = (Location) label5058.getLayoutConstraint(); - location5058.setX(0); - location5058.setY(5); - Node label5107 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5107.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5107 = (Location) label5107.getLayoutConstraint(); - location5107.setX(0); - location5107.setY(5); - return node; - } - - /** - * @generated - */ - public Node createSendSignalAction_3052(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(SendSignalActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendSignalAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendSignalAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendSignalAction"); - Node label5060 = createLabel(node, UMLVisualIDRegistry.getType(SendSignalActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3053(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActLabelEditPart.VISUAL_ID)); - label5061.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5061 = (Location) label5061.getLayoutConstraint(); - location5061.setX(0); - location5061.setY(5); - Node label5062 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActValueEditPart.VISUAL_ID)); - label5062.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5062 = (Location) label5062.getLayoutConstraint(); - location5062.setX(0); - location5062.setY(5); - Node label5108 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID)); - label5108.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5108 = (Location) label5108.getLayoutConstraint(); - location5108.setX(0); - location5108.setY(5); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3054(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5063 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActLabelEditPart.VISUAL_ID)); - label5063.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5063 = (Location) label5063.getLayoutConstraint(); - location5063.setX(0); - location5063.setY(5); - Node label5064 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActValueEditPart.VISUAL_ID)); - label5064.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5064 = (Location) label5064.getLayoutConstraint(); - location5064.setX(0); - location5064.setY(5); - Node label5109 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID)); - label5109.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5109 = (Location) label5109.getLayoutConstraint(); - location5109.setX(0); - location5109.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3055(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5065 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActLabelEditPart.VISUAL_ID)); - label5065.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5065 = (Location) label5065.getLayoutConstraint(); - location5065.setX(0); - location5065.setY(5); - Node label5110 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID)); - label5110.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5110 = (Location) label5110.getLayoutConstraint(); - location5110.setX(0); - location5110.setY(5); - return node; - } - - /** - * @generated - */ - public Node createValuePin_3060(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); - Node label5072 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID)); - label5072.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5072 = (Location) label5072.getLayoutConstraint(); - location5072.setX(0); - location5072.setY(5); - Node label5073 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID)); - label5073.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5073 = (Location) label5073.getLayoutConstraint(); - location5073.setX(0); - location5073.setY(5); - Node label5111 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5111.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5111 = (Location) label5111.getLayoutConstraint(); - location5111.setX(0); - location5111.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActionInputPin_3061(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); - Node label5074 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID)); - label5074.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5074 = (Location) label5074.getLayoutConstraint(); - location5074.setX(0); - location5074.setY(5); - Node label5075 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID)); - label5075.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5075 = (Location) label5075.getLayoutConstraint(); - location5075.setX(0); - location5075.setY(5); - Node label5112 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5112.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5112 = (Location) label5112.getLayoutConstraint(); - location5112.setX(0); - location5112.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3062(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5076 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID)); - label5076.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5076 = (Location) label5076.getLayoutConstraint(); - location5076.setX(0); - location5076.setY(5); - Node label5113 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); - label5113.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5113 = (Location) label5113.getLayoutConstraint(); - location5113.setX(0); - location5113.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActivityParameterNode_3059(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActivityParameterNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityParameterNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityParameterNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityParameterNode"); - Node label5071 = createLabel(node, UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createAcceptEventAction_3063(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(AcceptEventActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AcceptEventAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AcceptEventAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AcceptEventAction"); - Node label5078 = createLabel(node, UMLVisualIDRegistry.getType(AcceptEventActionLabelEditPart.VISUAL_ID)); - Node label5079 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionLabelEditPart.VISUAL_ID)); - label5079.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5079 = (Location) label5079.getLayoutConstraint(); - location5079.setX(0); - location5079.setY(5); - Node label5115 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID)); - label5115.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5115 = (Location) label5115.getLayoutConstraint(); - location5115.setX(0); - location5115.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3064(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5077 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID)); - label5077.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5077 = (Location) label5077.getLayoutConstraint(); - location5077.setX(0); - location5077.setY(5); - Node label5114 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID)); - label5114.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5114 = (Location) label5114.getLayoutConstraint(); - location5114.setX(0); - location5114.setY(5); - return node; - } - - /** - * @generated - */ - public Node createStructuredActivityNode_3065(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(StructuredActivityNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "StructuredActivityNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StructuredActivityNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "StructuredActivityNode"); - Node label5117 = createLabel(node, UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "StructuredActivityNode"); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3105(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5178 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID)); - label5178.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5178 = (Location) label5178.getLayoutConstraint(); - location5178.setX(0); - location5178.setY(5); - Node label5179 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID)); - label5179.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5179 = (Location) label5179.getLayoutConstraint(); - location5179.setX(0); - location5179.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActivityPartition_3067(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActivityPartitionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityPartition"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityPartition"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityPartition"); - Node label5118 = createLabel(node, UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ActivityPartition"); - return node; - } - - /** - * @generated - */ - public Node createInterruptibleActivityRegion_3068(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InterruptibleActivityRegionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InterruptibleActivityRegion"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InterruptibleActivityRegion"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InterruptibleActivityRegion"); - createCompartment(node, UMLVisualIDRegistry.getType(InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "InterruptibleActivityRegion"); - return node; - } - - /** - * @generated - */ - public Node createComment_3080(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Comment"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Comment"); - Node label5138 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyLabelEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createReadSelfAction_3081(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ReadSelfActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadSelfAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadSelfAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadSelfAction"); - Node label5139 = createLabel(node, UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3084(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ReadSelfActionOutputPinEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5144 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionLabelEditPart.VISUAL_ID)); - label5144.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5144 = (Location) label5144.getLayoutConstraint(); - location5144.setX(0); - location5144.setY(5); - Node label5145 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID)); - label5145.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5145 = (Location) label5145.getLayoutConstraint(); - location5145.setX(0); - location5145.setY(5); - return node; - } - - /** - * @generated - */ - public Node createActivity_3083(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ActivityEditPartCN.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity"); - Node label5142 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID)); - Node label5143 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionCNEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID), false, false, true, true); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); - createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity"); - return node; - } - - /** - * @generated - */ - public Node createNamedElement_3085(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ShapeNamedElementEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ShapeNamedElement"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ShapeNamedElement"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ShapeNamedElement"); - Node label5129 = createLabel(node, UMLVisualIDRegistry.getType(ShapeNamedElementNameEditPart.VISUAL_ID)); - label5129.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5129 = (Location) label5129.getLayoutConstraint(); - location5129.setX(25); - location5129.setY(3); - return node; - } - - /** - * @generated - */ - public Node createCreateObjectAction_3086(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(CreateObjectActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CreateObjectAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CreateObjectAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CreateObjectAction"); - Node label5148 = createLabel(node, UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3087(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5146 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID)); - label5146.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5146 = (Location) label5146.getLayoutConstraint(); - location5146.setX(0); - location5146.setY(5); - Node label5147 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5147.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5147 = (Location) label5147.getLayoutConstraint(); - location5147.setX(0); - location5147.setY(5); - return node; - } - - /** - * @generated - */ - public Node createReadStructuralFeatureAction_3088(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadStructuralFeatureAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction"); - Node label5153 = createLabel(node, UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3089(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5149 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID)); - label5149.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5149 = (Location) label5149.getLayoutConstraint(); - location5149.setX(0); - location5149.setY(5); - Node label5150 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5150.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5150 = (Location) label5150.getLayoutConstraint(); - location5150.setX(0); - location5150.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3090(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5151 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID)); - label5151.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5151 = (Location) label5151.getLayoutConstraint(); - location5151.setX(0); - location5151.setY(5); - Node label5152 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID)); - label5152.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5152 = (Location) label5152.getLayoutConstraint(); - location5152.setX(0); - location5152.setY(5); - return node; - } - - /** - * @generated - */ - public Node createAddStructuralFeatureValueAction_3091(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddStructuralFeatureValueAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction"); - Node label5160 = createLabel(node, UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3092(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5154 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID)); - label5154.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5154 = (Location) label5154.getLayoutConstraint(); - location5154.setX(0); - location5154.setY(5); - Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5155.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5155 = (Location) label5155.getLayoutConstraint(); - location5155.setX(0); - location5155.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3093(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5156 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID)); - label5156.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5156 = (Location) label5156.getLayoutConstraint(); - location5156.setX(0); - location5156.setY(5); - Node label5157 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID)); - label5157.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5157 = (Location) label5157.getLayoutConstraint(); - location5157.setX(0); - location5157.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3094(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5158 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID)); - label5158.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5158 = (Location) label5158.getLayoutConstraint(); - location5158.setX(0); - location5158.setY(5); - Node label5159 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID)); - label5159.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5159 = (Location) label5159.getLayoutConstraint(); - location5159.setX(0); - location5159.setY(5); - return node; - } - - /** - * @generated - */ - public Node createDestroyObjectAction_3095(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(DestroyObjectActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DestroyObjectAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DestroyObjectAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DestroyObjectAction"); - Node label5163 = createLabel(node, UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3096(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID)); - label5161.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5161 = (Location) label5161.getLayoutConstraint(); - location5161.setX(0); - location5161.setY(5); - Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5162.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5162 = (Location) label5162.getLayoutConstraint(); - location5162.setX(0); - location5162.setY(5); - return node; - } - - /** - * @generated - */ - public Node createReadVariableAction_3097(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ReadVariableActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadVariableAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadVariableAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadVariableAction"); - Node label5166 = createLabel(node, UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3098(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5164 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID)); - label5164.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5164 = (Location) label5164.getLayoutConstraint(); - location5164.setX(0); - location5164.setY(5); - Node label5165 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5165.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5165 = (Location) label5165.getLayoutConstraint(); - location5165.setX(0); - location5165.setY(5); - return node; - } - - /** - * @generated - */ - public Node createAddVariableValueAction_3099(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(AddVariableValueActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddVariableValueAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddVariableValueAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddVariableValueAction"); - Node label5171 = createLabel(node, UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3100(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5167 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID)); - label5167.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5167 = (Location) label5167.getLayoutConstraint(); - location5167.setX(0); - location5167.setY(5); - Node label5168 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5168.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5168 = (Location) label5168.getLayoutConstraint(); - location5168.setX(0); - location5168.setY(5); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3101(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5169 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID)); - label5169.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5169 = (Location) label5169.getLayoutConstraint(); - location5169.setX(0); - location5169.setY(5); - Node label5170 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5170.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5170 = (Location) label5170.getLayoutConstraint(); - location5170.setX(0); - location5170.setY(5); - return node; - } - - /** - * @generated - */ - public Node createBroadcastSignalAction_3102(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(BroadcastSignalActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "BroadcastSignalAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "BroadcastSignalAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "BroadcastSignalAction"); - Node label5175 = createLabel(node, UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createInputPin_3103(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); - Node label5172 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID)); - label5172.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5172 = (Location) label5172.getLayoutConstraint(); - location5172.setX(0); - location5172.setY(5); - Node label5173 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID)); - label5173.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5173 = (Location) label5173.getLayoutConstraint(); - location5173.setX(0); - location5173.setY(5); - Node label5174 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); - label5174.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5174 = (Location) label5174.getLayoutConstraint(); - location5174.setX(0); - location5174.setY(5); - return node; - } - - /** - * @generated - */ - public Node createCentralBufferNode_3104(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(CentralBufferNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CentralBufferNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CentralBufferNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CentralBufferNode"); - Node label5176 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID)); - Node label5177 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeSelectionEditPart.VISUAL_ID)); - label5177.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5177 = (Location) label5177.getLayoutConstraint(); - location5177.setX(0); - location5177.setY(5); - return node; - } - - /** - * @generated - */ - public Node createConstraint_3112(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint"); - Node label5189 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID)); - Node label5190 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPartCN.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createValueSpecificationAction_3076(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ValueSpecificationActionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValueSpecificationAction"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValueSpecificationAction"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValueSpecificationAction"); - Node label5126 = createLabel(node, UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3077(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInValSpecActEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5124 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActLabelEditPart.VISUAL_ID)); - label5124.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5124 = (Location) label5124.getLayoutConstraint(); - location5124.setX(0); - location5124.setY(5); - Node label5125 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID)); - label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5125 = (Location) label5125.getLayoutConstraint(); - location5125.setX(0); - location5125.setY(5); - return node; - } - - /** - * @generated - */ - public Node createDataStoreNode_3078(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(DataStoreNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DataStoreNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataStoreNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DataStoreNode"); - Node label5127 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID)); - Node label5128 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreSelectionEditPart.VISUAL_ID)); - label5128.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5128 = (Location) label5128.getLayoutConstraint(); - location5128.setX(0); - location5128.setY(5); - return node; - } - - /** - * @generated - */ - public Node createConditionalNode_3069(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ConditionalNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ConditionalNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ConditionalNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ConditionalNode"); - Node label5119 = createLabel(node, UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ConditionalNode"); - return node; - } - - /** - * @generated - */ - public Node createExpansionRegion_3070(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ExpansionRegionEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionRegion"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionRegion"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionRegion"); - Node label5120 = createLabel(node, UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExpansionRegion"); - return node; - } - - /** - * @generated - */ - public Node createExpansionNode_3074(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsInEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode"); - return node; - } - - /** - * @generated - */ - public Node createExpansionNode_3075(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsOutEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode"); - return node; - } - - /** - * @generated - */ - public Node createLoopNode_3071(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(LoopNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "LoopNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LoopNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "LoopNode"); - Node label5121 = createLabel(node, UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "LoopNode"); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3109(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5184 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID)); - label5184.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5184 = (Location) label5184.getLayoutConstraint(); - location5184.setX(0); - location5184.setY(5); - Node label5185 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID)); - label5185.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5185 = (Location) label5185.getLayoutConstraint(); - location5185.setX(0); - location5185.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3110(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5186 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID)); - label5186.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5186 = (Location) label5186.getLayoutConstraint(); - location5186.setX(0); - location5186.setY(5); - Node label5183 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID)); - label5183.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5183 = (Location) label5183.getLayoutConstraint(); - location5183.setX(0); - location5183.setY(5); - return node; - } - - /** - * @generated - */ - public Node createOutputPin_3111(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); - Node label5187 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID)); - label5187.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5187 = (Location) label5187.getLayoutConstraint(); - location5187.setX(0); - location5187.setY(5); - Node label5188 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID)); - label5188.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location5188 = (Location) label5188.getLayoutConstraint(); - location5188.setX(0); - location5188.setY(5); - return node; - } - - /** - * @generated - */ - public Node createSequenceNode_3073(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(SequenceNodeEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SequenceNode"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SequenceNode"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SequenceNode"); - Node label5123 = createLabel(node, UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID)); - createCompartment(node, UMLVisualIDRegistry.getType(SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); - PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "SequenceNode"); - return node; - } - - /** - * @generated - */ - public Node createIntervalConstraint_3032(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint"); - Node label5036 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); - Node label5134 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createIntervalConstraint_3033(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint"); - Node label5037 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); - Node label5135 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createDurationConstraint_3034(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint"); - Node label5038 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); - Node label5130 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createDurationConstraint_3035(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint"); - Node label5039 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); - Node label5131 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createTimeConstraint_3036(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint"); - Node label5040 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); - Node label5132 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Node createTimeConstraint_3037(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Shape node = NotationFactory.eINSTANCE.createShape(); - node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); - node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondEditPart.VISUAL_ID)); - ViewUtil.insertChildView(containerView, node, index, persisted); - node.setElement(domainElement); - // initializeFromPreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint"); - PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint"); - Node label5041 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); - Node label5133 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); - return node; - } - - /** - * @generated - */ - public Edge createActionLocalPrecondition_4001(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Edge edge = NotationFactory.eINSTANCE.createEdge(); - edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(ActionLocalPreconditionEditPart.VISUAL_ID)); - edge.setElement(null); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); - return edge; - } - - /** - * @generated - */ - public Edge createActionLocalPostcondition_4002(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Edge edge = NotationFactory.eINSTANCE.createEdge(); - edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(ActionLocalPostconditionEditPart.VISUAL_ID)); - edge.setElement(null); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); - return edge; - } - - /** - * @generated - */ - public Edge createObjectFlow_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Connector edge = NotationFactory.eINSTANCE.createConnector(); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(ObjectFlowEditPart.VISUAL_ID)); - edge.setElement(domainElement); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ObjectFlow"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ObjectFlow"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ObjectFlow"); - Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowNameEditPart.VISUAL_ID)); - label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6001 = (Location) label6001.getLayoutConstraint(); - location6001.setX(0); - location6001.setY(20); - Node label6002 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowWeightEditPart.VISUAL_ID)); - label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6002 = (Location) label6002.getLayoutConstraint(); - location6002.setX(0); - location6002.setY(20); - Node label6005 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowSelectionEditPart.VISUAL_ID)); - label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6005 = (Location) label6005.getLayoutConstraint(); - location6005.setX(20); - location6005.setY(40); - Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowTransformationEditPart.VISUAL_ID)); - label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6006 = (Location) label6006.getLayoutConstraint(); - location6006.setX(-20); - location6006.setY(-60); - Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(DecisionInputFlowEditPart.VISUAL_ID)); - label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6007 = (Location) label6007.getLayoutConstraint(); - location6007.setX(0); - location6007.setY(-20); - Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowGuardEditPart.VISUAL_ID)); - label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6008 = (Location) label6008.getLayoutConstraint(); - location6008.setX(0); - location6008.setY(20); - Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowAppliedStereotypeEditPart.VISUAL_ID)); - label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6010 = (Location) label6010.getLayoutConstraint(); - location6010.setX(0); - location6010.setY(-20); - Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowInterruptibleIconEditPart.VISUAL_ID)); - label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ObjectFlow"); - return edge; - } - - /** - * @generated - */ - public Edge createControlFlow_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Connector edge = NotationFactory.eINSTANCE.createConnector(); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(ControlFlowEditPart.VISUAL_ID)); - edge.setElement(domainElement); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ControlFlow"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ControlFlow"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ControlFlow"); - Node label6003 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowNameEditPart.VISUAL_ID)); - label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6003 = (Location) label6003.getLayoutConstraint(); - location6003.setX(0); - location6003.setY(20); - Node label6004 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowWeightEditPart.VISUAL_ID)); - label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6004 = (Location) label6004.getLayoutConstraint(); - location6004.setX(0); - location6004.setY(20); - Node label6009 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowGuardEditPart.VISUAL_ID)); - label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6009 = (Location) label6009.getLayoutConstraint(); - location6009.setX(0); - location6009.setY(20); - Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowAppliedStereotypeEditPart.VISUAL_ID)); - label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6011 = (Location) label6011.getLayoutConstraint(); - location6011.setX(0); - location6011.setY(-20); - Node label6013 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowInterruptibleIconEditPart.VISUAL_ID)); - label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ControlFlow"); - return edge; - } - - /** - * @generated - */ - public Edge createExceptionHandler_4005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Connector edge = NotationFactory.eINSTANCE.createConnector(); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(ExceptionHandlerEditPart.VISUAL_ID)); - edge.setElement(domainElement); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ExceptionHandler"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ExceptionHandler"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ExceptionHandler"); - Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerTypeEditPart.VISUAL_ID)); - label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - Location location6012 = (Location) label6012.getLayoutConstraint(); - location6012.setX(0); - location6012.setY(40); - Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerIconEditPart.VISUAL_ID)); - label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); - return edge; - } - - /** - * @generated - */ - public Edge createCommentAnnotatedElement_4006(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Connector edge = NotationFactory.eINSTANCE.createConnector(); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(CommentLinkEditPart.VISUAL_ID)); - edge.setElement(null); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); - return edge; - } - - /** - * @generated - */ - public Edge createConstraintConstrainedElement_4007(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { - Connector edge = NotationFactory.eINSTANCE.createConnector(); - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - ArrayList points = new ArrayList(2); - points.add(new RelativeBendpoint()); - points.add(new RelativeBendpoint()); - bendpoints.setPoints(points); - edge.setBendpoints(bendpoints); - ViewUtil.insertChildView(containerView, edge, index, persisted); - edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID)); - edge.setElement(null); - // initializePreferences - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); - PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined"); - PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); - // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); - // if (routing != null) { - // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); - // } - PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); - return edge; - } - - /** - * @generated - */ - protected void stampShortcut(View containerView, Node target) { - if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { - EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); - shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ - shortcutAnnotation.getDetails().put("modelID", ActivityDiagramEditPart.MODEL_ID); //$NON-NLS-1$ - target.getEAnnotations().add(shortcutAnnotation); - } - } - - /** - * @generated - */ - protected Node createLabel(View owner, String hint) { - DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode(); - rv.setType(hint); - ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); - return rv; - } - - /** - * @generated - */ - protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) { - // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment(); - // rv.setShowTitle(showTitle); - // rv.setCollapsed(isCollapsed); - Node rv; - if (canCollapse) { - rv = NotationFactory.eINSTANCE.createBasicCompartment(); - } else { - rv = NotationFactory.eINSTANCE.createDecorationNode(); - } - rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); - if (hasTitle) { - TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle(); - rv.getStyles().add(ts); - } - if (canSort) { - rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle()); - } - if (canFilter) { - rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle()); - } - rv.setType(hint); - ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); - return rv; - } - - /** - * @generated - */ - protected EObject getSemanticElement(IAdaptable semanticAdapter) { - if (semanticAdapter == null) { - return null; - } - EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class); - if (eObject != null) { - return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject); - } - return null; - } - - /** - * @generated - */ - protected IElementType getSemanticElementType(IAdaptable semanticAdapter) { - if (semanticAdapter == null) { - return null; - } - return (IElementType) semanticAdapter.getAdapter(IElementType.class); - } - - /** - * @generated - */ - private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) { - String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT); - String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT); - FontStyle viewFontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE); - if (viewFontStyle != null) { - FontData fontData = PreferenceConverter.getFontData(store, fontConstant); - viewFontStyle.setFontName(fontData.getName()); - viewFontStyle.setFontHeight(fontData.getHeight()); - viewFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); - viewFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); - org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(store, fontColorConstant); - viewFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue()); - } - } - - /** - * @generated - */ - private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) { - String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE); - org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant); - ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); - } - - /** - * @generated - */ - private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) { - String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL); - String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT); - String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY); - org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant); - ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); - FillStyle fillStyle = (FillStyle) view.getStyle(NotationPackage.Literals.FILL_STYLE); - fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue()); - ; - if (store.getBoolean(gradientPolicyConstant)) { - GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant)); - fillStyle.setGradient(gradientPreferenceConverter.getGradientData()); - fillStyle.setTransparency(gradientPreferenceConverter.getTransparency()); - } - } -} +/***************************************************************************** + * Copyright (c) 2009 Atos Origin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Atos Origin - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.activity.providers; + +import java.util.ArrayList; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; +import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; +import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider; +import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation; +import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation; +import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; +import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation; +import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation; +import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; +import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; +import org.eclipse.gmf.runtime.notation.Bounds; +import org.eclipse.gmf.runtime.notation.Connector; +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.FillStyle; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.MeasurementUnit; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.RelativeBendpoints; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.TitleStyle; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; +import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils; +import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; +import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils; +import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; +import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*; +import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator; +import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.uml2.uml.ActionInputPin; +import org.eclipse.uml2.uml.CallBehaviorAction; +import org.eclipse.uml2.uml.CallOperationAction; +import org.eclipse.uml2.uml.InputPin; +import org.eclipse.uml2.uml.OpaqueAction; +import org.eclipse.uml2.uml.OutputPin; +import org.eclipse.uml2.uml.ValuePin; + +/** + * @generated + */ +public class UMLViewProvider extends AbstractProvider implements IViewProvider { + + /** + * @generated + */ + @Override + public final boolean provides(IOperation operation) { + if (operation instanceof CreateViewForKindOperation) { + return provides((CreateViewForKindOperation) operation); + } + assert operation instanceof CreateViewOperation; + if (operation instanceof CreateDiagramViewOperation) { + return provides((CreateDiagramViewOperation) operation); + } else if (operation instanceof CreateEdgeViewOperation) { + return provides((CreateEdgeViewOperation) operation); + } else if (operation instanceof CreateNodeViewOperation) { + return provides((CreateNodeViewOperation) operation); + } + return false; + } + + /** + * @generated + */ + protected boolean provides(CreateViewForKindOperation op) { + /* + * if (op.getViewKind() == Node.class) + * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null; + * if (op.getViewKind() == Edge.class) + * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null; + */ + // check Diagram Type should be the class diagram + String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView()); + if (!getDiagramProvidedId().equals(modelID)) { + return false; + } + int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint()); + if (Node.class.isAssignableFrom(op.getViewKind())) { + return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID); + } + return true; + } + + /** + * Indicates for which diagram this provider works for. + *

+ * This method can be overloaded when diagram editor inherits from another one + *

+ * + * @return the unique identifier of the diagram for which views are provided. + */ + protected String getDiagramProvidedId() { + return ActivityDiagramEditPart.MODEL_ID; + } + + /** + * @generated + */ + protected boolean provides(CreateDiagramViewOperation op) { + return ActivityDiagramEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1; + } + + /** + * @generated + */ + protected boolean provides(CreateNodeViewOperation op) { + if (op.getContainerView() == null) { + return false; + } + IElementType elementType = getSemanticElementType(op.getSemanticAdapter()); + EObject domainElement = getSemanticElement(op.getSemanticAdapter()); + int visualID; + if (op.getSemanticHint() == null) { + // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy. + // In this situation there should be NO elementType, visualID will be determined + // by VisualIDRegistry.getNodeVisualID() for domainElement. + if (elementType != null || domainElement == null) { + return false; + } + visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement); + } else { + visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint()); + if (elementType != null) { + if (elementType instanceof IExtendedHintedElementType) { + IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType); + if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) { + return false; // foreign element type. + } + } else { + if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { + return false; // foreign element type + } + } + String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); + if (!op.getSemanticHint().equals(elementTypeHint)) { + return false; // if semantic hint is specified it should be the same as in element type + } + if (domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) { + return false; // visual id for node EClass should match visual id from element type + } + } else { + if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) { + return false; // foreign diagram + } + switch (visualID) { + case ActivityEditPart.VISUAL_ID: + case ParameterEditPart.VISUAL_ID: + case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: + case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: + case InitialNodeEditPart.VISUAL_ID: + case ActivityFinalNodeEditPart.VISUAL_ID: + case FlowFinalNodeEditPart.VISUAL_ID: + case OpaqueActionEditPart.VISUAL_ID: + case ValuePinInOpaqueActEditPart.VISUAL_ID: + case ActionInputPinInOpaqueActEditPart.VISUAL_ID: + case InputPinInOpaqueActEditPart.VISUAL_ID: + case OutputPinInOpaqueActEditPart.VISUAL_ID: + case CallBehaviorActionEditPart.VISUAL_ID: + case ValuePinInCallBeActEditPart.VISUAL_ID: + case ActionInputPinInCallBeActEditPart.VISUAL_ID: + case InputPinInCallBeActEditPart.VISUAL_ID: + case OutputPinInCallBeActEditPart.VISUAL_ID: + case CallOperationActionEditPart.VISUAL_ID: + case ActionInputPinInCallOpActEditPart.VISUAL_ID: + case ValuePinInCallOpActEditPart.VISUAL_ID: + case InputPinInCallOpActEditPart.VISUAL_ID: + case OutputPinInCallOpActEditPart.VISUAL_ID: + case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: + case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: + case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: + case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: + case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: + case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: + case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: + case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: + case ConstraintAsLocalPrecondEditPart.VISUAL_ID: + case ConstraintAsLocalPostcondEditPart.VISUAL_ID: + case DecisionNodeEditPart.VISUAL_ID: + case MergeNodeEditPart.VISUAL_ID: + case ForkNodeEditPart.VISUAL_ID: + case JoinNodeEditPart.VISUAL_ID: + case DataStoreNodeEditPart.VISUAL_ID: + case SendObjectActionEditPart.VISUAL_ID: + case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: + case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: + case InputPinInSendObjActAsReqEditPart.VISUAL_ID: + case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: + case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: + case SendSignalActionEditPart.VISUAL_ID: + case ActionInputPinInSendSigActEditPart.VISUAL_ID: + case ValuePinInSendSigActEditPart.VISUAL_ID: + case InputPinInSendSigActEditPart.VISUAL_ID: + case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: + case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: + case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: + case ActivityParameterNodeEditPart.VISUAL_ID: + case AcceptEventActionEditPart.VISUAL_ID: + case OutputPinInAcceptEventActionEditPart.VISUAL_ID: + case ValueSpecificationActionEditPart.VISUAL_ID: + case OutputPinInValSpecActEditPart.VISUAL_ID: + case ConditionalNodeEditPart.VISUAL_ID: + case ExpansionRegionEditPart.VISUAL_ID: + case ExpansionNodeAsInEditPart.VISUAL_ID: + case ExpansionNodeAsOutEditPart.VISUAL_ID: + case LoopNodeEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: + case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: + case SequenceNodeEditPart.VISUAL_ID: + case StructuredActivityNodeEditPart.VISUAL_ID: + case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: + case ActivityPartitionEditPart.VISUAL_ID: + case InterruptibleActivityRegionEditPart.VISUAL_ID: + case CommentEditPartCN.VISUAL_ID: + case ReadSelfActionEditPart.VISUAL_ID: + case ReadSelfActionOutputPinEditPart.VISUAL_ID: + case ActivityEditPartCN.VISUAL_ID: + case CreateObjectActionEditPart.VISUAL_ID: + case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: + case ShapeNamedElementEditPart.VISUAL_ID: + case ReadStructuralFeatureActionEditPart.VISUAL_ID: + case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: + case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: + case AddStructuralFeatureValueActionEditPart.VISUAL_ID: + case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: + case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: + case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: + case DestroyObjectActionEditPart.VISUAL_ID: + case InputPinInDestroyObjectActionEditPart.VISUAL_ID: + case ReadVariableActionEditPart.VISUAL_ID: + case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: + case AddVariableValueActionEditPart.VISUAL_ID: + case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: + case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: + case BroadcastSignalActionEditPart.VISUAL_ID: + case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: + case CentralBufferNodeEditPart.VISUAL_ID: + case ConstraintEditPartCN.VISUAL_ID: + if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) { + return false; // visual id in semantic hint should match visual id for domain element + } + break; + default: + return false; + } + } + } + return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID); + } + + /** + * @generated + */ + protected boolean provides(CreateEdgeViewOperation op) { + IElementType elementType = getSemanticElementType(op.getSemanticAdapter()); + // RS: add code for extended types creation + if (elementType instanceof IExtendedHintedElementType) { + IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType); + if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) { + return false; // foreign element type. + } + } else { + if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { + return false; // foreign element type + } + } + // if (!org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) { + // return false; // foreign element type + // } + // END R.S. + String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); + if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) { + return false; // our hint is visual id and must be specified, and it should be the same as in element type + } + int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint); + EObject domainElement = getSemanticElement(op.getSemanticAdapter()); + if (domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) { + return false; // visual id for link EClass should match visual id from element type + } + return true; + } + + /** + * @generated + */ + @Override + public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) { + Diagram diagram = NotationFactory.eINSTANCE.createDiagram(); + DiagramVersioningUtils.stampCurrentVersion(diagram); + diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle()); + diagram.setType(ActivityDiagramEditPart.MODEL_ID); + diagram.setElement(getSemanticElement(semanticAdapter)); + diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL); + return diagram; + } + + /** + * @generated + */ + @Override + public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { + final EObject domainElement = getSemanticElement(semanticAdapter); + final int visualID; + if (semanticHint == null) { + visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement); + } else { + visualID = UMLVisualIDRegistry.getVisualID(semanticHint); + } + switch (visualID) { + case ActivityEditPart.VISUAL_ID: + return createActivity_2001(domainElement, containerView, index, persisted, preferencesHint); + case ParameterEditPart.VISUAL_ID: + return createParameter_3001(domainElement, containerView, index, persisted, preferencesHint); + case ConstraintInActivityAsPrecondEditPart.VISUAL_ID: + return createConstraint_3002(domainElement, containerView, index, persisted, preferencesHint); + case ConstraintInActivityAsPostcondEditPart.VISUAL_ID: + return createConstraint_3003(domainElement, containerView, index, persisted, preferencesHint); + case InitialNodeEditPart.VISUAL_ID: + return createInitialNode_3004(domainElement, containerView, index, persisted, preferencesHint); + case ActivityFinalNodeEditPart.VISUAL_ID: + return createActivityFinalNode_3005(domainElement, containerView, index, persisted, preferencesHint); + case FlowFinalNodeEditPart.VISUAL_ID: + return createFlowFinalNode_3006(domainElement, containerView, index, persisted, preferencesHint); + case OpaqueActionEditPart.VISUAL_ID: + return createOpaqueAction_3007(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInOpaqueActEditPart.VISUAL_ID: + return createValuePin_3015(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInOpaqueActEditPart.VISUAL_ID: + return createActionInputPin_3016(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInOpaqueActEditPart.VISUAL_ID: + return createInputPin_3013(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInOpaqueActEditPart.VISUAL_ID: + return createOutputPin_3014(domainElement, containerView, index, persisted, preferencesHint); + case CallBehaviorActionEditPart.VISUAL_ID: + return createCallBehaviorAction_3008(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInCallBeActEditPart.VISUAL_ID: + return createValuePin_3017(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInCallBeActEditPart.VISUAL_ID: + return createActionInputPin_3018(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInCallBeActEditPart.VISUAL_ID: + return createInputPin_3019(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInCallBeActEditPart.VISUAL_ID: + return createOutputPin_3020(domainElement, containerView, index, persisted, preferencesHint); + case CallOperationActionEditPart.VISUAL_ID: + return createCallOperationAction_3010(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInCallOpActEditPart.VISUAL_ID: + return createActionInputPin_3021(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInCallOpActEditPart.VISUAL_ID: + return createValuePin_3022(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInCallOpActEditPart.VISUAL_ID: + return createInputPin_3023(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInCallOpActEditPart.VISUAL_ID: + return createOutputPin_3024(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID: + return createValuePin_3025(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID: + return createActionInputPin_3026(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInCallOpActAsTargetEditPart.VISUAL_ID: + return createInputPin_3027(domainElement, containerView, index, persisted, preferencesHint); + case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID: + return createDurationConstraint_3034(domainElement, containerView, index, persisted, preferencesHint); + case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID: + return createDurationConstraint_3035(domainElement, containerView, index, persisted, preferencesHint); + case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID: + return createTimeConstraint_3036(domainElement, containerView, index, persisted, preferencesHint); + case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID: + return createTimeConstraint_3037(domainElement, containerView, index, persisted, preferencesHint); + case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID: + return createIntervalConstraint_3032(domainElement, containerView, index, persisted, preferencesHint); + case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID: + return createIntervalConstraint_3033(domainElement, containerView, index, persisted, preferencesHint); + case ConstraintAsLocalPrecondEditPart.VISUAL_ID: + return createConstraint_3011(domainElement, containerView, index, persisted, preferencesHint); + case ConstraintAsLocalPostcondEditPart.VISUAL_ID: + return createConstraint_3012(domainElement, containerView, index, persisted, preferencesHint); + case DecisionNodeEditPart.VISUAL_ID: + return createDecisionNode_3038(domainElement, containerView, index, persisted, preferencesHint); + case MergeNodeEditPart.VISUAL_ID: + return createMergeNode_3039(domainElement, containerView, index, persisted, preferencesHint); + case ForkNodeEditPart.VISUAL_ID: + return createForkNode_3040(domainElement, containerView, index, persisted, preferencesHint); + case JoinNodeEditPart.VISUAL_ID: + return createJoinNode_3041(domainElement, containerView, index, persisted, preferencesHint); + case DataStoreNodeEditPart.VISUAL_ID: + return createDataStoreNode_3078(domainElement, containerView, index, persisted, preferencesHint); + case SendObjectActionEditPart.VISUAL_ID: + return createSendObjectAction_3042(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInSendObjActAsReqEditPart.VISUAL_ID: + return createValuePin_3046(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID: + return createActionInputPin_3047(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInSendObjActAsReqEditPart.VISUAL_ID: + return createInputPin_3048(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID: + return createValuePin_3049(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID: + return createActionInputPin_3050(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInSendObjActAsTargetEditPart.VISUAL_ID: + return createInputPin_3051(domainElement, containerView, index, persisted, preferencesHint); + case SendSignalActionEditPart.VISUAL_ID: + return createSendSignalAction_3052(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInSendSigActEditPart.VISUAL_ID: + return createActionInputPin_3053(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInSendSigActEditPart.VISUAL_ID: + return createValuePin_3054(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInSendSigActEditPart.VISUAL_ID: + return createInputPin_3055(domainElement, containerView, index, persisted, preferencesHint); + case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID: + return createValuePin_3060(domainElement, containerView, index, persisted, preferencesHint); + case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID: + return createActionInputPin_3061(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInSendSigActAsTargetEditPart.VISUAL_ID: + return createInputPin_3062(domainElement, containerView, index, persisted, preferencesHint); + case ActivityParameterNodeEditPart.VISUAL_ID: + return createActivityParameterNode_3059(domainElement, containerView, index, persisted, preferencesHint); + case AcceptEventActionEditPart.VISUAL_ID: + return createAcceptEventAction_3063(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInAcceptEventActionEditPart.VISUAL_ID: + return createOutputPin_3064(domainElement, containerView, index, persisted, preferencesHint); + case ValueSpecificationActionEditPart.VISUAL_ID: + return createValueSpecificationAction_3076(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInValSpecActEditPart.VISUAL_ID: + return createOutputPin_3077(domainElement, containerView, index, persisted, preferencesHint); + case ConditionalNodeEditPart.VISUAL_ID: + return createConditionalNode_3069(domainElement, containerView, index, persisted, preferencesHint); + case ExpansionRegionEditPart.VISUAL_ID: + return createExpansionRegion_3070(domainElement, containerView, index, persisted, preferencesHint); + case ExpansionNodeAsInEditPart.VISUAL_ID: + return createExpansionNode_3074(domainElement, containerView, index, persisted, preferencesHint); + case ExpansionNodeAsOutEditPart.VISUAL_ID: + return createExpansionNode_3075(domainElement, containerView, index, persisted, preferencesHint); + case LoopNodeEditPart.VISUAL_ID: + return createLoopNode_3071(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID: + return createOutputPin_3109(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID: + return createOutputPin_3110(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID: + return createOutputPin_3111(domainElement, containerView, index, persisted, preferencesHint); + case SequenceNodeEditPart.VISUAL_ID: + return createSequenceNode_3073(domainElement, containerView, index, persisted, preferencesHint); + case StructuredActivityNodeEditPart.VISUAL_ID: + return createStructuredActivityNode_3065(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID: + return createInputPin_3105(domainElement, containerView, index, persisted, preferencesHint); + case ActivityPartitionEditPart.VISUAL_ID: + return createActivityPartition_3067(domainElement, containerView, index, persisted, preferencesHint); + case InterruptibleActivityRegionEditPart.VISUAL_ID: + return createInterruptibleActivityRegion_3068(domainElement, containerView, index, persisted, preferencesHint); + case CommentEditPartCN.VISUAL_ID: + return createComment_3080(domainElement, containerView, index, persisted, preferencesHint); + case ReadSelfActionEditPart.VISUAL_ID: + return createReadSelfAction_3081(domainElement, containerView, index, persisted, preferencesHint); + case ReadSelfActionOutputPinEditPart.VISUAL_ID: + return createOutputPin_3084(domainElement, containerView, index, persisted, preferencesHint); + case ActivityEditPartCN.VISUAL_ID: + return createActivity_3083(domainElement, containerView, index, persisted, preferencesHint); + case CreateObjectActionEditPart.VISUAL_ID: + return createCreateObjectAction_3086(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID: + return createOutputPin_3087(domainElement, containerView, index, persisted, preferencesHint); + case ShapeNamedElementEditPart.VISUAL_ID: + return createNamedElement_3085(domainElement, containerView, index, persisted, preferencesHint); + case ReadStructuralFeatureActionEditPart.VISUAL_ID: + return createReadStructuralFeatureAction_3088(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID: + return createInputPin_3089(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID: + return createOutputPin_3090(domainElement, containerView, index, persisted, preferencesHint); + case AddStructuralFeatureValueActionEditPart.VISUAL_ID: + return createAddStructuralFeatureValueAction_3091(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID: + return createInputPin_3092(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID: + return createInputPin_3093(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID: + return createOutputPin_3094(domainElement, containerView, index, persisted, preferencesHint); + case DestroyObjectActionEditPart.VISUAL_ID: + return createDestroyObjectAction_3095(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInDestroyObjectActionEditPart.VISUAL_ID: + return createInputPin_3096(domainElement, containerView, index, persisted, preferencesHint); + case ReadVariableActionEditPart.VISUAL_ID: + return createReadVariableAction_3097(domainElement, containerView, index, persisted, preferencesHint); + case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID: + return createOutputPin_3098(domainElement, containerView, index, persisted, preferencesHint); + case AddVariableValueActionEditPart.VISUAL_ID: + return createAddVariableValueAction_3099(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID: + return createInputPin_3100(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID: + return createInputPin_3101(domainElement, containerView, index, persisted, preferencesHint); + case BroadcastSignalActionEditPart.VISUAL_ID: + return createBroadcastSignalAction_3102(domainElement, containerView, index, persisted, preferencesHint); + case InputPinInBroadcastSignalActionEditPart.VISUAL_ID: + return createInputPin_3103(domainElement, containerView, index, persisted, preferencesHint); + case CentralBufferNodeEditPart.VISUAL_ID: + return createCentralBufferNode_3104(domainElement, containerView, index, persisted, preferencesHint); + case ConstraintEditPartCN.VISUAL_ID: + return createConstraint_3112(domainElement, containerView, index, persisted, preferencesHint); + } + // can't happen, provided #provides(CreateNodeViewOperation) is correct + return null; + } + + /** + * @generated + */ + @Override + public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { + IElementType elementType = getSemanticElementType(semanticAdapter); + String elementTypeHint = ((IHintedType) elementType).getSemanticHint(); + switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) { + case ActionLocalPreconditionEditPart.VISUAL_ID: + return createActionLocalPrecondition_4001(containerView, index, persisted, preferencesHint); + case ActionLocalPostconditionEditPart.VISUAL_ID: + return createActionLocalPostcondition_4002(containerView, index, persisted, preferencesHint); + case ObjectFlowEditPart.VISUAL_ID: + return createObjectFlow_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); + case ControlFlowEditPart.VISUAL_ID: + return createControlFlow_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); + case ExceptionHandlerEditPart.VISUAL_ID: + return createExceptionHandler_4005(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint); + case CommentLinkEditPart.VISUAL_ID: + return createCommentAnnotatedElement_4006(containerView, index, persisted, preferencesHint); + case ConstraintConstrainedElementEditPart.VISUAL_ID: + return createConstraintConstrainedElement_4007(containerView, index, persisted, preferencesHint); + } + // can never happen, provided #provides(CreateEdgeViewOperation) is correct + return null; + } + + /** + * @generated + */ + public Node createActivity_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActivityEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + stampShortcut(containerView, node); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity"); + Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID)); + Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID), false, false, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity"); + return node; + } + + /** + * @generated + */ + public Node createParameter_3001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Node node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + node.setType(UMLVisualIDRegistry.getType(ParameterEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Parameter"); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Parameter"); + return node; + } + + /** + * @generated + */ + public Node createConstraint_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Node node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPrecondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); + return node; + } + + /** + * @generated + */ + public Node createConstraint_3003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Node node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPostcondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); + return node; + } + + /** + * @generated + */ + public Node createInitialNode_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InitialNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InitialNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InitialNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InitialNode"); + Node label5080 = createLabel(node, UMLVisualIDRegistry.getType(InitialNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5080.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5080 = (Location) label5080.getLayoutConstraint(); + location5080.setX(0); + location5080.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActivityFinalNode_3005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActivityFinalNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityFinalNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityFinalNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityFinalNode"); + Node label5081 = createLabel(node, UMLVisualIDRegistry.getType(ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5081.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5081 = (Location) label5081.getLayoutConstraint(); + location5081.setX(0); + location5081.setY(5); + return node; + } + + /** + * @generated + */ + public Node createFlowFinalNode_3006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(FlowFinalNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "FlowFinalNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FlowFinalNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "FlowFinalNode"); + Node label5082 = createLabel(node, UMLVisualIDRegistry.getType(FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5082.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5082 = (Location) label5082.getLayoutConstraint(); + location5082.setX(0); + location5082.setY(5); + return node; + } + + /** + * @generated NOT addition of pins initialization and height adaptation to pins + */ + public Node createOpaqueAction_3007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + // adapt the height to contained pins + Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds(); + PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement); + node.setLayoutConstraint(boundsConstraint); + node.setType(UMLVisualIDRegistry.getType(OpaqueActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OpaqueAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OpaqueAction"); + Node label5003 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6028 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueActionFloatingNameEditPart.VISUAL_ID)); + label6028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6028 = (Location) label6028.getLayoutConstraint(); + location6028.setX(0); + location6028.setY(5); + + // Add pins + createPins(domainElement, node, persisted, preferencesHint); + return node; + } + + /** + * @generated + */ + public Node createValuePin_3015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInOpaqueActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5011 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActLabelEditPart.VISUAL_ID)); + label5011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5011 = (Location) label5011.getLayoutConstraint(); + location5011.setX(0); + location5011.setY(5); + Node label5024 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActValueEditPart.VISUAL_ID)); + label5024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5024 = (Location) label5024.getLayoutConstraint(); + location5024.setX(0); + location5024.setY(5); + Node label5083 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID)); + label5083.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5083 = (Location) label5083.getLayoutConstraint(); + location5083.setX(0); + location5083.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInOpaqueActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5012 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActLabelEditPart.VISUAL_ID)); + label5012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5012 = (Location) label5012.getLayoutConstraint(); + location5012.setX(0); + location5012.setY(5); + Node label5025 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActValueEditPart.VISUAL_ID)); + label5025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5025 = (Location) label5025.getLayoutConstraint(); + location5025.setX(0); + location5025.setY(5); + Node label5084 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID)); + label5084.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5084 = (Location) label5084.getLayoutConstraint(); + location5084.setX(0); + location5084.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInOpaqueActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5009 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActLabelEditPart.VISUAL_ID)); + label5009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5009 = (Location) label5009.getLayoutConstraint(); + location5009.setX(0); + location5009.setY(5); + Node label5085 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActAppliedStereotypeEditPart.VISUAL_ID)); + label5085.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5085 = (Location) label5085.getLayoutConstraint(); + location5085.setX(0); + location5085.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInOpaqueActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5010 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActLabelEditPart.VISUAL_ID)); + label5010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5010 = (Location) label5010.getLayoutConstraint(); + location5010.setX(0); + location5010.setY(5); + Node label5086 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID)); + label5086.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5086 = (Location) label5086.getLayoutConstraint(); + location5086.setX(0); + location5086.setY(5); + return node; + } + + /** + * @generated NOT addition of pins initialization and height adaptation to pins + */ + public Node createCallBehaviorAction_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + // adapt the height to contained pins + Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds(); + PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement); + node.setLayoutConstraint(boundsConstraint); + node.setType(UMLVisualIDRegistry.getType(CallBehaviorActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallBehaviorAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallBehaviorAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallBehaviorAction"); + Node label5004 = createLabel(node, UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID)); + + // not generated but change include on gmfgen, can be override at the generation + Node label6020 = createLabel(node, UMLVisualIDRegistry.getType(CallBehaviorActionFloatingNameEditPart.VISUAL_ID)); + label6020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6020 = (Location) label6020.getLayoutConstraint(); + location6020.setX(0); + location6020.setY(5); + + // Add pins + createPins(domainElement, node, persisted, preferencesHint); + return node; + } + + /** + * Create pins in an action's node + * + * @param domainElement + * the model action + * @param node + * the action node + * @param persisted + * the persisted property of views to create + * @param preferencesHint + * the preference hint + * @generated NOT + */ + private void createPins(EObject domainElement, Shape node, boolean persisted, PreferencesHint preferencesHint) { + if (domainElement instanceof OpaqueAction) { + // pins of an opaque action : input values and output values + int index = 0; + for (InputPin pin : ((OpaqueAction) domainElement).getInputValues()) { + if (pin instanceof ValuePin) { + createValuePin_3015(pin, node, index, persisted, preferencesHint); + } else if (pin instanceof ActionInputPin) { + createActionInputPin_3016(pin, node, index, persisted, preferencesHint); + } else { + createInputPin_3013(pin, node, index, persisted, preferencesHint); + } + index++; + } + index = 0; + for (OutputPin pin : ((OpaqueAction) domainElement).getOutputValues()) { + createOutputPin_3014(pin, node, index, persisted, preferencesHint); + } + } else if (domainElement instanceof CallBehaviorAction) { + // pins of a call behavior action : arguments and results + int index = 0; + for (InputPin pin : ((CallBehaviorAction) domainElement).getArguments()) { + if (pin instanceof ValuePin) { + createValuePin_3017(pin, node, index, persisted, preferencesHint); + } else if (pin instanceof ActionInputPin) { + createActionInputPin_3018(pin, node, index, persisted, preferencesHint); + } else { + createInputPin_3019(pin, node, index, persisted, preferencesHint); + } + index++; + } + index = 0; + for (OutputPin pin : ((CallBehaviorAction) domainElement).getResults()) { + createOutputPin_3020(pin, node, index, persisted, preferencesHint); + } + } else if (domainElement instanceof CallOperationAction) { + // pins of a call operation action : arguments, target and results + int index = 0; + for (InputPin pin : ((CallOperationAction) domainElement).getArguments()) { + if (pin instanceof ValuePin) { + createValuePin_3022(pin, node, index, persisted, preferencesHint); + } else if (pin instanceof ActionInputPin) { + createActionInputPin_3021(pin, node, index, persisted, preferencesHint); + } else { + createInputPin_3023(pin, node, index, persisted, preferencesHint); + } + index++; + } + InputPin target = ((CallOperationAction) domainElement).getTarget(); + if (target instanceof ValuePin) { + createValuePin_3025(target, node, index, persisted, preferencesHint); + } else if (target instanceof ActionInputPin) { + createActionInputPin_3026(target, node, index, persisted, preferencesHint); + } else if (target != null) { + createInputPin_3027(target, node, index, persisted, preferencesHint); + } + index = 0; + for (OutputPin pin : ((CallOperationAction) domainElement).getResults()) { + createOutputPin_3024(pin, node, index, persisted, preferencesHint); + } + } + } + + /** + * @generated + */ + public Node createValuePin_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInCallBeActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5013 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActLabelEditPart.VISUAL_ID)); + label5013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5013 = (Location) label5013.getLayoutConstraint(); + location5013.setX(0); + location5013.setY(5); + Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActValueEditPart.VISUAL_ID)); + label5026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5026 = (Location) label5026.getLayoutConstraint(); + location5026.setX(0); + location5026.setY(5); + Node label5087 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID)); + label5087.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5087 = (Location) label5087.getLayoutConstraint(); + location5087.setX(0); + location5087.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallBeActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActLabelEditPart.VISUAL_ID)); + label5014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5014 = (Location) label5014.getLayoutConstraint(); + location5014.setX(0); + location5014.setY(5); + Node label5027 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActValueEditPart.VISUAL_ID)); + label5027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5027 = (Location) label5027.getLayoutConstraint(); + location5027.setX(0); + location5027.setY(5); + Node label5088 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID)); + label5088.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5088 = (Location) label5088.getLayoutConstraint(); + location5088.setX(0); + location5088.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInCallBeActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5015 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActLabelEditPart.VISUAL_ID)); + label5015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5015 = (Location) label5015.getLayoutConstraint(); + location5015.setX(0); + location5015.setY(5); + Node label5089 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID)); + label5089.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5089 = (Location) label5089.getLayoutConstraint(); + location5089.setX(0); + location5089.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInCallBeActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5016 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActLabelEditPart.VISUAL_ID)); + label5016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5016 = (Location) label5016.getLayoutConstraint(); + location5016.setX(0); + location5016.setY(5); + Node label5090 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID)); + label5090.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5090 = (Location) label5090.getLayoutConstraint(); + location5090.setX(0); + location5090.setY(5); + return node; + } + + /** + * @generated NOT addition of pins initialization and height adaptation to pins + */ + public Node createCallOperationAction_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + // adapt the height to contained pins + Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds(); + PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement); + node.setLayoutConstraint(boundsConstraint); + node.setType(UMLVisualIDRegistry.getType(CallOperationActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallOperationAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallOperationAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallOperationAction"); + Node label5006 = createLabel(node, UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6020 = createLabel(node, UMLVisualIDRegistry.getType(CallOperationActionFloatingNameEditPart.VISUAL_ID)); + label6020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6020 = (Location) label6020.getLayoutConstraint(); + location6020.setX(0); + location6020.setY(5); + + // Add pins + createPins(domainElement, node, persisted, preferencesHint); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3021(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5017 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActLabelEditPart.VISUAL_ID)); + label5017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5017 = (Location) label5017.getLayoutConstraint(); + location5017.setX(0); + location5017.setY(5); + Node label5028 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActValueEditPart.VISUAL_ID)); + label5028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5028 = (Location) label5028.getLayoutConstraint(); + location5028.setX(0); + location5028.setY(5); + Node label5091 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID)); + label5091.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5091 = (Location) label5091.getLayoutConstraint(); + location5091.setX(0); + location5091.setY(5); + return node; + } + + /** + * @generated + */ + public Node createValuePin_3022(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5018 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActLabelEditPart.VISUAL_ID)); + label5018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5018 = (Location) label5018.getLayoutConstraint(); + location5018.setX(0); + location5018.setY(5); + Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActValueEditPart.VISUAL_ID)); + label5029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5029 = (Location) label5029.getLayoutConstraint(); + location5029.setX(0); + location5029.setY(5); + Node label5092 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID)); + label5092.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5092 = (Location) label5092.getLayoutConstraint(); + location5092.setX(0); + location5092.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3023(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5019 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActLabelEditPart.VISUAL_ID)); + label5019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5019 = (Location) label5019.getLayoutConstraint(); + location5019.setX(0); + location5019.setY(5); + Node label5093 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID)); + label5093.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5093 = (Location) label5093.getLayoutConstraint(); + location5093.setX(0); + location5093.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3024(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInCallOpActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5020 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActLabelEditPart.VISUAL_ID)); + label5020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5020 = (Location) label5020.getLayoutConstraint(); + location5020.setX(0); + location5020.setY(5); + Node label5094 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID)); + label5094.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5094 = (Location) label5094.getLayoutConstraint(); + location5094.setX(0); + location5094.setY(5); + return node; + } + + /** + * @generated + */ + public Node createValuePin_3025(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5021 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID)); + label5021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5021 = (Location) label5021.getLayoutConstraint(); + location5021.setX(0); + location5021.setY(5); + Node label5030 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetValueEditPart.VISUAL_ID)); + label5030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5030 = (Location) label5030.getLayoutConstraint(); + location5030.setX(0); + location5030.setY(5); + Node label5095 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5095.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5095 = (Location) label5095.getLayoutConstraint(); + location5095.setX(0); + location5095.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3026(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5022 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID)); + label5022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5022 = (Location) label5022.getLayoutConstraint(); + location5022.setX(0); + location5022.setY(5); + Node label5031 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID)); + label5031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5031 = (Location) label5031.getLayoutConstraint(); + location5031.setX(0); + location5031.setY(5); + Node label5096 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5096.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5096 = (Location) label5096.getLayoutConstraint(); + location5096.setX(0); + location5096.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3027(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetLabelEditPart.VISUAL_ID)); + label5023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5023 = (Location) label5023.getLayoutConstraint(); + location5023.setX(0); + location5023.setY(5); + Node label5097 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5097.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5097 = (Location) label5097.getLayoutConstraint(); + location5097.setX(0); + location5097.setY(5); + return node; + } + + /** + * @generated + */ + public Node createConstraint_3011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint"); + Node label5007 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); + Node label5136 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createConstraint_3012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint"); + Node label5008 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); + Node label5137 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createDecisionNode_3038(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(DecisionNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DecisionNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DecisionNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DecisionNode"); + Node label5043 = createLabel(node, UMLVisualIDRegistry.getType(DecisionInputEditPart.VISUAL_ID)); + label5043.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5043 = (Location) label5043.getLayoutConstraint(); + location5043.setX(0); + location5043.setY(5); + Node label5098 = createLabel(node, UMLVisualIDRegistry.getType(DecisionNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5098.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5098 = (Location) label5098.getLayoutConstraint(); + location5098.setX(0); + location5098.setY(5); + return node; + } + + /** + * @generated + */ + public Node createMergeNode_3039(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(MergeNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "MergeNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "MergeNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "MergeNode"); + Node label5099 = createLabel(node, UMLVisualIDRegistry.getType(MergeNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5099.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5099 = (Location) label5099.getLayoutConstraint(); + location5099.setX(0); + location5099.setY(5); + return node; + } + + /** + * @generated + */ + public Node createForkNode_3040(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ForkNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ForkNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ForkNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ForkNode"); + Node label5100 = createLabel(node, UMLVisualIDRegistry.getType(ForkNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5100.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5100 = (Location) label5100.getLayoutConstraint(); + location5100.setX(0); + location5100.setY(5); + return node; + } + + /** + * @generated + */ + public Node createJoinNode_3041(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(JoinNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "JoinNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "JoinNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "JoinNode"); + Node label5042 = createLabel(node, UMLVisualIDRegistry.getType(JoinSpecEditPart.VISUAL_ID)); + label5042.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5042 = (Location) label5042.getLayoutConstraint(); + location5042.setX(0); + location5042.setY(5); + Node label5101 = createLabel(node, UMLVisualIDRegistry.getType(JoinNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5101.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5101 = (Location) label5101.getLayoutConstraint(); + location5101.setX(0); + location5101.setY(5); + return node; + } + + /** + * @generated + */ + public Node createSendObjectAction_3042(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(SendObjectActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendObjectAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendObjectAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendObjectAction"); + Node label5059 = createLabel(node, UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6027 = createLabel(node, UMLVisualIDRegistry.getType(SendObjectActionFloatingNameEditPart.VISUAL_ID)); + label6027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6027 = (Location) label6027.getLayoutConstraint(); + location6027.setX(0); + location6027.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createValuePin_3046(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5049 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID)); + label5049.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5049 = (Location) label5049.getLayoutConstraint(); + location5049.setX(0); + location5049.setY(5); + Node label5050 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID)); + label5050.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5050 = (Location) label5050.getLayoutConstraint(); + location5050.setX(0); + location5050.setY(5); + Node label5102 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID)); + label5102.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5102 = (Location) label5102.getLayoutConstraint(); + location5102.setX(0); + location5102.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3047(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5051 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID)); + label5051.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5051 = (Location) label5051.getLayoutConstraint(); + location5051.setX(0); + location5051.setY(5); + Node label5052 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID)); + label5052.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5052 = (Location) label5052.getLayoutConstraint(); + location5052.setX(0); + location5052.setY(5); + Node label5103 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID)); + label5103.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5103 = (Location) label5103.getLayoutConstraint(); + location5103.setX(0); + location5103.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3048(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5053 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID)); + label5053.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5053 = (Location) label5053.getLayoutConstraint(); + location5053.setX(0); + location5053.setY(5); + Node label5104 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID)); + label5104.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5104 = (Location) label5104.getLayoutConstraint(); + location5104.setX(0); + location5104.setY(5); + return node; + } + + /** + * @generated + */ + public Node createValuePin_3049(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5054 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID)); + label5054.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5054 = (Location) label5054.getLayoutConstraint(); + location5054.setX(0); + location5054.setY(5); + Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID)); + label5055.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5055 = (Location) label5055.getLayoutConstraint(); + location5055.setX(0); + location5055.setY(5); + Node label5105 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5105.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5105 = (Location) label5105.getLayoutConstraint(); + location5105.setX(0); + location5105.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3050(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5056 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID)); + label5056.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5056 = (Location) label5056.getLayoutConstraint(); + location5056.setX(0); + location5056.setY(5); + Node label5057 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID)); + label5057.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5057 = (Location) label5057.getLayoutConstraint(); + location5057.setX(0); + location5057.setY(5); + Node label5106 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5106.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5106 = (Location) label5106.getLayoutConstraint(); + location5106.setX(0); + location5106.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3051(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID)); + label5058.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5058 = (Location) label5058.getLayoutConstraint(); + location5058.setX(0); + location5058.setY(5); + Node label5107 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5107.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5107 = (Location) label5107.getLayoutConstraint(); + location5107.setX(0); + location5107.setY(5); + return node; + } + + /** + * @generated + */ + public Node createSendSignalAction_3052(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(SendSignalActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendSignalAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendSignalAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendSignalAction"); + Node label5060 = createLabel(node, UMLVisualIDRegistry.getType(SendSignalActionNameEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3053(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActLabelEditPart.VISUAL_ID)); + label5061.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5061 = (Location) label5061.getLayoutConstraint(); + location5061.setX(0); + location5061.setY(5); + Node label5062 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActValueEditPart.VISUAL_ID)); + label5062.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5062 = (Location) label5062.getLayoutConstraint(); + location5062.setX(0); + location5062.setY(5); + Node label5108 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID)); + label5108.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5108 = (Location) label5108.getLayoutConstraint(); + location5108.setX(0); + location5108.setY(5); + return node; + } + + /** + * @generated + */ + public Node createValuePin_3054(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5063 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActLabelEditPart.VISUAL_ID)); + label5063.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5063 = (Location) label5063.getLayoutConstraint(); + location5063.setX(0); + location5063.setY(5); + Node label5064 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActValueEditPart.VISUAL_ID)); + label5064.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5064 = (Location) label5064.getLayoutConstraint(); + location5064.setX(0); + location5064.setY(5); + Node label5109 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID)); + label5109.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5109 = (Location) label5109.getLayoutConstraint(); + location5109.setX(0); + location5109.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3055(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5065 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActLabelEditPart.VISUAL_ID)); + label5065.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5065 = (Location) label5065.getLayoutConstraint(); + location5065.setX(0); + location5065.setY(5); + Node label5110 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID)); + label5110.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5110 = (Location) label5110.getLayoutConstraint(); + location5110.setX(0); + location5110.setY(5); + return node; + } + + /** + * @generated + */ + public Node createValuePin_3060(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin"); + Node label5072 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID)); + label5072.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5072 = (Location) label5072.getLayoutConstraint(); + location5072.setX(0); + location5072.setY(5); + Node label5073 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID)); + label5073.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5073 = (Location) label5073.getLayoutConstraint(); + location5073.setX(0); + location5073.setY(5); + Node label5111 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5111.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5111 = (Location) label5111.getLayoutConstraint(); + location5111.setX(0); + location5111.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActionInputPin_3061(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin"); + Node label5074 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID)); + label5074.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5074 = (Location) label5074.getLayoutConstraint(); + location5074.setX(0); + location5074.setY(5); + Node label5075 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID)); + label5075.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5075 = (Location) label5075.getLayoutConstraint(); + location5075.setX(0); + location5075.setY(5); + Node label5112 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5112.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5112 = (Location) label5112.getLayoutConstraint(); + location5112.setX(0); + location5112.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3062(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5076 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID)); + label5076.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5076 = (Location) label5076.getLayoutConstraint(); + location5076.setX(0); + location5076.setY(5); + Node label5113 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID)); + label5113.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5113 = (Location) label5113.getLayoutConstraint(); + location5113.setX(0); + location5113.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActivityParameterNode_3059(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActivityParameterNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityParameterNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityParameterNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityParameterNode"); + Node label5071 = createLabel(node, UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createAcceptEventAction_3063(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(AcceptEventActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AcceptEventAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AcceptEventAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AcceptEventAction"); + Node label5078 = createLabel(node, UMLVisualIDRegistry.getType(AcceptEventActionLabelEditPart.VISUAL_ID)); + Node label5079 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionLabelEditPart.VISUAL_ID)); + label5079.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5079 = (Location) label5079.getLayoutConstraint(); + location5079.setX(0); + location5079.setY(5); + Node label5115 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID)); + label5115.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5115 = (Location) label5115.getLayoutConstraint(); + location5115.setX(0); + location5115.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3064(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5077 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID)); + label5077.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5077 = (Location) label5077.getLayoutConstraint(); + location5077.setX(0); + location5077.setY(5); + Node label5114 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID)); + label5114.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5114 = (Location) label5114.getLayoutConstraint(); + location5114.setX(0); + location5114.setY(5); + return node; + } + + /** + * @generated + */ + public Node createStructuredActivityNode_3065(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(StructuredActivityNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "StructuredActivityNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StructuredActivityNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "StructuredActivityNode"); + Node label5117 = createLabel(node, UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "StructuredActivityNode"); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3105(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5178 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID)); + label5178.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5178 = (Location) label5178.getLayoutConstraint(); + location5178.setX(0); + location5178.setY(5); + Node label5179 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID)); + label5179.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5179 = (Location) label5179.getLayoutConstraint(); + location5179.setX(0); + location5179.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActivityPartition_3067(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActivityPartitionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityPartition"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityPartition"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityPartition"); + Node label5118 = createLabel(node, UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ActivityPartition"); + return node; + } + + /** + * @generated + */ + public Node createInterruptibleActivityRegion_3068(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InterruptibleActivityRegionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InterruptibleActivityRegion"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InterruptibleActivityRegion"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InterruptibleActivityRegion"); + createCompartment(node, UMLVisualIDRegistry.getType(InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "InterruptibleActivityRegion"); + return node; + } + + /** + * @generated + */ + public Node createComment_3080(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Comment"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Comment"); + Node label5138 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyLabelEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createReadSelfAction_3081(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ReadSelfActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadSelfAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadSelfAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadSelfAction"); + Node label5139 = createLabel(node, UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6025 = createLabel(node, UMLVisualIDRegistry.getType(ReadSelfActionFloatingNameEditPart.VISUAL_ID)); + label6025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6025 = (Location) label6025.getLayoutConstraint(); + location6025.setX(0); + location6025.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3084(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ReadSelfActionOutputPinEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5144 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionLabelEditPart.VISUAL_ID)); + label5144.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5144 = (Location) label5144.getLayoutConstraint(); + location5144.setX(0); + location5144.setY(5); + Node label5145 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID)); + label5145.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5145 = (Location) label5145.getLayoutConstraint(); + location5145.setX(0); + location5145.setY(5); + return node; + } + + /** + * @generated + */ + public Node createActivity_3083(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ActivityEditPartCN.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity"); + Node label5142 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID)); + Node label5143 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionCNEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID), false, false, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity"); + return node; + } + + /** + * @generated + */ + public Node createNamedElement_3085(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ShapeNamedElementEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ShapeNamedElement"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ShapeNamedElement"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ShapeNamedElement"); + Node label5129 = createLabel(node, UMLVisualIDRegistry.getType(ShapeNamedElementNameEditPart.VISUAL_ID)); + label5129.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5129 = (Location) label5129.getLayoutConstraint(); + location5129.setX(25); + location5129.setY(3); + return node; + } + + /** + * @generated + */ + public Node createCreateObjectAction_3086(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(CreateObjectActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CreateObjectAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CreateObjectAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CreateObjectAction"); + Node label5148 = createLabel(node, UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6024 = createLabel(node, UMLVisualIDRegistry.getType(CreateObjectActionFloatingNameEditPart.VISUAL_ID)); + label6024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6024 = (Location) label6024.getLayoutConstraint(); + location6024.setX(0); + location6024.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3087(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5146 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID)); + label5146.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5146 = (Location) label5146.getLayoutConstraint(); + location5146.setX(0); + location5146.setY(5); + Node label5147 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5147.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5147 = (Location) label5147.getLayoutConstraint(); + location5147.setX(0); + location5147.setY(5); + return node; + } + + /** + * @generated + */ + public Node createReadStructuralFeatureAction_3088(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadStructuralFeatureAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction"); + Node label5153 = createLabel(node, UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6023 = createLabel(node, UMLVisualIDRegistry.getType(ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID)); + label6023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6023 = (Location) label6023.getLayoutConstraint(); + location6023.setX(0); + location6023.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createInputPin_3089(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5149 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID)); + label5149.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5149 = (Location) label5149.getLayoutConstraint(); + location5149.setX(0); + location5149.setY(5); + Node label5150 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5150.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5150 = (Location) label5150.getLayoutConstraint(); + location5150.setX(0); + location5150.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3090(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5151 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID)); + label5151.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5151 = (Location) label5151.getLayoutConstraint(); + location5151.setX(0); + location5151.setY(5); + Node label5152 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID)); + label5152.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5152 = (Location) label5152.getLayoutConstraint(); + location5152.setX(0); + location5152.setY(5); + return node; + } + + /** + * @generated + */ + public Node createAddStructuralFeatureValueAction_3091(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddStructuralFeatureValueAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction"); + Node label5160 = createLabel(node, UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6019 = createLabel(node, UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID)); + label6019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6019 = (Location) label6019.getLayoutConstraint(); + location6019.setX(0); + location6019.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createInputPin_3092(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5154 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID)); + label5154.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5154 = (Location) label5154.getLayoutConstraint(); + location5154.setX(0); + location5154.setY(5); + Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5155.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5155 = (Location) label5155.getLayoutConstraint(); + location5155.setX(0); + location5155.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3093(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5156 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID)); + label5156.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5156 = (Location) label5156.getLayoutConstraint(); + location5156.setX(0); + location5156.setY(5); + Node label5157 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID)); + label5157.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5157 = (Location) label5157.getLayoutConstraint(); + location5157.setX(0); + location5157.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3094(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5158 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID)); + label5158.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5158 = (Location) label5158.getLayoutConstraint(); + location5158.setX(0); + location5158.setY(5); + Node label5159 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID)); + label5159.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5159 = (Location) label5159.getLayoutConstraint(); + location5159.setX(0); + location5159.setY(5); + return node; + } + + /** + * @generated + */ + public Node createDestroyObjectAction_3095(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(DestroyObjectActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DestroyObjectAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DestroyObjectAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DestroyObjectAction"); + Node label5163 = createLabel(node, UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6022 = createLabel(node, UMLVisualIDRegistry.getType(DestroyObjectActionFloatingNameEditPart.VISUAL_ID)); + label6022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6022 = (Location) label6022.getLayoutConstraint(); + location6022.setX(0); + location6022.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createInputPin_3096(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID)); + label5161.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5161 = (Location) label5161.getLayoutConstraint(); + location5161.setX(0); + location5161.setY(5); + Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5162.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5162 = (Location) label5162.getLayoutConstraint(); + location5162.setX(0); + location5162.setY(5); + return node; + } + + /** + * @generated + */ + public Node createReadVariableAction_3097(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ReadVariableActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadVariableAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadVariableAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadVariableAction"); + Node label5166 = createLabel(node, UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6021 = createLabel(node, UMLVisualIDRegistry.getType(ReadVariableActionFloatingNameEditPart.VISUAL_ID)); + label6021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6021 = (Location) label6021.getLayoutConstraint(); + location6021.setX(0); + location6021.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3098(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5164 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID)); + label5164.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5164 = (Location) label5164.getLayoutConstraint(); + location5164.setX(0); + location5164.setY(5); + Node label5165 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5165.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5165 = (Location) label5165.getLayoutConstraint(); + location5165.setX(0); + location5165.setY(5); + return node; + } + + /** + * @generated + */ + public Node createAddVariableValueAction_3099(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(AddVariableValueActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddVariableValueAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddVariableValueAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddVariableValueAction"); + Node label5171 = createLabel(node, UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID)); + // not generated but change include on gmfgen, can be override at the generation + Node label6018 = createLabel(node, UMLVisualIDRegistry.getType(AddVariableValueActionFloatingNameEditPart.VISUAL_ID)); + label6018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6018 = (Location) label6018.getLayoutConstraint(); + location6018.setX(0); + location6018.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createInputPin_3100(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5167 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID)); + label5167.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5167 = (Location) label5167.getLayoutConstraint(); + location5167.setX(0); + location5167.setY(5); + Node label5168 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5168.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5168 = (Location) label5168.getLayoutConstraint(); + location5168.setX(0); + location5168.setY(5); + return node; + } + + /** + * @generated + */ + public Node createInputPin_3101(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5169 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID)); + label5169.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5169 = (Location) label5169.getLayoutConstraint(); + location5169.setX(0); + location5169.setY(5); + Node label5170 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5170.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5170 = (Location) label5170.getLayoutConstraint(); + location5170.setX(0); + location5170.setY(5); + return node; + } + + /** + * @generated + */ + public Node createBroadcastSignalAction_3102(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(BroadcastSignalActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "BroadcastSignalAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "BroadcastSignalAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "BroadcastSignalAction"); + Node label5175 = createLabel(node, UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID)); + // not generated but change include on gmfgen, can be override at the generation + Node label6017 = createLabel(node, UMLVisualIDRegistry.getType(BroadcastSignalActionFloatingNameEditPart.VISUAL_ID)); + label6017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6017 = (Location) label6017.getLayoutConstraint(); + location6017.setX(0); + location6017.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createInputPin_3103(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin"); + Node label5172 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID)); + label5172.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5172 = (Location) label5172.getLayoutConstraint(); + location5172.setX(0); + location5172.setY(5); + Node label5173 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID)); + label5173.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5173 = (Location) label5173.getLayoutConstraint(); + location5173.setX(0); + location5173.setY(5); + Node label5174 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID)); + label5174.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5174 = (Location) label5174.getLayoutConstraint(); + location5174.setX(0); + location5174.setY(5); + return node; + } + + /** + * @generated + */ + public Node createCentralBufferNode_3104(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(CentralBufferNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CentralBufferNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CentralBufferNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CentralBufferNode"); + Node label5176 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID)); + Node label5177 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeSelectionEditPart.VISUAL_ID)); + label5177.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5177 = (Location) label5177.getLayoutConstraint(); + location5177.setX(0); + location5177.setY(5); + // not generated but changes include on gmfgen, can be override at the generation + Node label6030 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeFloatingNameEditPart.VISUAL_ID)); + label6030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6030 = (Location) label6030.getLayoutConstraint(); + location6030.setX(0); + location6030.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createConstraint_3112(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint"); + Node label5189 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID)); + Node label5190 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPartCN.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createValueSpecificationAction_3076(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ValueSpecificationActionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValueSpecificationAction"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValueSpecificationAction"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValueSpecificationAction"); + Node label5126 = createLabel(node, UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID)); + // not generated but changes include on gmfgen, can be override at the generation + Node label6026 = createLabel(node, UMLVisualIDRegistry.getType(ValueSpecificationActionFloatingNameEditPart.VISUAL_ID)); + label6026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6026 = (Location) label6026.getLayoutConstraint(); + location6026.setX(0); + location6026.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3077(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInValSpecActEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5124 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActLabelEditPart.VISUAL_ID)); + label5124.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5124 = (Location) label5124.getLayoutConstraint(); + location5124.setX(0); + location5124.setY(5); + Node label5125 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID)); + label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5125 = (Location) label5125.getLayoutConstraint(); + location5125.setX(0); + location5125.setY(5); + return node; + } + + /** + * @generated + */ + public Node createDataStoreNode_3078(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(DataStoreNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DataStoreNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataStoreNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DataStoreNode"); + Node label5127 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID)); + Node label5128 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreSelectionEditPart.VISUAL_ID)); + label5128.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5128 = (Location) label5128.getLayoutConstraint(); + location5128.setX(0); + location5128.setY(5); + // not generated but changes include on gmfgen, can be override at the generation + Node label6031 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreNodeFloatingNameEditPart.VISUAL_ID)); + label6031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6031 = (Location) label6031.getLayoutConstraint(); + location6031.setX(0); + location6031.setY(5); + + return node; + } + + /** + * @generated + */ + public Node createConditionalNode_3069(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ConditionalNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ConditionalNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ConditionalNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ConditionalNode"); + Node label5119 = createLabel(node, UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ConditionalNode"); + return node; + } + + /** + * @generated + */ + public Node createExpansionRegion_3070(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ExpansionRegionEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionRegion"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionRegion"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionRegion"); + Node label5120 = createLabel(node, UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExpansionRegion"); + return node; + } + + /** + * @generated + */ + public Node createExpansionNode_3074(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsInEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode"); + return node; + } + + /** + * @generated + */ + public Node createExpansionNode_3075(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsOutEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode"); + return node; + } + + /** + * @generated + */ + public Node createLoopNode_3071(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(LoopNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "LoopNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LoopNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "LoopNode"); + Node label5121 = createLabel(node, UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "LoopNode"); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3109(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5184 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID)); + label5184.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5184 = (Location) label5184.getLayoutConstraint(); + location5184.setX(0); + location5184.setY(5); + Node label5185 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID)); + label5185.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5185 = (Location) label5185.getLayoutConstraint(); + location5185.setX(0); + location5185.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3110(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5186 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID)); + label5186.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5186 = (Location) label5186.getLayoutConstraint(); + location5186.setX(0); + location5186.setY(5); + Node label5183 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID)); + label5183.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5183 = (Location) label5183.getLayoutConstraint(); + location5183.setX(0); + location5183.setY(5); + return node; + } + + /** + * @generated + */ + public Node createOutputPin_3111(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin"); + Node label5187 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID)); + label5187.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5187 = (Location) label5187.getLayoutConstraint(); + location5187.setX(0); + location5187.setY(5); + Node label5188 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID)); + label5188.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5188 = (Location) label5188.getLayoutConstraint(); + location5188.setX(0); + location5188.setY(5); + return node; + } + + /** + * @generated + */ + public Node createSequenceNode_3073(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(SequenceNodeEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SequenceNode"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SequenceNode"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SequenceNode"); + Node label5123 = createLabel(node, UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID)); + createCompartment(node, UMLVisualIDRegistry.getType(SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "SequenceNode"); + return node; + } + + /** + * @generated + */ + public Node createIntervalConstraint_3032(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint"); + Node label5036 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); + Node label5134 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createIntervalConstraint_3033(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint"); + Node label5037 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); + Node label5135 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createDurationConstraint_3034(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint"); + Node label5038 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); + Node label5130 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createDurationConstraint_3035(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint"); + Node label5039 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); + Node label5131 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createTimeConstraint_3036(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint"); + Node label5040 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID)); + Node label5132 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Node createTimeConstraint_3037(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle()); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondEditPart.VISUAL_ID)); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint"); + PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint"); + Node label5041 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID)); + Node label5133 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID)); + return node; + } + + /** + * @generated + */ + public Edge createActionLocalPrecondition_4001(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Edge edge = NotationFactory.eINSTANCE.createEdge(); + edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(ActionLocalPreconditionEditPart.VISUAL_ID)); + edge.setElement(null); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); + return edge; + } + + /** + * @generated + */ + public Edge createActionLocalPostcondition_4002(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Edge edge = NotationFactory.eINSTANCE.createEdge(); + edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle()); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(ActionLocalPostconditionEditPart.VISUAL_ID)); + edge.setElement(null); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); + return edge; + } + + /** + * @generated + */ + public Edge createObjectFlow_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Connector edge = NotationFactory.eINSTANCE.createConnector(); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(ObjectFlowEditPart.VISUAL_ID)); + edge.setElement(domainElement); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ObjectFlow"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ObjectFlow"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ObjectFlow"); + Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowNameEditPart.VISUAL_ID)); + label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6001 = (Location) label6001.getLayoutConstraint(); + location6001.setX(0); + location6001.setY(20); + Node label6002 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowWeightEditPart.VISUAL_ID)); + label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6002 = (Location) label6002.getLayoutConstraint(); + location6002.setX(0); + location6002.setY(20); + Node label6005 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowSelectionEditPart.VISUAL_ID)); + label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6005 = (Location) label6005.getLayoutConstraint(); + location6005.setX(20); + location6005.setY(40); + Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowTransformationEditPart.VISUAL_ID)); + label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6006 = (Location) label6006.getLayoutConstraint(); + location6006.setX(-20); + location6006.setY(-60); + Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(DecisionInputFlowEditPart.VISUAL_ID)); + label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6007 = (Location) label6007.getLayoutConstraint(); + location6007.setX(0); + location6007.setY(-20); + Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowGuardEditPart.VISUAL_ID)); + label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6008 = (Location) label6008.getLayoutConstraint(); + location6008.setX(0); + location6008.setY(20); + Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowAppliedStereotypeEditPart.VISUAL_ID)); + label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6010 = (Location) label6010.getLayoutConstraint(); + location6010.setX(0); + location6010.setY(-20); + Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowInterruptibleIconEditPart.VISUAL_ID)); + label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ObjectFlow"); + return edge; + } + + /** + * @generated + */ + public Edge createControlFlow_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Connector edge = NotationFactory.eINSTANCE.createConnector(); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(ControlFlowEditPart.VISUAL_ID)); + edge.setElement(domainElement); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ControlFlow"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ControlFlow"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ControlFlow"); + Node label6003 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowNameEditPart.VISUAL_ID)); + label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6003 = (Location) label6003.getLayoutConstraint(); + location6003.setX(0); + location6003.setY(20); + Node label6004 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowWeightEditPart.VISUAL_ID)); + label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6004 = (Location) label6004.getLayoutConstraint(); + location6004.setX(0); + location6004.setY(20); + Node label6009 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowGuardEditPart.VISUAL_ID)); + label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6009 = (Location) label6009.getLayoutConstraint(); + location6009.setX(0); + location6009.setY(20); + Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowAppliedStereotypeEditPart.VISUAL_ID)); + label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6011 = (Location) label6011.getLayoutConstraint(); + location6011.setX(0); + location6011.setY(-20); + Node label6013 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowInterruptibleIconEditPart.VISUAL_ID)); + label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ControlFlow"); + return edge; + } + + /** + * @generated + */ + public Edge createExceptionHandler_4005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Connector edge = NotationFactory.eINSTANCE.createConnector(); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(ExceptionHandlerEditPart.VISUAL_ID)); + edge.setElement(domainElement); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ExceptionHandler"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ExceptionHandler"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ExceptionHandler"); + Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerTypeEditPart.VISUAL_ID)); + label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6012 = (Location) label6012.getLayoutConstraint(); + location6012.setX(0); + location6012.setY(40); + Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerIconEditPart.VISUAL_ID)); + label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + return edge; + } + + /** + * @generated + */ + public Edge createCommentAnnotatedElement_4006(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Connector edge = NotationFactory.eINSTANCE.createConnector(); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(CommentLinkEditPart.VISUAL_ID)); + edge.setElement(null); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); + return edge; + } + + /** + * @generated + */ + public Edge createConstraintConstrainedElement_4007(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) { + Connector edge = NotationFactory.eINSTANCE.createConnector(); + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + ArrayList points = new ArrayList(2); + points.add(new RelativeBendpoint()); + points.add(new RelativeBendpoint()); + bendpoints.setPoints(points); + edge.setBendpoints(bendpoints); + ViewUtil.insertChildView(containerView, edge, index, persisted); + edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID)); + edge.setElement(null); + // initializePreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined"); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined"); + // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE)); + // if (routing != null) { + // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing); + // } + PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined"); + return edge; + } + + /** + * @generated + */ + protected void stampShortcut(View containerView, Node target) { + if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { + EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); + shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ + shortcutAnnotation.getDetails().put("modelID", ActivityDiagramEditPart.MODEL_ID); //$NON-NLS-1$ + target.getEAnnotations().add(shortcutAnnotation); + } + } + + /** + * @generated + */ + protected Node createLabel(View owner, String hint) { + DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode(); + rv.setType(hint); + ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); + return rv; + } + + /** + * @generated + */ + protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) { + // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment(); + // rv.setShowTitle(showTitle); + // rv.setCollapsed(isCollapsed); + Node rv; + if (canCollapse) { + rv = NotationFactory.eINSTANCE.createBasicCompartment(); + } else { + rv = NotationFactory.eINSTANCE.createDecorationNode(); + } + rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + if (hasTitle) { + TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle(); + rv.getStyles().add(ts); + } + if (canSort) { + rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle()); + } + if (canFilter) { + rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle()); + } + rv.setType(hint); + ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); + return rv; + } + + /** + * @generated + */ + protected EObject getSemanticElement(IAdaptable semanticAdapter) { + if (semanticAdapter == null) { + return null; + } + EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class); + if (eObject != null) { + return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject); + } + return null; + } + + /** + * @generated + */ + protected IElementType getSemanticElementType(IAdaptable semanticAdapter) { + if (semanticAdapter == null) { + return null; + } + return (IElementType) semanticAdapter.getAdapter(IElementType.class); + } + + /** + * @generated + */ + private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) { + String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT); + String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT); + FontStyle viewFontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE); + if (viewFontStyle != null) { + FontData fontData = PreferenceConverter.getFontData(store, fontConstant); + viewFontStyle.setFontName(fontData.getName()); + viewFontStyle.setFontHeight(fontData.getHeight()); + viewFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); + viewFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); + org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(store, fontColorConstant); + viewFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue()); + } + } + + /** + * @generated + */ + private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) { + String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE); + org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant); + ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB)); + } + + /** + * @generated + */ + private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) { + String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL); + String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT); + String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY); + org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant); + ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB)); + FillStyle fillStyle = (FillStyle) view.getStyle(NotationPackage.Literals.FILL_STYLE); + fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue()); + ; + if (store.getBoolean(gradientPolicyConstant)) { + GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant)); + fillStyle.setGradient(gradientPreferenceConverter.getGradientData()); + fillStyle.setTransparency(gradientPreferenceConverter.getTransparency()); + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java new file mode 100644 index 00000000000..af34efd5b0c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java @@ -0,0 +1,271 @@ +package org.eclipse.papyrus.uml.diagram.common.editparts; + +import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.gmf.runtime.notation.BooleanValueStyle; +import org.eclipse.gmf.runtime.notation.IntValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.StringValueStyle; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; + + +public abstract class RoundedBorderNamedElementEditPart extends BorderNamedElementEditPart { + + /** + * Constructor. + * + * @param view + */ + public RoundedBorderNamedElementEditPart(View view) { + super(view); + } + + /** The Constant BORDER_STYLE. */ + protected static final String BORDER_STYLE = "borderStyle"; //$NON-NLS-N$ + + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_SOLID; + + /** The Constant DEFAULT_CORNER_HEIGHT. */ + private static final int DEFAULT_CORNER_HEIGHT = 0; + + /** The Constant DEFAULT_CORNER_WIDTH. */ + private static final int DEFAULT_CORNER_WIDTH = 0; + + /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT. */ + private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0; + + /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_WIDTH. */ + private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0; + + /** The Constant DEFAULT_IS_FLOATING_LABEL_CONSTRAINED. */ + private static final boolean DEFAULT_IS_FLOATING_LABEL_CONSTRAINED = false; + + /** The Constant DEFAULT_IS_OVAL. */ + private static final boolean DEFAULT_IS_OVAL = false; + + /** CSS boolean property controlling whether label should be constrained. */ + public static final String FLOATING_LABEL_CONSTRAINED = "isFloatingLabelConstrained";//$NON-NLS-N$ + + /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */ + public static final String FLOATING_LABEL_OFFSET_HEIGHT = "floatingLabelOffsetHeight";//$NON-NLS-N$ + + /** The Constant FLOATING_NAME_OFFSET_WIDTH. */ + public static final String FLOATING_LABEL_OFFSET_WIDTH = "floatingLabelOffsetWidth";//$NON-NLS-N$ + + /** CSS boolean property controlling whether. */ + public static final String IS_OVAL = "isOval";//$NON-NLS-N$ + + /** CSS boolean property controlling whether. */ + public static final String RADIUS_HEIGHT = "radiusHeight";//$NON-NLS-N$ + + /** CSS boolean property controlling whether. */ + public static final String RADIUS_WIDTH = "radiusWidth";//$NON-NLS-N$ + + + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#createDefaultEditPolicies() + * + */ + @Override + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + // Install Edit Policy to Hide/show compartment, in particular for the symbol compartment + installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy()); + } + + /** + * Gets the default border style. + * + * @return the default border style + */ + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + + /** + * Gets the default corner height value. + * + * @return the default corner height value + */ + protected int getDefaultCornerHeight() { + return DEFAULT_CORNER_HEIGHT; + } + + /** + * Gets the default corner width value. + * + * @return the default corner width value + */ + protected int getDefaultCornerWidth() { + return DEFAULT_CORNER_WIDTH; + } + + /** + * Gets the default floating name offset height. + * + * @return the default floating name offset height + */ + protected int getDefaultFloatingNameOffsetHeight() { + return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT; + } + + /** + * Gets the default floating name offset width. + * + * @return the default floating name offset width + */ + protected int getDefaultFloatingNameOffsetWidth() { + return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH; + } + + /** + * Gets the default is name constrained. + * + * @return the default is name constrained + */ + protected boolean getDefaultIsFloatingNameConstrained() { + return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED; + } + + /** + * Gets the default is oval value. + * + * @return the default is oval value + */ + protected boolean getDefaultIsOvalValue() { + return DEFAULT_IS_OVAL; + } + + /** + * Refresh border style. + */ + private void refreshBorderStyle() { + // get the Figure + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + // get CSS the value of radius Width + StringValueStyle borderValueStyle = (StringValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), BORDER_STYLE); + + // change style to int from string + int borderStyle = getDefaultBorderStyle(); + ; + if (borderValueStyle != null) { + if ("dash".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASH; + } + if ("dashDot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASHDOT; + } + if ("dashDotDot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASHDOTDOT; + } + if ("dot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DOT; + } + if ("solid".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_SOLID; + } + } + // set the border style of the figure + roundedRectangleFigure.setBorderStyle(borderStyle); + } + + } + + /** + * Refresh floating name. + */ + protected void refreshFloatingName() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + // Get CSS value for the name attached properties + BooleanValueStyle isNameConstrainedValue = (BooleanValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), FLOATING_LABEL_CONSTRAINED); + boolean isNameConstrained; + // if no css property set to default value + if (isNameConstrainedValue == null) { + isNameConstrained = getDefaultIsFloatingNameConstrained(); + } else { + isNameConstrained = isNameConstrainedValue.isBooleanValue(); + } + // Set the name attached properties in figure + roundedRectangleFigure.setFloatingNameConstrained(isNameConstrained); + + // get Offset + // get CSS the value of offset Width + IntValueStyle offsetWidth = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), FLOATING_LABEL_OFFSET_WIDTH); + int width = offsetWidth != null ? offsetWidth.getIntValue() : getDefaultFloatingNameOffsetWidth(); + + // get CSS the value of offset Height + IntValueStyle offsetHeight = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), FLOATING_LABEL_OFFSET_HEIGHT); + int height = offsetHeight != null ? offsetHeight.getIntValue() : getDefaultFloatingNameOffsetHeight(); + + // Set the floating name offset + roundedRectangleFigure.setFloatingNameOffset(new Dimension(width, height)); + + } + + } + + /** + * Refresh oval. + */ + protected void refreshOval() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + // get the CSS value of isOval + BooleanValueStyle isOvalValue = (BooleanValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), IS_OVAL); + boolean isOval; + if (isOvalValue == null) { + isOval = getDefaultIsOvalValue(); + } else { + isOval = isOvalValue.isBooleanValue(); + } + // Set isOval + roundedRectangleFigure.setOval(isOval); + } + } + + /** + * Refresh radius. + */ + protected void refreshRadius() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + Dimension radiusDimension = new Dimension(); + + // get CSS the value of radius Width + IntValueStyle radiusWidth = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), RADIUS_WIDTH); + radiusDimension.width = radiusWidth != null ? radiusWidth.getIntValue() : getDefaultCornerWidth(); + + // get CSS the value of radius Height + IntValueStyle radiusHeight = (IntValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), RADIUS_HEIGHT); + radiusDimension.height = radiusHeight != null ? radiusHeight.getIntValue() : getDefaultCornerHeight(); + + // Set the corner dimension + roundedRectangleFigure.setCornerDimensions(radiusDimension); + } + } + + /** + * Refresh visuals. + * + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals() + */ + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshRadius(); + refreshOval(); + refreshFloatingName(); + refreshBorderStyle(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java index 9746921f754..3d05d998522 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java @@ -8,14 +8,16 @@ * * Contributors: * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation - * + * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.editparts; +import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.gmf.runtime.notation.BooleanValueStyle; import org.eclipse.gmf.runtime.notation.IntValueStyle; import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.StringValueStyle; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure; import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; @@ -25,35 +27,47 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEd */ public abstract class RoundedCompartmentEditPart extends NamedElementEditPart { - /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */ - protected static final String FLOATING_LABEL_OFFSET_HEIGHT = "floatingLabelOffsetHeight"; + /** The Constant BORDER_STYLE. */ + protected static final String BORDER_STYLE = "borderStyle"; //$NON-NLS-N$ - /** The Constant FLOATING_NAME_OFFSET_WIDTH. */ - protected static final String FLOATING_LABEL_OFFSET_WIDTH = "floatingLabelOffsetWidth"; + /** The Constant DEFAULT_BORDER_STYLE. */ + private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_SOLID; - /** CSS boolean property controlling whether label should be constrained. */ - public static final String FLOATING_LABEL_CONSTRAINED = "isFloatingLabelConstrained"; + /** The Constant DEFAULT_CORNER_HEIGHT. */ + private static final int DEFAULT_CORNER_HEIGHT = 0; - /** CSS boolean property controlling whether. */ - public static final String RADIUS_WIDTH = "radiusWidth"; + /** The Constant DEFAULT_CORNER_WIDTH. */ + private static final int DEFAULT_CORNER_WIDTH = 0; - /** CSS boolean property controlling whether. */ - public static final String RADIUS_HEIGHT = "radiusHeight"; + /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT. */ + private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0; - /** CSS boolean property controlling whether. */ - public static final String IS_OVAL = "isOval"; + /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_WIDTH. */ + private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0; + /** The Constant DEFAULT_IS_FLOATING_LABEL_CONSTRAINED. */ private static final boolean DEFAULT_IS_FLOATING_LABEL_CONSTRAINED = false; - private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0; + /** The Constant DEFAULT_IS_OVAL. */ + private static final boolean DEFAULT_IS_OVAL = false; - private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0; + /** CSS boolean property controlling whether label should be constrained. */ + public static final String FLOATING_LABEL_CONSTRAINED = "isFloatingLabelConstrained";//$NON-NLS-N$ - private static final int DEFAULT_CORNER_WIDTH = 0; + /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */ + public static final String FLOATING_LABEL_OFFSET_HEIGHT = "floatingLabelOffsetHeight";//$NON-NLS-N$ - private static final int DEFAULT_CORNER_HEIGHT = 0; + /** The Constant FLOATING_NAME_OFFSET_WIDTH. */ + public static final String FLOATING_LABEL_OFFSET_WIDTH = "floatingLabelOffsetWidth";//$NON-NLS-N$ - private static final boolean DEFAULT_IS_OVAL = false; + /** CSS boolean property controlling whether. */ + public static final String IS_OVAL = "isOval";//$NON-NLS-N$ + + /** CSS boolean property controlling whether. */ + public static final String RADIUS_HEIGHT = "radiusHeight";//$NON-NLS-N$ + + /** CSS boolean property controlling whether. */ + public static final String RADIUS_WIDTH = "radiusWidth";//$NON-NLS-N$ /** * Instantiates a new rounded compartment edit part. @@ -65,7 +79,10 @@ public abstract class RoundedCompartmentEditPart extends NamedElementEditPart { super(view); } - + /** + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#createDefaultEditPolicies() + * + */ @Override protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); @@ -74,16 +91,103 @@ public abstract class RoundedCompartmentEditPart extends NamedElementEditPart { } /** - * Refresh visuals. + * Gets the default border style. * - * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals() + * @return the default border style */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshRadius(); - refreshOval(); - refreshFloatingName(); + protected int getDefaultBorderStyle() { + return DEFAULT_BORDER_STYLE; + } + + /** + * Gets the default corner height value. + * + * @return the default corner height value + */ + protected int getDefaultCornerHeight() { + return DEFAULT_CORNER_HEIGHT; + } + + /** + * Gets the default corner width value. + * + * @return the default corner width value + */ + protected int getDefaultCornerWidth() { + return DEFAULT_CORNER_WIDTH; + } + + /** + * Gets the default floating name offset height. + * + * @return the default floating name offset height + */ + protected int getDefaultFloatingNameOffsetHeight() { + return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT; + } + + /** + * Gets the default floating name offset width. + * + * @return the default floating name offset width + */ + protected int getDefaultFloatingNameOffsetWidth() { + return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH; + } + + /** + * Gets the default is name constrained. + * + * @return the default is name constrained + */ + protected boolean getDefaultIsFloatingNameConstrained() { + return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED; + } + + /** + * Gets the default is oval value. + * + * @return the default is oval value + */ + protected boolean getDefaultIsOvalValue() { + return DEFAULT_IS_OVAL; + } + + /** + * Refresh border style. + */ + private void refreshBorderStyle() { + // get the Figure + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + + // get CSS the value of radius Width + StringValueStyle borderValueStyle = (StringValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), BORDER_STYLE); + + // change style to int from string + int borderStyle = getDefaultBorderStyle(); + ; + if (borderValueStyle != null) { + if ("dash".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASH; + } + if ("dashDot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASHDOT; + } + if ("dashDotDot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DASHDOTDOT; + } + if ("dot".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_DOT; + } + if ("solid".equals(borderValueStyle.getStringValue())) { + borderStyle = Graphics.LINE_SOLID; + } + } + // set the border style of the figure + roundedRectangleFigure.setBorderStyle(borderStyle); + } + } /** @@ -123,30 +227,23 @@ public abstract class RoundedCompartmentEditPart extends NamedElementEditPart { } /** - * Gets the default is name constrained. - * - * @return the default is name constrained - */ - protected boolean getDefaultIsFloatingNameConstrained() { - return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED; - } - - /** - * Gets the default floating name offset height. - * - * @return the default floating name offset height - */ - protected int getDefaultFloatingNameOffsetHeight() { - return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT; - } - - /** - * Gets the default floating name offset width. - * - * @return the default floating name offset width + * Refresh oval. */ - protected int getDefaultFloatingNameOffsetWidth() { - return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH; + protected void refreshOval() { + if (getPrimaryShape() instanceof IRoundedRectangleFigure) { + // The figure + IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); + // get the CSS value of isOval + BooleanValueStyle isOvalValue = (BooleanValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), IS_OVAL); + boolean isOval; + if (isOvalValue == null) { + isOval = getDefaultIsOvalValue(); + } else { + isOval = isOvalValue.isBooleanValue(); + } + // Set isOval + roundedRectangleFigure.setOval(isOval); + } } /** @@ -173,49 +270,16 @@ public abstract class RoundedCompartmentEditPart extends NamedElementEditPart { } /** - * Gets the default corner height value. - * - * @return the default corner height value - */ - protected int getDefaultCornerHeight() { - return DEFAULT_CORNER_HEIGHT; - } - - /** - * Gets the default corner width value. - * - * @return the default corner width value - */ - protected int getDefaultCornerWidth() { - return DEFAULT_CORNER_WIDTH; - } - - /** - * Refresh oval. - */ - protected void refreshOval() { - if (getPrimaryShape() instanceof IRoundedRectangleFigure) { - // The figure - IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) getPrimaryShape(); - // get the CSS value of isOval - BooleanValueStyle isOvalValue = (BooleanValueStyle) ((View) getModel()).getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), IS_OVAL); - boolean isOval; - if (isOvalValue == null) { - isOval = getDefaultIsOvalValue(); - } else { - isOval = isOvalValue.isBooleanValue(); - } - // Set isOval - roundedRectangleFigure.setOval(isOval); - } - } - - /** - * Gets the default is oval value. + * Refresh visuals. * - * @return the default is oval value + * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals() */ - protected boolean getDefaultIsOvalValue() { - return DEFAULT_IS_OVAL; + @Override + protected void refreshVisuals() { + super.refreshVisuals(); + refreshRadius(); + refreshOval(); + refreshFloatingName(); + refreshBorderStyle(); } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java index 2200a3647c4..30a26347094 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java @@ -80,26 +80,27 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout { collectInformation(container); int minimumWith = 0; int minimumHeight = 0; - //CompartementFigure shall be replace by RoundedCompartmentFigure and this condition may be remove - if(container instanceof CompartmentFigure) { - CompartmentFigure cf = (CompartmentFigure)container; + // CompartementFigure shall be replace by RoundedCompartmentFigure and this condition may be remove + if (container instanceof CompartmentFigure) { + CompartmentFigure cf = (CompartmentFigure) container; WrappingLabel wl = cf.getNameLabel(); // display name - if(wl != null && container.getChildren().contains(wl)) { - if(wl.getPreferredSize().width > minimumWith) { + if (wl != null && container.getChildren().contains(wl)) { + if (wl.getPreferredSize().width > minimumWith) { minimumWith = wl.getPreferredSize().width; } } } - if(container instanceof RoundedCompartmentFigure) { - RoundedCompartmentFigure cf = (RoundedCompartmentFigure)container; + if (container instanceof RoundedCompartmentFigure) { + RoundedCompartmentFigure cf = (RoundedCompartmentFigure) container; WrappingLabel wl = cf.getNameLabel(); // display name if (wl != null && container.getChildren().contains(wl)) { if (wl.getPreferredSize().width > minimumWith) { - minimumWith = wl.getPreferredSize().width; + minimumWith = wl.getPreferredSize().width + 2; } } + } if (!visibleCompartments.isEmpty()) { for (Object o : container.getChildren()) { @@ -191,10 +192,10 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout { } if (previous != null) { bound.y = previous.getBounds().getBottomLeft().y + 1; - bound.x = container.x + 3; + bound.x = container.x + 1; bound.width = container.width; } else { - bound.x = container.x + 3; + bound.x = container.x + 1; // in the case where the content is grater than the container // it is forbidden to change the y coordinate if (((container.height - totalHeight) / 2) > 0) { diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java index 9a9f55b5801..b2592ee636b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java @@ -37,15 +37,28 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements private Map containerFigures; /** The corner dimension. */ - private Dimension cornerDimension = new Dimension(); + protected Dimension cornerDimension = new Dimension(); /** The is oval. */ - private boolean isOval; + protected boolean isOval; /** The is label constrained. */ - private boolean isLabelConstrained; + protected boolean isLabelConstrained; - private Dimension floatingNameOffset = new Dimension(); + protected Dimension floatingNameOffset = new Dimension(); + + protected int borderStyle = Graphics.LINE_SOLID; + + /** + * @param borderStyle + * the borderStyle to set + */ + public void setBorderStyle(int borderStyle) { + this.borderStyle = borderStyle; + if (shadowborder != null) { + shadowborder.setStyle(borderStyle); + } + } /** * Instantiates a new rounded compartment figure. @@ -58,7 +71,7 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements * Constructor. * * @param compartmentFigure - * the compartment figure + * the compartment figure */ public RoundedCompartmentFigure(List compartmentFigure) { this(compartmentFigure, null); @@ -68,28 +81,29 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements * Constructor with a tagged value. * * @param compartmentFigure - * a list of id for the compartment figure + * a list of id for the compartment figure * @param taggedLabelValue - * the value to display as tagged value + * the value to display as tagged value */ public RoundedCompartmentFigure(List compartmentFigure, String taggedLabelValue) { super(taggedLabelValue); - setLayoutManager(new AutomaticCompartmentLayoutManager()); setOpaque(false); shadowborder = new RoundedRectangleShadowBorder(getForegroundColor(), cornerDimension); - if(compartmentFigure != null) + setLayoutManager(new AutomaticCompartmentLayoutManager()); + if (compartmentFigure != null) { createContentPane(compartmentFigure); + } } /** * Creates the content pane. * * @param compartmentFigure - * the compartment figure + * the compartment figure */ protected void createContentPane(List compartmentFigure) { containerFigures = new HashMap(); - for(String id : compartmentFigure) { + for (String id : compartmentFigure) { RectangleFigure newFigure = new RectangleFigure(); newFigure.setLayoutManager(new SubCompartmentLayoutManager()); // to debug graphically: newFigure.setFill(true); @@ -102,11 +116,22 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements } } + /** + * @see org.eclipse.draw2d.Figure#setBounds(org.eclipse.draw2d.geometry.Rectangle) + * + * @param rect + */ + @Override + public void setBounds(Rectangle rect) { + // TODO Auto-generated method stub + super.setBounds(rect); + } + /** * Get the RectangleFigure containing the wanted compartment. * * @param id - * the id to find the right compartment + * the id to find the right compartment * @return the RectangleFigure */ public RectangleFigure getCompartment(String id) { @@ -141,16 +166,16 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements shadowborder.setColor(getForegroundColor()); graphics.pushState(); Rectangle rectangle = getBounds().getCopy(); - //Set the corner dimension if is oval in case of resizing - if(isOval) { + // Set the corner dimension if is oval in case of resizing + if (isOval) { cornerDimension.width = rectangle.width; cornerDimension.height = rectangle.height; } - //paintBackground: + // paintBackground: applyTransparency(graphics); - if(isUsingGradient()) { + if (isUsingGradient()) { boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false; - if(isVertical && rectangle.height > ((3 * cornerDimension.height) / 2)) { + if (isVertical && rectangle.height > ((3 * cornerDimension.height) / 2)) { Rectangle upperBounds = getBounds().getCopy(); upperBounds.height = cornerDimension.height - getLineWidth() / 2; upperBounds.y += getLineWidth() / 2; @@ -180,7 +205,7 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements graphics.clipRect(lowerClip); graphics.fillRoundRectangle(lowerBounds, cornerDimension.width, cornerDimension.height); graphics.popState(); - } else if(!isVertical && rectangle.width > ((3 * cornerDimension.width) / 2)) { + } else if (!isVertical && rectangle.width > ((3 * cornerDimension.width) / 2)) { Rectangle leftBounds = getBounds().getCopy(); leftBounds.width = cornerDimension.width - getLineWidth() / 2; leftBounds.x += getLineWidth() / 2; @@ -191,7 +216,7 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements Rectangle rightClip = rightBounds.getCopy().shrink(new Insets(0, cornerDimension.width / 2, 0, 0)); Rectangle innerBounds = getBounds().getCopy(); innerBounds.x = leftClip.right();// - getLineWidth(); - innerBounds.width = rightClip.x - leftClip.right() + 1;//+ 2 * getLineWidth(); + innerBounds.width = rightClip.x - leftClip.right() + 1;// + 2 * getLineWidth(); // fill the left part graphics.pushState(); graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); @@ -225,7 +250,7 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements graphics.popState(); } graphics.popState(); - //Force to repaint the border thought setShadow() + // Force to repaint the border thought setShadow() setShadow(isShadow()); repaint(); } @@ -238,11 +263,12 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements @Override public void setShadow(boolean shadow) { super.setShadow(shadow); - if(!shadow) { - //If shadow is set to false on CSS file we set the border - if(getBorder() != null) { + if (!shadow) { + // If shadow is set to false on CSS file we set the border + if (getBorder() != null) { RoundedRectangleBorder border = new RoundedRectangleBorder(cornerDimension.width, cornerDimension.height); border.setWidth(getLineWidth()); + border.setStyle(borderStyle); this.setBorder(border); } } @@ -252,27 +278,17 @@ public class RoundedCompartmentFigure extends NodeNamedElementFigure implements * Sets the corner dimension. * * @param cornerDimension - * the new corner dimension + * the new corner dimension */ @Override public void setCornerDimensions(Dimension cornerDimension) { this.cornerDimension = cornerDimension; } - // @Override - // public void setRadiusWidth(int width) { - // cornerDimension.width = width; - // } - // - // @Override - // public void setRadiusHeight(int height) { - // cornerDimension.height = height; - // } - @Override public void setOval(boolean booleanValue) { isOval = booleanValue; - if(booleanValue) { + if (booleanValue) { Rectangle rectangle = getBounds().getCopy(); cornerDimension.width = rectangle.width; cornerDimension.height = rectangle.height; diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java index ed63df3e3a1..71dd28303fb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java @@ -1,195 +1,195 @@ -/***************************************************************************** - * Copyright (c) 2013 CEA LIST. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.interactionoverview.figures; - -import java.util.List; - -import org.eclipse.draw2d.AbstractLayout; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.MarginBorder; -import org.eclipse.draw2d.OrderedLayout; -import org.eclipse.draw2d.RectangleFigure; -import org.eclipse.draw2d.ToolbarLayout; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure; -import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure; -import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout; - -public class ActivityAsInteractionFigure extends ActivityFigure { - - private WrappingLabel interactionHeader; - - private RectangleFigure interactionLabelContainer; - - private RectangleFigure interactionContentPane; - - public ActivityAsInteractionFigure() { - createContents(); - this.corner = 0; - } - - protected void createContents() { - add(createInteractionFigureHeader()); - add(createContentPane()); - setLayoutManager(new ActivityLayoutManager()); - } - - protected RectangleFigure createContentPane() { - interactionContentPane = new RectangleFigure(); - // Margin allow to add message easily - interactionContentPane.setBorder(new MarginBorder(5, 5, 5, 5)); - interactionContentPane.setFill(false); - interactionContentPane.setOutline(false); - - return interactionContentPane; - } - - protected RectangleFigure createInteractionFigureHeader() { - this.interactionHeader = new WrappingLabel() { - - @Override - public Dimension getPreferredSize(final int wHint, final int hHint) { - final Dimension preferredSize = super.getPreferredSize(wHint, hHint); - if (preferredSize.width == 0) { - return preferredSize; - } - return new Dimension(preferredSize.width + 2, preferredSize.height + 2); - } - }; - - final InteractionFigure interactionFigure = new InteractionFigure(); - interactionFigure.setBorder(new MarginBorder(3, 3, 3, 3)); - interactionFigure.setLayoutManager(new LeftToolbarLayout()); - interactionFigure.add(interactionHeader); - interactionLabelContainer = new RectangleFigure(); - interactionLabelContainer.setOutline(false); - interactionLabelContainer.setFill(false); - interactionLabelContainer.setLayoutManager(new ToolbarLayout(false)); - interactionLabelContainer.add(interactionFigure, OrderedLayout.ALIGN_CENTER); - return interactionLabelContainer; - } - - @Override - public WrappingLabel getNameLabel() { - return interactionHeader; - } - - public RectangleFigure getLabelContainer() { - return interactionLabelContainer; - } - - @Override - public RectangleFigure getContentFigure() { - return interactionContentPane; - } - - /** - * get the gmf container figure of the package - * - * @return the gmf container - */ - @Override - public ShapeCompartmentFigure getGMFContentContainer() { - if (interactionContentPane.getChildren().size() > 0) { - return (ShapeCompartmentFigure) interactionContentPane.getChildren().get(0); - } - return null; - } - - /** - * this is the layout manager in charge to place element in the enumeration - * - */ - private class ActivityLayoutManager extends AbstractLayout { - - /** - * ---------------------------------------------------| |sterotypeLabel| - * precondition | |--------------| | |QualifiedName - * |-----------------------------------| |--------------| | |name | - * postcondition | |--------------------------------------------------| - * | stereotype compartment | - * |--------------------------------------------------| |parameter | | - * |----------- | | activity content | - * ---------------------------------------------------- - * - * {@inheritDoc} - */ - @Override - protected Dimension calculatePreferredSize(final IFigure container, final int hint, final int hint2) { - int minimumWith = 0; - int minimumHeight = 0; - // take in account the content of the figure activity - if ((getContentFigure().getChildren().size() > 0)) { - final IFigure content = (IFigure) getContentFigure().getChildren().get(0); - minimumWith = content.getPreferredSize().width + 50; - minimumHeight = content.getPreferredSize().height + 50; - } - // display name - if (getNameLabel() != null) { - if (getNameLabel().getPreferredSize().width > minimumWith) { - minimumWith = getNameLabel().getPreferredSize().width; - } - minimumHeight += getNameLabel().getPreferredSize().height; - } - if (getHeaderSingleExecution() != null) { - if (getHeaderSingleExecution().getBounds().getTopRight().x > minimumWith) { - minimumWith = getHeaderSingleExecution().getBounds().getTopRight().x; - } - } - return new Dimension(minimumWith, minimumHeight); - } - - /** - * - * {@inheritDoc} - */ - @Override - public void layout(final IFigure container) { - final List childrenList = container.getChildren(); - for (int i = 0; i < container.getChildren().size(); i++) { - final IFigure currentFigure = (IFigure) childrenList.get(i); - if (currentFigure.equals(getLabelContainer()) || currentFigure.equals(getContentFigure())) { - final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); - bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); - if (i > 0) { - bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; - // bound.x = getBounds().x + GAP_X; - } else { - // bound.x = getBounds().x + GAP_X; - bound.y = getBounds().y + GAP_Y; - } - ((IFigure) childrenList.get(i)).setBounds(bound); - } - } - // container - final Rectangle lastRectangle = getContentFigure().getBounds(); - lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y; - lastRectangle.x = container.getBounds().x; - lastRectangle.width = getBounds().width; - getContentFigure().setBounds(lastRectangle); - if (getGMFContentContainer() != null) { - getGMFContentContainer().setBounds(lastRectangle); - } - - // replace compartment stereotype properties - if (getStereotypePropertiesContent() != null) { - final Rectangle pscontainer = getStereotypePropertiesContent().getBounds().getCopy(); - if (getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y > pscontainer.y) { - pscontainer.y = getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y; - } - getStereotypePropertiesContent().setBounds(pscontainer); - } - } - } -} +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.interactionoverview.figures; + +import java.util.List; + +import org.eclipse.draw2d.AbstractLayout; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.MarginBorder; +import org.eclipse.draw2d.OrderedLayout; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.draw2d.ToolbarLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure; +import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure; +import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout; + +public class ActivityAsInteractionFigure extends ActivityFigure { + + private WrappingLabel interactionHeader; + + private RectangleFigure interactionLabelContainer; + + private RectangleFigure interactionContentPane; + + public ActivityAsInteractionFigure() { + createContents(); + // this.corner = 0; //use of roundedCompartmentFigure on ActivityFigure witch have corner set to 0 by default + } + + protected void createContents() { + add(createInteractionFigureHeader()); + add(createContentPane()); + setLayoutManager(new ActivityLayoutManager()); + } + + protected RectangleFigure createContentPane() { + interactionContentPane = new RectangleFigure(); + // Margin allow to add message easily + interactionContentPane.setBorder(new MarginBorder(5, 5, 5, 5)); + interactionContentPane.setFill(false); + interactionContentPane.setOutline(false); + + return interactionContentPane; + } + + protected RectangleFigure createInteractionFigureHeader() { + this.interactionHeader = new WrappingLabel() { + + @Override + public Dimension getPreferredSize(final int wHint, final int hHint) { + final Dimension preferredSize = super.getPreferredSize(wHint, hHint); + if (preferredSize.width == 0) { + return preferredSize; + } + return new Dimension(preferredSize.width + 2, preferredSize.height + 2); + } + }; + + final InteractionFigure interactionFigure = new InteractionFigure(); + interactionFigure.setBorder(new MarginBorder(3, 3, 3, 3)); + interactionFigure.setLayoutManager(new LeftToolbarLayout()); + interactionFigure.add(interactionHeader); + interactionLabelContainer = new RectangleFigure(); + interactionLabelContainer.setOutline(false); + interactionLabelContainer.setFill(false); + interactionLabelContainer.setLayoutManager(new ToolbarLayout(false)); + interactionLabelContainer.add(interactionFigure, OrderedLayout.ALIGN_CENTER); + return interactionLabelContainer; + } + + @Override + public WrappingLabel getNameLabel() { + return interactionHeader; + } + + public RectangleFigure getLabelContainer() { + return interactionLabelContainer; + } + + @Override + public RectangleFigure getContentFigure() { + return interactionContentPane; + } + + /** + * get the gmf container figure of the package + * + * @return the gmf container + */ + @Override + public ShapeCompartmentFigure getGMFContentContainer() { + if (interactionContentPane.getChildren().size() > 0) { + return (ShapeCompartmentFigure) interactionContentPane.getChildren().get(0); + } + return null; + } + + /** + * this is the layout manager in charge to place element in the enumeration + * + */ + private class ActivityLayoutManager extends AbstractLayout { + + /** + * ---------------------------------------------------| |sterotypeLabel| + * precondition | |--------------| | |QualifiedName + * |-----------------------------------| |--------------| | |name | + * postcondition | |--------------------------------------------------| + * | stereotype compartment | + * |--------------------------------------------------| |parameter | | + * |----------- | | activity content | + * ---------------------------------------------------- + * + * {@inheritDoc} + */ + @Override + protected Dimension calculatePreferredSize(final IFigure container, final int hint, final int hint2) { + int minimumWith = 0; + int minimumHeight = 0; + // take in account the content of the figure activity + if ((getContentFigure().getChildren().size() > 0)) { + final IFigure content = (IFigure) getContentFigure().getChildren().get(0); + minimumWith = content.getPreferredSize().width + 50; + minimumHeight = content.getPreferredSize().height + 50; + } + // display name + if (getNameLabel() != null) { + if (getNameLabel().getPreferredSize().width > minimumWith) { + minimumWith = getNameLabel().getPreferredSize().width; + } + minimumHeight += getNameLabel().getPreferredSize().height; + } + if (getHeaderSingleExecution() != null) { + if (getHeaderSingleExecution().getBounds().getTopRight().x > minimumWith) { + minimumWith = getHeaderSingleExecution().getBounds().getTopRight().x; + } + } + return new Dimension(minimumWith, minimumHeight); + } + + /** + * + * {@inheritDoc} + */ + @Override + public void layout(final IFigure container) { + final List childrenList = container.getChildren(); + for (int i = 0; i < container.getChildren().size(); i++) { + final IFigure currentFigure = (IFigure) childrenList.get(i); + if (currentFigure.equals(getLabelContainer()) || currentFigure.equals(getContentFigure())) { + final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); + bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); + if (i > 0) { + bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; + // bound.x = getBounds().x + GAP_X; + } else { + // bound.x = getBounds().x + GAP_X; + bound.y = getBounds().y + GAP_Y; + } + ((IFigure) childrenList.get(i)).setBounds(bound); + } + } + // container + final Rectangle lastRectangle = getContentFigure().getBounds(); + lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y; + lastRectangle.x = container.getBounds().x; + lastRectangle.width = getBounds().width; + getContentFigure().setBounds(lastRectangle); + if (getGMFContentContainer() != null) { + getGMFContentContainer().setBounds(lastRectangle); + } + + // replace compartment stereotype properties + if (getStereotypePropertiesContent() != null) { + final Rectangle pscontainer = getStereotypePropertiesContent().getBounds().getCopy(); + if (getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y > pscontainer.y) { + pscontainer.y = getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y; + } + getStereotypePropertiesContent().setBounds(pscontainer); + } + } + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java index abd32e5e68d..faf553d7def 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java @@ -1,137 +1,137 @@ -/***************************************************************************** - * Copyright (c) 2013 CEA LIST. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.interactionoverview.figures; - -import java.util.List; - -import org.eclipse.draw2d.AbstractLayout; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.MarginBorder; -import org.eclipse.draw2d.OrderedLayout; -import org.eclipse.draw2d.RectangleFigure; -import org.eclipse.draw2d.ToolbarLayout; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure; -import org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout; -import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure; -import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout; - -public class InteractionUseFigure extends CallBehaviorActionFigure { - - protected static String HEADER_NAME = "Ref"; - - protected WrappingLabel interactionHeader; - - protected RectangleFigure interactionLabelContainer; - - protected RectangleFigure interactionContentPane; - - protected WrappingLabel interactionNameLabel; - - public InteractionUseFigure() { - createContents(); - this.corner = 0; - } - - protected void createContents() { - add(createInteractionFigureHeader()); - add(createContentPane()); - setLayoutManager(new InteractionUseLayoutManager()); - } - - protected class InteractionUseLayoutManager extends AbstractLayout { - - @Override - public void layout(final IFigure container) { - final List childrenList = container.getChildren(); - for (int i = 0; i < container.getChildren().size(); i++) { - final IFigure currentFigure = (IFigure) childrenList.get(i); - if (currentFigure.equals(interactionLabelContainer) || currentFigure.equals(interactionContentPane)) { - final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); - bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); - if (i > 0) { - bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; - } else { - bound.y = getBounds().y; - } - ((IFigure) childrenList.get(i)).setBounds(bound); - } - } - - } - - @Override - protected Dimension calculatePreferredSize(final IFigure container, final int wHint, final int hHint) { - return new Dimension(-1, -1); - } - - } - - protected RectangleFigure createContentPane() { - - interactionNameLabel = new WrappingLabel(); - interactionContentPane = new RectangleFigure(); - // Margin allow to add message easily - interactionContentPane.setBorder(new MarginBorder(5, 5, 5, 5)); - interactionContentPane.setFill(false); - interactionContentPane.setOutline(false); - interactionContentPane.setLayoutManager(new CenterLayout()); - interactionContentPane.add(interactionNameLabel); - return interactionContentPane; - } - - protected RectangleFigure createInteractionFigureHeader() { - this.interactionHeader = new WrappingLabel() { - - @Override - public Dimension getPreferredSize(final int wHint, final int hHint) { - final Dimension preferredSize = super.getPreferredSize(wHint, hHint); - if (preferredSize.width == 0) { - return preferredSize; - } - return new Dimension(preferredSize.width + 2, preferredSize.height + 2); - } - }; - - interactionHeader.setText(HEADER_NAME); - final InteractionFigure interactionFigure = new InteractionFigure(); - interactionFigure.setBorder(new MarginBorder(3, 3, 3, 3)); - interactionFigure.setLayoutManager(new LeftToolbarLayout()); - interactionFigure.add(interactionHeader); - interactionLabelContainer = new RectangleFigure(); - interactionLabelContainer.setOutline(false); - interactionLabelContainer.setFill(false); - interactionLabelContainer.setLayoutManager(new ToolbarLayout(false)); - interactionLabelContainer.add(interactionFigure, OrderedLayout.ALIGN_CENTER); - return interactionLabelContainer; - } - - @Override - public WrappingLabel getNameLabel() { - return interactionNameLabel; - } - - /** - * get the gmf container figure of the package - * - * @return the gmf container - */ - public ShapeCompartmentFigure getGMFContentContainer() { - if (interactionContentPane.getChildren().size() > 0) { - return (ShapeCompartmentFigure) interactionContentPane.getChildren().get(0); - } - return null; - } - -} +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.interactionoverview.figures; + +import java.util.List; + +import org.eclipse.draw2d.AbstractLayout; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.MarginBorder; +import org.eclipse.draw2d.OrderedLayout; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.draw2d.ToolbarLayout; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure; +import org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout; +import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure; +import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout; + +public class InteractionUseFigure extends CallBehaviorActionFigure { + + protected static String HEADER_NAME = "Ref"; + + protected WrappingLabel interactionHeader; + + protected RectangleFigure interactionLabelContainer; + + protected RectangleFigure interactionContentPane; + + protected WrappingLabel interactionNameLabel; + + public InteractionUseFigure() { + createContents(); + this.setCornerDimensions(new Dimension()); + } + + protected void createContents() { + add(createInteractionFigureHeader()); + add(createContentPane()); + setLayoutManager(new InteractionUseLayoutManager()); + } + + protected class InteractionUseLayoutManager extends AbstractLayout { + + @Override + public void layout(final IFigure container) { + final List childrenList = container.getChildren(); + for (int i = 0; i < container.getChildren().size(); i++) { + final IFigure currentFigure = (IFigure) childrenList.get(i); + if (currentFigure.equals(interactionLabelContainer) || currentFigure.equals(interactionContentPane)) { + final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); + bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); + if (i > 0) { + bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; + } else { + bound.y = getBounds().y; + } + ((IFigure) childrenList.get(i)).setBounds(bound); + } + } + + } + + @Override + protected Dimension calculatePreferredSize(final IFigure container, final int wHint, final int hHint) { + return new Dimension(-1, -1); + } + + } + + protected RectangleFigure createContentPane() { + + interactionNameLabel = new WrappingLabel(); + interactionContentPane = new RectangleFigure(); + // Margin allow to add message easily + interactionContentPane.setBorder(new MarginBorder(5, 5, 5, 5)); + interactionContentPane.setFill(false); + interactionContentPane.setOutline(false); + interactionContentPane.setLayoutManager(new CenterLayout()); + interactionContentPane.add(interactionNameLabel); + return interactionContentPane; + } + + protected RectangleFigure createInteractionFigureHeader() { + this.interactionHeader = new WrappingLabel() { + + @Override + public Dimension getPreferredSize(final int wHint, final int hHint) { + final Dimension preferredSize = super.getPreferredSize(wHint, hHint); + if (preferredSize.width == 0) { + return preferredSize; + } + return new Dimension(preferredSize.width + 2, preferredSize.height + 2); + } + }; + + interactionHeader.setText(HEADER_NAME); + final InteractionFigure interactionFigure = new InteractionFigure(); + interactionFigure.setBorder(new MarginBorder(3, 3, 3, 3)); + interactionFigure.setLayoutManager(new LeftToolbarLayout()); + interactionFigure.add(interactionHeader); + interactionLabelContainer = new RectangleFigure(); + interactionLabelContainer.setOutline(false); + interactionLabelContainer.setFill(false); + interactionLabelContainer.setLayoutManager(new ToolbarLayout(false)); + interactionLabelContainer.add(interactionFigure, OrderedLayout.ALIGN_CENTER); + return interactionLabelContainer; + } + + @Override + public WrappingLabel getNameLabel() { + return interactionNameLabel; + } + + /** + * get the gmf container figure of the package + * + * @return the gmf container + */ + public ShapeCompartmentFigure getGMFContentContainer() { + if (interactionContentPane.getChildren().size() > 0) { + return (ShapeCompartmentFigure) interactionContentPane.getChildren().get(0); + } + return null; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java index 89970a58b33..ccf64408eb9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java @@ -1,127 +1,127 @@ -/***************************************************************************** - * Copyright (c) 2013 CEA LIST. - * - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - *****************************************************************************/ -package org.eclipse.papyrus.uml.diagram.interactionoverview.figures; - -import java.util.List; - -import org.eclipse.draw2d.AbstractLayout; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.ImageFigure; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; -import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CreateDiagramImage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; - - -public class InteractionWithSnapshotFigure extends InteractionUseFigure { - - protected static String HEADER_NAME = "SD"; - - protected ImageFigure imageFigure; - - protected Image originalSnapshot; - - protected Image currentSnapshot; - - public InteractionWithSnapshotFigure() { - this.corner = 0; - originalSnapshot = null; - currentSnapshot = null; - } - - @Override - protected void createContents() { - add(createInteractionFigureHeader()); - add(createImagePane()); - setLayoutManager(new InteractionLayoutManager()); - interactionHeader.setText(HEADER_NAME); - } - - protected class InteractionLayoutManager extends AbstractLayout { - - @Override - public void layout(final IFigure container) { - final List childrenList = container.getChildren(); - for (int i = 0; i < container.getChildren().size(); i++) { - final IFigure currentFigure = (IFigure) childrenList.get(i); - if (currentFigure.equals(interactionLabelContainer) || currentFigure.equals(imageFigure)) { - final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); - bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); - if (i > 0) { - bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; - } else { - bound.y = getBounds().y; - } - ((IFigure) childrenList.get(i)).setBounds(bound); - - } - } - - } - - @Override - protected Dimension calculatePreferredSize(final IFigure container, final int wHint, final int hHint) { - return new Dimension(-1, -1); - } - - } - - @Override - public WrappingLabel getNameLabel() { - return interactionHeader; - } - - protected IFigure createImagePane() { - return imageFigure = new ImageFigure(); - } - - - public void setSnapshot(final Image image) { - if (image != null) { - originalSnapshot = image; - currentSnapshot = new Image(Display.getDefault(), image, SWT.IMAGE_COPY); - imageFigure.setImage(image); - } - } - - public void updateSnapshot(final Rectangle newBounds) { - if (originalSnapshot != null) { - final Image newImage = CreateDiagramImage.resize(originalSnapshot, newBounds.width, newBounds.height); - imageFigure.setImage(newImage); - currentSnapshot.dispose(); - currentSnapshot = newImage; - } - } - - // Warning before using this method, a method to set the image has to be use right after - // in the case of undoing "update snapshot" command it calls a refresh to act like the editor just opened - public void resetImage() { - imageFigure.setImage(null); - originalSnapshot.dispose(); - currentSnapshot.dispose(); - } - - public ImageFigure getImageFigure() { - return imageFigure; - } - - public boolean isImageSizeFitsImageFigure() { - return (isImageFigureHasBound() && getBounds().width == imageFigure.getBounds().height); - } - - private boolean isImageFigureHasBound() { - return imageFigure.getBounds().height != 0 && imageFigure.getBounds().width != 0; - } - -} +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.interactionoverview.figures; + +import java.util.List; + +import org.eclipse.draw2d.AbstractLayout; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.ImageFigure; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CreateDiagramImage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; + + +public class InteractionWithSnapshotFigure extends InteractionUseFigure { + + protected static String HEADER_NAME = "SD"; + + protected ImageFigure imageFigure; + + protected Image originalSnapshot; + + protected Image currentSnapshot; + + public InteractionWithSnapshotFigure() { + this.setCornerDimensions(new Dimension()); + originalSnapshot = null; + currentSnapshot = null; + } + + @Override + protected void createContents() { + add(createInteractionFigureHeader()); + add(createImagePane()); + setLayoutManager(new InteractionLayoutManager()); + interactionHeader.setText(HEADER_NAME); + } + + protected class InteractionLayoutManager extends AbstractLayout { + + @Override + public void layout(final IFigure container) { + final List childrenList = container.getChildren(); + for (int i = 0; i < container.getChildren().size(); i++) { + final IFigure currentFigure = (IFigure) childrenList.get(i); + if (currentFigure.equals(interactionLabelContainer) || currentFigure.equals(imageFigure)) { + final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds()); + bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize()); + if (i > 0) { + bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1; + } else { + bound.y = getBounds().y; + } + ((IFigure) childrenList.get(i)).setBounds(bound); + + } + } + + } + + @Override + protected Dimension calculatePreferredSize(final IFigure container, final int wHint, final int hHint) { + return new Dimension(-1, -1); + } + + } + + @Override + public WrappingLabel getNameLabel() { + return interactionHeader; + } + + protected IFigure createImagePane() { + return imageFigure = new ImageFigure(); + } + + + public void setSnapshot(final Image image) { + if (image != null) { + originalSnapshot = image; + currentSnapshot = new Image(Display.getDefault(), image, SWT.IMAGE_COPY); + imageFigure.setImage(image); + } + } + + public void updateSnapshot(final Rectangle newBounds) { + if (originalSnapshot != null) { + final Image newImage = CreateDiagramImage.resize(originalSnapshot, newBounds.width, newBounds.height); + imageFigure.setImage(newImage); + currentSnapshot.dispose(); + currentSnapshot = newImage; + } + } + + // Warning before using this method, a method to set the image has to be use right after + // in the case of undoing "update snapshot" command it calls a refresh to act like the editor just opened + public void resetImage() { + imageFigure.setImage(null); + originalSnapshot.dispose(); + currentSnapshot.dispose(); + } + + public ImageFigure getImageFigure() { + return imageFigure; + } + + public boolean isImageSizeFitsImageFigure() { + return (isImageFigureHasBound() && getBounds().width == imageFigure.getBounds().height); + } + + private boolean isImageFigureHasBound() { + return imageFigure.getBounds().height != 0 && imageFigure.getBounds().width != 0; + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/collaborationuse/xtext/generator/UmlCollaborationUseGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/collaborationuse/xtext/generator/UmlCollaborationUseGenerator.java index b828d309786..315cd6b4231 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/collaborationuse/xtext/generator/UmlCollaborationUseGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/collaborationuse/xtext/generator/UmlCollaborationUseGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UmlCollaborationUseGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/common/xtext/generator/UmlCommonGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/common/xtext/generator/UmlCommonGenerator.java index f2be3a4c2bc..4cccdef9c49 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/common/xtext/generator/UmlCommonGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/common/xtext/generator/UmlCommonGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UmlCommonGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/connectionpointreference/xtext/generator/UMLConnectionPointReferenceGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/connectionpointreference/xtext/generator/UMLConnectionPointReferenceGenerator.java index 097ebea9113..8d7c5e5035b 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/connectionpointreference/xtext/generator/UMLConnectionPointReferenceGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/connectionpointreference/xtext/generator/UMLConnectionPointReferenceGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UMLConnectionPointReferenceGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/message/xtext/generator/UmlMessageGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/message/xtext/generator/UmlMessageGenerator.java index f470a7f7943..7698dd599ca 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/message/xtext/generator/UmlMessageGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/message/xtext/generator/UmlMessageGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UmlMessageGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java index 13dbee778bf..1e746d12e70 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UmlParameterGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/port/xtext/generator/UmlPortGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/port/xtext/generator/UmlPortGenerator.java index b1da532989a..0cf4b0d5454 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/port/xtext/generator/UmlPortGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/port/xtext/generator/UmlPortGenerator.java @@ -9,12 +9,11 @@ import org.eclipse.xtext.generator.IGenerator; /** * Generates code from your model files on save. - * + * * see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration */ @SuppressWarnings("all") public class UmlPortGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/property/xtext/generator/UmlPropertyGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/property/xtext/generator/UmlPropertyGenerator.java index 2cb54e13260..1781ae6399c 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/property/xtext/generator/UmlPropertyGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/property/xtext/generator/UmlPropertyGenerator.java @@ -1,12 +1,12 @@ /** * Copyright (c) 2012 CEA LIST. - * - * + * + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * CEA LIST - Initial API and implementation */ @@ -18,7 +18,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UmlPropertyGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/state/xtext/generator/UmlStateGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/state/xtext/generator/UmlStateGenerator.java index 8dee33eb82a..e271085d57c 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/state/xtext/generator/UmlStateGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/state/xtext/generator/UmlStateGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class UmlStateGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/generator/AppliedStereotypePropertyGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/generator/AppliedStereotypePropertyGenerator.java index 13c558e7f99..bddab4a85c8 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/generator/AppliedStereotypePropertyGenerator.java +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/generator/AppliedStereotypePropertyGenerator.java @@ -9,7 +9,6 @@ import org.eclipse.xtext.generator.IGenerator; @SuppressWarnings("all") public class AppliedStereotypePropertyGenerator implements IGenerator { - @Override - public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - } + public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { + } } -- cgit v1.2.3