Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCéline Janssens2017-05-03 14:54:24 +0000
committerptessier2017-05-08 14:58:10 +0000
commitfe0a81c2e06572bdafcb1c17638d9c7b9ac7a1df (patch)
treeecd8434c800c862f803c8779230ee7219ff31846
parent50204ad32b0bb8103c3f999599febdf2cfd4833d (diff)
downloadorg.eclipse.papyrus-fe0a81c2e06572bdafcb1c17638d9c7b9ac7a1df.tar.gz
org.eclipse.papyrus-fe0a81c2e06572bdafcb1c17638d9c7b9ac7a1df.tar.xz
org.eclipse.papyrus-fe0a81c2e06572bdafcb1c17638d9c7b9ac7a1df.zip
Bug 489116: [Sequence Diagram] Update Coregion
- Do not use CoRegion Edit Part and Figure - Use Combined Fragment EditPart and Figure - Add CoRegion Field in the Combined Fragment Figure - Paint Brackets if needed TODO: Delete the CombinedFragment2EditPart from the gmfGen Change-Id: Ibfc206c5b42ab1369a098ae59e35c5916654a9b7 Signed-off-by: Céline Janssens <Celine.Janssens@all4tec.net>
-rwxr-xr-xplugins/developer/org.eclipse.papyrus.releng.main.release/release.digest.bak4bin0 -> 29666 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java93
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java92
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java87
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDGateGraphicalNodeEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java96
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java137
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java114
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifelineCreationEditPolicy.java66
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/FixGateViewOnOpening.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/TooltipUtil.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java236
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java164
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java68
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java21
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/BugTest_m7.java8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestMoveAnchorInsideCoRegion_402970.java83
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestTooltip_402964.java163
33 files changed, 345 insertions, 1262 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.releng.main.release/release.digest.bak4 b/plugins/developer/org.eclipse.papyrus.releng.main.release/release.digest.bak4
new file mode 100755
index 00000000000..07208d10e3d
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.releng.main.release/release.digest.bak4
Binary files differ
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 491d87bd54f..c8dbf691bfc 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
@@ -72,7 +72,7 @@ public abstract class RoundedCompartmentEditPart extends NamedElementEditPart {
private static final int DEFAULT_SHADOW_WIDTH = 4;
/** The namedStyle Listener */
- private IChangeListener namedStyleListener = new IChangeListener() {
+ protected IChangeListener namedStyleListener = new IChangeListener() {
@Override
public void handleChange(ChangeEvent event) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java
index eccd48b3fdc..83e0d1aa06f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java
@@ -8,17 +8,19 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Céline Janssens (celine.janssens@all4tec.net) - Add Coregion functionnality
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-import org.eclipse.draw2d.IFigure;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure;
import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.InteractionOperatorKind;
/**
* @author PT202707
@@ -26,9 +28,9 @@ import org.eclipse.uml2.uml.CombinedFragment;
*
*/
public class CCombinedFragmentEditPart extends CombinedFragmentEditPart {
- public static int DEFAULT_HEIGHT=60;
- public static int DEFAULT_WIDTH=40;
-
+ public static int DEFAULT_HEIGHT = 60;
+ public static int DEFAULT_WIDTH = 40;
+
/**
* Constructor.
@@ -38,7 +40,7 @@ public class CCombinedFragmentEditPart extends CombinedFragmentEditPart {
public CCombinedFragmentEditPart(View view) {
super(view);
}
-
+
/**
* @see org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
*
@@ -46,43 +48,48 @@ public class CCombinedFragmentEditPart extends CombinedFragmentEditPart {
*/
@Override
protected void handleNotificationEvent(Notification event) {
- // TODO Auto-generated method stub
+
super.handleNotificationEvent(event);
- getPrimaryShape().setName(((CombinedFragment)this.resolveSemanticElement()).getInteractionOperator().getLiteral());
+ getPrimaryShape().setName(((CombinedFragment) this.resolveSemanticElement()).getInteractionOperator().getLiteral());
+ }
+
+
+ /**
+ * Get the Notation Value of the CoRegion boolean
+ *
+ * @return true if the Combined Fragment should be displayed as a CoRegion with Brackets.
+ * This is the case if the Operator is Parallel and if the combinedFragment covers only 1 lifeline
+ */
+ public boolean isCoregion() {
+
+ boolean coregion = false;
+ Element umlElement = getUMLElement();
+
+ if ((umlElement instanceof CombinedFragment) && !(umlElement instanceof ConsiderIgnoreFragment)) {
+
+ InteractionOperatorKind interactionOperator = ((CombinedFragment) umlElement).getInteractionOperator();
+ if (InteractionOperatorKind.PAR_LITERAL.getLiteral() == interactionOperator.getLiteral()) {
+ if (((CombinedFragment) umlElement).getCovereds().size() == 1) {
+ coregion = true;
+ }
+ }
+ }
+
+ return coregion;
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refresh()
+ *
+ * Refresh the CoRegion Value
+ */
+ @Override
+ public void refresh() {
+
+ ((CombinedFragmentFigure) getPrimaryShape()).setCoregion(isCoregion());
+ super.refresh();
+
}
-
-
-// /**
-// * Modify it to avoid scrollbar
-// */
-// protected boolean addFixedChild(EditPart childEditPart) {
-//
-// if (childEditPart instanceof CCombinedCompartmentEditPart) {
-// IFigure pane = getPrimaryShape().getCompartmentFigure();
-// setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
-// pane.add(((CCombinedCompartmentEditPart) childEditPart).getFigure());
-// return true;
-// }
-//
-// return false;
-// }
-//
-// /**
-// * @generated
-// */
-// protected boolean removeFixedChild(EditPart childEditPart) {
-// if (childEditPart instanceof CCombinedCompartmentEditPart) {
-// IFigure pane = getPrimaryShape().getCompartmentFigure();
-// pane.remove(((CCombinedCompartmentEditPart) childEditPart).getFigure());
-// return true;
-// }
-// return false;
-// }
-// protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
-// if (editPart instanceof CCombinedCompartmentEditPart) {
-// return getPrimaryShape().getCompartmentFigure();
-// }
-// return getContentPane();
-// }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java
deleted file mode 100644
index 8ac37f0b90d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomCombinedFragment2ResizeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure;
-import org.eclipse.uml2.uml.Lifeline;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCombinedFragment2EditPart extends CombinedFragment2EditPart {
-
- /**
- * Constructor.
- *
- * @param view
- */
- public CustomCombinedFragment2EditPart(View view) {
- super(view);
- }
-
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new CustomCombinedFragment2ResizeEditPolicy());
- }
-
- /**
- * Overrides to return a ghost central vertical line which will be used for creating message (message will be bound to the lifeline and not the
- * outline of this shape).
- */
- @Override
- public NodeFigure getNodeFigure() {
- NodeFigure centerFigure = null;
- if (getContentPane() instanceof CoRegionCombinedFragmentFigure) {
- centerFigure = ((CoRegionCombinedFragmentFigure) getContentPane()).getCentralVerticalLine();
- }
- return centerFigure;
- }
-
- /**
- * Get the lifeline element where the CoRegion is drawn
- *
- * @return the attached lifeline
- */
- public Lifeline getAttachedLifeline() {
- Lifeline attachedLifeline = null;
- EditPart editPartParent = getParent();
- if (editPartParent instanceof LifelineEditPart) {
- attachedLifeline = (Lifeline) ((LifelineEditPart) editPartParent).resolveSemanticElement();
- }
- return attachedLifeline;
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if ((getModel() != null) && (getModel() == notification.getNotifier())) {
- if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLineWidth();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java
index 49e3daa72a2..5de906500b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java
@@ -792,9 +792,9 @@ public class OLDLifelineEditPart extends LifelineEditPart {
@Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
// Execution specification handling
- if (editPart instanceof AbstractExecutionSpecificationEditPart || editPart instanceof CombinedFragment2EditPart) {
- return getPrimaryShape().getFigureLifelineDotLineFigure();
- }
+ // if (editPart instanceof AbstractExecutionSpecificationEditPart || editPart instanceof CombinedFragment2EditPart) {
+ // return getPrimaryShape().getFigureLifelineDotLineFigure();
+ // }
return super.getContentPaneFor(editPart);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java
deleted file mode 100644
index bd018c3e4eb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*****************************************************************************
-+ * Copyright (c) 2009 CEA
-+ *
-+ *
-+ * All rights reserved. This program and the accompanying materials
-+ * are made available under the terms of the Eclipse Public License v1.0
-+ * which accompanies this distribution, and is available at
-+ * http://www.eclipse.org/legal/epl-v10.html
-+ *
-+ * Contributors:
-+ * CEA LIST - Initial API and implementation
-+ * Alex Paperno - bug 455080
-+ *
-+ *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
-
-public class CustomCombinedFragment2ResizeEditPolicy extends ResizableShapeEditPolicy {
-
- public CustomCombinedFragment2ResizeEditPolicy() {
- setResizeDirections(PositionConstants.SOUTH | PositionConstants.NORTH);
- }
-
- @Override
- protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
- OLDLifelineEditPart lifelineEP = (OLDLifelineEditPart) getHost().getParent();
- request.getMoveDelta().x = 0; // reset offset
- request.getSizeDelta().width = 0; // reset offset
- IFigure feedback = getDragSourceFeedbackFigure();
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- IFigure f = getHostFigure();
- Dimension min = f.getMinimumSize().getCopy();
- Dimension max = f.getMaximumSize().getCopy();
- IMapMode mmode = MapModeUtil.getMapMode(f);
- min.height = mmode.LPtoDP(min.height);
- min.width = mmode.LPtoDP(min.width);
- max.height = mmode.LPtoDP(max.height);
- max.width = mmode.LPtoDP(max.width);
- Rectangle originalBounds = rect.getCopy();
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- rect.width = Math.min(Math.max(rect.width, min.width), max.width);
- rect.height = Math.min(Math.max(rect.height, min.height), max.height);
- if (rect.height == min.height && request.getSizeDelta().height < 0 && request.getMoveDelta().y > 0) { // can't shrink at north
- Point loc = rect.getLocation();
- loc.y = originalBounds.getBottom().y - min.height;
- rect.setLocation(loc);
- request.getSizeDelta().height = min.height - originalBounds.height;
- request.getMoveDelta().y = loc.y - originalBounds.y;
- }
- if (rect.height == min.height && request.getSizeDelta().height < 0 && request.getMoveDelta().y == 0) { // can't shrink at south
- request.getSizeDelta().height = min.height - originalBounds.height;
- }
- // Bound to dotline top
- IFigure dotlineFigure = ((LifelineFigure)lifelineEP.getPrimaryShape()).getFigureLifelineDotLineFigure();
- Rectangle rectParent = dotlineFigure.getBounds().getCopy();
- lifelineEP.getPrimaryShape().translateToAbsolute(rectParent);
- int minLifelineY = rectParent.y + OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT;
- if (rect.y < minLifelineY) {
- request.getMoveDelta().y += minLifelineY - rect.y;
- rect.y = minLifelineY;
- }
- feedback.translateToRelative(rect);
- feedback.setBounds(rect);
- }
-
- @Override
- protected void eraseChangeBoundsFeedback(ChangeBoundsRequest request) {
- super.eraseChangeBoundsFeedback(request);
- HighlightUtil.unhighlight();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
index 74997d6f72b..474c4c5c9b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -74,10 +74,9 @@ import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
import org.eclipse.papyrus.uml.diagram.sequence.command.OLDCreateGateViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CreateLocatedConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.RestoreDurationConstraintLinkCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
@@ -172,8 +171,6 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
elementsVisualId.add(InteractionEditPart.VISUAL_ID);
elementsVisualId.add(InteractionOperandEditPart.VISUAL_ID);
elementsVisualId.add(CombinedFragmentEditPart.VISUAL_ID);
- // CoRegion
- elementsVisualId.add(CombinedFragment2EditPart.VISUAL_ID);
elementsVisualId.add(CommentAnnotatedElementEditPart.VISUAL_ID);
elementsVisualId.add(ConsiderIgnoreFragmentEditPart.VISUAL_ID);
elementsVisualId.add(ContinuationEditPart.VISUAL_ID);
@@ -396,8 +393,6 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
return dropIntervalConstraintInLifeline((IntervalConstraint) semanticElement, nodeVISUALID);
case TimeObservationEditPart.VISUAL_ID:
return dropTimeObservationInLifeline((TimeObservation) semanticElement, nodeVISUALID, location);
- case CombinedFragment2EditPart.VISUAL_ID:
- return dropCoRegion((CombinedFragment) semanticElement, nodeVISUALID, location);
case CommentEditPart.VISUAL_ID:
case ConstraintEditPart.VISUAL_ID:
if (semanticElement instanceof DurationConstraint) {
@@ -1148,39 +1143,6 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
return UnexecutableCommand.INSTANCE;
}
- /**
- * Get the command to drop an code region node
- *
- * @param combinedFragment
- * @param nodeVISUALID
- * @param location
- * @return
- */
- private Command dropCoRegion(CombinedFragment combinedFragment, String nodeVISUALID, Point location) {
- List<View> existingViews = DiagramEditPartsUtil.findViews(combinedFragment, getViewer());
- // only allow one view instance of a single element by diagram
- if (existingViews.isEmpty()) {
- IGraphicalEditPart hostEditpart = (IGraphicalEditPart) getHost();
- EObject element = hostEditpart.getNotationView().getElement();
- if (element instanceof Lifeline) {
- IHintedType type = ((IHintedType) getUMLElementType(nodeVISUALID));
- String semanticHint = null;
- if (type != null) {
- semanticHint = type.getSemanticHint();
- }
- IAdaptable elementAdapter = new EObjectAdapter(combinedFragment);
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, semanticHint, ViewUtil.APPEND, true, getDiagramPreferencesHint());
- CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
- createViewRequest.setLocation(location);
- // "ask" the host for a command associated with the CreateViewRequest
- Command command = getHost().getCommand(createViewRequest);
- // set the viewdescriptor as result
- // it then can be used as an adaptable to retrieve the View
- return new ICommandProxy(new CommandProxyWithResult(command, descriptor));
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
/**
* Get the advised bounds to drop an execution specification
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java
index 789f2147060..d058e85a361 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java
@@ -51,7 +51,6 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnecti
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.command.OLDCreateGateViewCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -127,7 +126,7 @@ public class InteractionGraphicalNodeEditPolicy extends OLDGatesHolderGraphicalN
EditPart sourceEditPart = request.getSourceEditPart();
EObject source = ViewUtil.resolveSemanticElement((View) sourceEditPart.getModel());
// ignore CoRegion
- if (!(sourceEditPart instanceof CombinedFragment2EditPart) && (source instanceof CombinedFragment || source instanceof Interaction || source instanceof InteractionUse)) {
+ if ((source instanceof CombinedFragment || source instanceof Interaction || source instanceof InteractionUse)) {
Point location = null;
IGraphicalEditPart adapter = (IGraphicalEditPart) sourceEditPart.getAdapter(IGraphicalEditPart.class);
TransactionalEditingDomain editingDomain = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
index a382a4f53e5..50d65031af6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
@@ -44,15 +44,13 @@ import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.command.OLDCreateGateViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers.MessageRouter;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.util.GateHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageDeleteHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationMoveHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
import org.eclipse.uml2.uml.CombinedFragment;
@@ -187,7 +185,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends OLDSequenceGraphicalNo
command = LifelineMessageCreateHelper.reconnectMessageCreateTarget(request, command);
}
if (request.getConnectionEditPart() instanceof MessageDeleteEditPart && request.getTarget() instanceof LifelineEditPart) {
- // command = LifelineMessageDeleteHelper.getReconnectMessageDeleteTargetCommand(request, command);
+ // command = LifelineMessageDeleteHelper.getReconnectMessageDeleteTargetCommand(request, command);
}
}
return command;
@@ -277,7 +275,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends OLDSequenceGraphicalNo
*/
String semanticHint = viewRequest.getConnectionViewAndElementDescriptor().getSemanticHint();
// Ignore CoRegion.
- if (!(sourceEP instanceof CombinedFragment2EditPart) && (((IHintedType) (UMLElementTypes.Message_AsynchEdge)).getSemanticHint().equals(semanticHint) || ((IHintedType) (UMLElementTypes.Message_ReplyEdge)).getSemanticHint().equals(semanticHint))) {
+ if ((((IHintedType) (UMLElementTypes.Message_AsynchEdge)).getSemanticHint().equals(semanticHint) || ((IHintedType) (UMLElementTypes.Message_ReplyEdge)).getSemanticHint().equals(semanticHint))) {
if (source instanceof CombinedFragment || source instanceof Interaction || source instanceof InteractionUse) {
CompoundCommand cc = new CompoundCommand("Redirect to Gate");
Point location = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDGateGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDGateGraphicalNodeEditPolicy.java
index 4480ff6715c..4aa1295420d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDGateGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDGateGraphicalNodeEditPolicy.java
@@ -41,7 +41,6 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.C
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.command.OLDCreateGateViewCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDGateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.util.GateHelper;
@@ -81,7 +80,7 @@ public class OLDGateGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
*/
String semanticHint = viewRequest.getConnectionViewAndElementDescriptor().getSemanticHint();
// Ignore CoRegion.
- if (!(sourceEP instanceof CombinedFragment2EditPart) && (((IHintedType) (UMLElementTypes.Message_AsynchEdge)).getSemanticHint().equals(semanticHint) || ((IHintedType) (UMLElementTypes.Message_ReplyEdge)).getSemanticHint().equals(semanticHint))) {
+ if ((((IHintedType) (UMLElementTypes.Message_AsynchEdge)).getSemanticHint().equals(semanticHint) || ((IHintedType) (UMLElementTypes.Message_ReplyEdge)).getSemanticHint().equals(semanticHint))) {
if (source instanceof CombinedFragment || source instanceof Interaction || source instanceof InteractionUse) {
CompoundCommand cc = new CompoundCommand("Redirect to Gate");
Point location = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java
index 318c85b9c9b..fb2e3664d45 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java
@@ -51,15 +51,13 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
import org.eclipse.papyrus.uml.diagram.common.draw2d.LifelineDotLineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomZOrderCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomDurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.PreserveAnchorsPositionCommandEx;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.StateInvariantResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.PreserveAnchorsPositionCommandEx;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -70,6 +68,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
/**
* The custom LayoutEditPolicy for LifelineEditPart.
+ *
* @deprecated will be removed in Oxygen
*/
public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
@@ -110,7 +109,7 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
private static final String CO_REGION_HINT = ((IHintedType) UMLElementTypes.CombinedFragment_CoRegionShape).getSemanticHint();
private static final String DESTRUCTION_OCCURANCE_SPECIFICATION_HINT = ((IHintedType) UMLElementTypes.DestructionOccurrenceSpecification_Shape).getSemanticHint();
-
+
@Override
public EditPart getTargetEditPart(Request request) {
EditPart targetEditPart = super.getTargetEditPart(request);
@@ -250,8 +249,8 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
switch (UMLVisualIDRegistry.getVisualID(childView)) {
case StateInvariantEditPart.VISUAL_ID:
return new StateInvariantResizableEditPolicy();
- //case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- // return new BorderItemResizableEditPolicy();
+ // case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ // return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -321,7 +320,7 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
private Command getCommandForDestructionOccuranceCreation(CreateViewRequest cvr, ViewDescriptor viewDescriptor) {
if (cvr.getLocation() == null) {
- return UnexecutableCommand.INSTANCE;
+ return UnexecutableCommand.INSTANCE;
}
LifelineEditPart lifelineEP = (LifelineEditPart) getHost();
// Translate the absolute location to relative
@@ -332,7 +331,7 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
command = getSetLifelineHeightCommand(command, lifelineEP, location.y);
return command;
}
-
+
private Rectangle getCreateExecuteSpecificationBounds(Point location, Dimension size, String semanticHint) {
Point newLocation = location == null ? new Point() : location.getCopy();
if (newLocation.x < 0 || newLocation.y < 0) {
@@ -379,10 +378,10 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
IFigure figure = externalExecutionSpecificationEP.getFigure();
Rectangle bounds = figure.getBounds().getCopy();
View view = externalExecutionSpecificationEP.getNotationView();
- // Handle the case of ExecutionSpecification being resized in the same compound command
+ // Handle the case of ExecutionSpecification being resized in the same compound command
if (view instanceof Shape && ((Shape) view).getLayoutConstraint() instanceof Bounds) {
Bounds newBounds = (Bounds) ((Shape) view).getLayoutConstraint();
- bounds.height = newBounds.getHeight();
+ bounds.height = newBounds.getHeight();
}
if (!bounds.contains(newLocation) || bounds.x > newLocation.x) {
continue;
@@ -441,7 +440,7 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
if (childBounds.y - spacingY < rect.y) {
rect.height += rect.y - childBounds.y + spacingY;
rect.y = childBounds.y - spacingY;
- } else if (childBounds.bottom() + spacingY> rect.bottom()) {
+ } else if (childBounds.bottom() + spacingY > rect.bottom()) {
rect.height = childBounds.bottom() - rect.y + spacingY;
} else {
return null;
@@ -538,7 +537,7 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
* @return the height defined in the create request or a default value depending on the created figure
*/
private int getFigureHeight(String semanticHint, Dimension size) {
- int newHeight=10;
+ int newHeight = 10;
if (TIME_OBSERVATION_HINT.equals(semanticHint) || TIME_CONSTRAINT_HINT.equals(semanticHint)) {
// height for a time bar (takes precedence on request's size)
newHeight = TIME_BAR_HEIGHT;
@@ -668,13 +667,12 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
executionSpecificationEP.getFigure().translateToRelative(newBounds);
// Remove X component of the alignment
newBounds.x = oldBounds.x;
- }
- else {
+ } else {
Dimension unZoomedMoveDelta = new Dimension(request.getMoveDelta().x, request.getMoveDelta().y);
executionSpecificationEP.getFigure().translateToRelative(unZoomedMoveDelta);
newBounds.x += unZoomedMoveDelta.width;
newBounds.y += unZoomedMoveDelta.height;
-
+
Dimension unZoomedSizeDelta = newSizeDelta.getCopy();
executionSpecificationEP.getFigure().translateToRelative(unZoomedSizeDelta);
newBounds.height += unZoomedSizeDelta.height;
@@ -720,34 +718,34 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
compoundCmd.add(new ICommandProxy(new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(executionSpecificationEP, new Dimension(realMoveDelta.width, realMoveDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y,
executionSpecificationEP.getFigure(), request.getResizeDirection())));
}
- if (ep instanceof CombinedFragment2EditPart) {
- CombinedFragment2EditPart cf2EP = (CombinedFragment2EditPart) ep;
- IFigure cf2Figure = cf2EP.getFigure();
- Rectangle bounds = cf2Figure.getBounds().getCopy();
- cf2Figure.getParent().translateToAbsolute(bounds);
- Dimension sizeDelta = request.getSizeDelta();
- if (sizeDelta != null) {
- if (sizeDelta.width != 0) {
- return UnexecutableCommand.INSTANCE;
- }
- bounds.resize(sizeDelta);
- }
- Point moveDelta = request.getMoveDelta();
- if (moveDelta != null) {
- bounds.translate(moveDelta);
- }
- // Create and add the set bounds command to the compound command
- SetBoundsCommand setBoundsCmd = new SetBoundsCommand(cf2EP.getEditingDomain(), "Resize of a CoRegion", cf2EP, getNewBoundsForChild(lifelineEP, bounds, COREGION_INIT_WIDTH));
- compoundCmd.add(new ICommandProxy(setBoundsCmd));
- // keep absolute position of anchors
- if (sizeDelta != null && sizeDelta.height != 0) {
- compoundCmd.add(new ICommandProxy(new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(cf2EP, new Dimension(0, sizeDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y, cf2EP.getPrimaryShape().getCentralVerticalLine(),
- request.getResizeDirection())));
- }
- }
+ // if (ep instanceof CombinedFragment2EditPart) {
+ // CombinedFragment2EditPart cf2EP = (CombinedFragment2EditPart) ep;
+ // IFigure cf2Figure = cf2EP.getFigure();
+ // Rectangle bounds = cf2Figure.getBounds().getCopy();
+ // cf2Figure.getParent().translateToAbsolute(bounds);
+ // Dimension sizeDelta = request.getSizeDelta();
+ // if (sizeDelta != null) {
+ // if (sizeDelta.width != 0) {
+ // return UnexecutableCommand.INSTANCE;
+ // }
+ // bounds.resize(sizeDelta);
+ // }
+ // Point moveDelta = request.getMoveDelta();
+ // if (moveDelta != null) {
+ // bounds.translate(moveDelta);
+ // }
+ // // Create and add the set bounds command to the compound command
+ // SetBoundsCommand setBoundsCmd = new SetBoundsCommand(cf2EP.getEditingDomain(), "Resize of a CoRegion", cf2EP, getNewBoundsForChild(lifelineEP, bounds, COREGION_INIT_WIDTH));
+ // compoundCmd.add(new ICommandProxy(setBoundsCmd));
+ // // keep absolute position of anchors
+ // if (sizeDelta != null && sizeDelta.height != 0) {
+ // compoundCmd.add(new ICommandProxy(new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(cf2EP, new Dimension(0, sizeDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y, cf2EP.getPrimaryShape().getCentralVerticalLine(),
+ // request.getResizeDirection())));
+ // }
+ // }
if (ep instanceof DestructionOccurrenceSpecificationEditPart) {
Rectangle rectLifeline = lifelineEP.getFigure().getBounds();
- compoundCmd = getSetLifelineHeightCommand(compoundCmd,lifelineEP, rectLifeline.height + request.getMoveDelta().y);
+ compoundCmd = getSetLifelineHeightCommand(compoundCmd, lifelineEP, rectLifeline.height + request.getMoveDelta().y);
}
}
if (!compoundCmd.isEmpty()) {
@@ -756,9 +754,9 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
}
return null;
}
-
+
/**
- * Modifies Lifeline's height and keeps anchors' positions intact.
+ * Modifies Lifeline's height and keeps anchors' positions intact.
*
* @param compoundCmd
* command to add to
@@ -767,13 +765,13 @@ public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
* @param newHeight
* new height of the Lifeline
*
- * @return the compound command
+ * @return the compound command
*/
public static CompoundCommand getSetLifelineHeightCommand(CompoundCommand compoundCmd, LifelineEditPart lifelineEP, int newHeight) {
- Rectangle rectLifeline = lifelineEP.getFigure().getBounds() .getCopy();
- Dimension zoomedAddon = new Dimension(0, DESTRUCTION_INIT_SIZE/2);
+ Rectangle rectLifeline = lifelineEP.getFigure().getBounds().getCopy();
+ Dimension zoomedAddon = new Dimension(0, DESTRUCTION_INIT_SIZE / 2);
lifelineEP.getFigure().translateToRelative(zoomedAddon);
- int minimumHeight = ((OLDLifelineEditPart)lifelineEP).getMinimumHeight(-1, true) + zoomedAddon.height;
+ int minimumHeight = ((OLDLifelineEditPart) lifelineEP).getMinimumHeight(-1, true) + zoomedAddon.height;
newHeight = Math.max(newHeight, minimumHeight);
int heightDelta = newHeight - rectLifeline.height;
if (heightDelta == 0) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
index 7d1d663c339..0948385af28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
@@ -57,19 +57,18 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -334,11 +333,7 @@ public class OLDSequenceGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
// The SOURCE MODEL should be calculated when connection started, the scroll bar maybe already changed when connection come to finished.
// request.getExtendedData().put(SequenceRequestConstant.SOURCE_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(sourcePoint, getHost()));
request.getExtendedData().put(SequenceRequestConstant.TARGET_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(targetPoint, getHost()));
- // In case we are creating a connection to/from a CoRegion, we will need the lifeline element where is drawn the CoRegion later in the process.
- EditPart targetEditPart = getTargetEditPart(request);
- if (targetEditPart instanceof CustomCombinedFragment2EditPart) {
- request.getExtendedData().put(SequenceRequestConstant.LIFELINE_GRAPHICAL_CONTAINER, ((CustomCombinedFragment2EditPart) targetEditPart).getAttachedLifeline());
- }
+
// update bendpoints for self link message.
if (connectionFeedback != null && ((IHintedType) UMLElementTypes.Message_AsynchEdge).getSemanticHint().equals(requestHint)) {
updateConnectionBendpoints(request, command);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
deleted file mode 100644
index 09c47f824f8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import java.util.List;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
-
-public class CoRegionCombinedFragmentFigure extends RoundedCompartmentFigure {
-
- // The area (to the left,right, top and bottom) near the border of the Coregion that is sensible to the mouse
- private static final int COREGION_HIT_WIDTH = 6;
-
- private static final int BRACKET_HEIGHT = 7;
-
- private static final int BRACKET_LINE_WIDTH = 3;
-
- /** The DashLine figure where elements will be attached */
- private NodeFigure centralVerticalLine;
-
- /**
- * Constructor
- *
- * @generated
- */
- public CoRegionCombinedFragmentFigure() {
- super();
- // Init centralVerticalLine
- centralVerticalLine = new NodeFigure();
- centralVerticalLine.setParent(this);
- setLineWidth(BRACKET_LINE_WIDTH);
- }
-
- /**
- * Draw the vertical bracket
- *
- * @see org.eclipse.draw2d.Shape#paintFigure(org.eclipse.draw2d.Graphics)
- */
- @Override
- public void paintFigure(Graphics graphics) {
- Rectangle r = getBounds().getCopy();
- graphics.setBackgroundColor(this.getBackgroundColor());
- graphics.setForegroundColor(this.getForegroundColor());
- graphics.setLineWidth(getLineWidth());
- graphics.drawLine(r.x, r.y, r.right() - 1, r.y);
- graphics.drawLine(r.x, r.bottom() - 1, r.right() - 1, r.bottom() - 1);
- graphics.drawLine(r.x, r.y, r.x, r.y + BRACKET_HEIGHT);
- graphics.drawLine(r.right() - 1, r.y + BRACKET_HEIGHT, r.right() - 1, r.y);
- graphics.drawLine(r.right() - 1, r.bottom() - 1, r.right() - 1, r.bottom() - 1 - BRACKET_HEIGHT);
- graphics.drawLine(r.x, r.bottom() - 1, r.x, r.bottom() - 1 - BRACKET_HEIGHT);
- // Refresh the line
- int endY = r.height + r.y;// fixed a issue on height.
- Point pStart = new Point(r.x + r.width / 2, r.y + 1);
- centralVerticalLine.setSize(1, endY - pStart.y);
- centralVerticalLine.setLocation(pStart);
- }
-
- /**
- * @see org.eclipse.draw2d.Figure#containsPoint(int, int)
- */
- @Override
- public boolean containsPoint(int x, int y) {
- Rectangle rect = getBounds();
- // check if point is at the topline of the figure
- if (x > rect.x && x < rect.x + rect.width) {
- if (y > rect.y - COREGION_HIT_WIDTH && y < rect.y + COREGION_HIT_WIDTH) {
- return true;
- }
- }
- // check if point is at the bottom line of the figure
- if (x > rect.x && x < rect.x + rect.width) {
- if (y > rect.y + rect.height - COREGION_HIT_WIDTH && y < rect.y + rect.height + COREGION_HIT_WIDTH) {
- return true;
- }
- }
- // check if point is at the left line of the figure
- if (x > rect.x - COREGION_HIT_WIDTH && x < rect.x + COREGION_HIT_WIDTH) {
- if (y > rect.y && y < rect.y + rect.height) {
- return true;
- }
- }
- // check if point is at the right line of the figure
- if (x > rect.x + rect.width - COREGION_HIT_WIDTH && x < rect.x + rect.width + COREGION_HIT_WIDTH) {
- if (y > rect.y && y < rect.y + rect.height) {
- return true;
- }
- }
- for (IFigure child : (List<IFigure>) getChildren()) {
- Point local = new Point(x, y);
- translateFromParent(local);
- if (child.containsPoint(local)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public Dimension getMinimumSize(int wHint, int hHint) {
- Rectangle bounds = new Rectangle();
- bounds.height = BRACKET_HEIGHT * 2 + OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT;
- bounds.width = -1;
- return bounds.getSize();
- }
-
- /**
- * Get a rectangleFigure representing a central vertical line
- */
- public NodeFigure getCentralVerticalLine() {
- return centralVerticalLine;
- }
-
- @Override
- protected void paintBorder(Graphics graphics) {
- // is empty.
- // CoRegion has specific border that consists of two begin/end brackets. @see CoRegionCombinedFragmentFigure#paintFigure(Graphics graphics)
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
index eaac9b014ef..3c1a7eaea2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
@@ -14,15 +14,15 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.figures;
-import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorder;
/**
@@ -30,28 +30,14 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorde
*/
public class CombinedFragmentFigure extends StereotypeInteractionFigure {
+
+ /**
+ * Height of the Bracket in case of CoRegion in Pixel
+ */
+ private static final int BRACKET_HEIGHT = 30;
private WrappingLabel titleLabel;
private RectangleFigure header;
-
-// @Override
-// protected void createContents() {
-// super.createContents();
-// setShadow(false);
-// interactionContentPane.setOutline(false);
-// interactionContentPane.setOpaque(false);
-// interactionContentPane.setBorder(null);
-// }
-
-// @Override
-// protected RectangleFigure createHeader() {
-// header = super.createHeader();
-// titleLabel = new PapyrusWrappingLabel();
-// titleLabel.setAlignment(PositionConstants.RIGHT);
-// titleLabel.setBorder(new MarginBorder(3, 0, 0, 3));
-// titleLabel.setTextWrap(false);
-// header.add(titleLabel, BorderLayout.RIGHT);
-// return header;
-// }
+ private boolean coRegion;
public WrappingLabel getTitleLabel() {
return titleLabel;
@@ -60,11 +46,11 @@ public class CombinedFragmentFigure extends StereotypeInteractionFigure {
public IFigure getHeaderContainer() {
return header;
}
-
+
@Override
public void setShadow(boolean shadow) {
final int BORDER_WIDTH = 3;
-
+
if (!shadow) {
super.setShadow(shadow);
} else {
@@ -88,5 +74,79 @@ public class CombinedFragmentFigure extends StereotypeInteractionFigure {
parent = parent.getParent();
}
}
-
+
+
+ /**
+ * @see org.eclipse.draw2d.Figure#paint(org.eclipse.draw2d.Graphics)
+ *
+ * @param graphics
+ */
+ @Override
+ public void paint(Graphics graphics) {
+ if (isCoregion()) {
+ Rectangle CBbounds = this.getBounds();
+
+ graphics.pushState();
+
+ Rectangle clipRectangle = new Rectangle();
+ graphics.getClip(clipRectangle);
+ graphics.setClip(clipRectangle.expand(2, 2));
+
+ graphics.setLineWidth(getLineWidth());
+ graphics.setLineStyle(getLineStyle());
+ graphics.setForegroundColor(getForegroundColor());
+ graphics.setBackgroundColor(getBackgroundColor());
+
+
+
+ // Top Bracket Creation
+ PointList list = new PointList();
+ Point topLeft = CBbounds.getTopLeft().getCopy().getTranslated(0, BRACKET_HEIGHT);
+ Point topRight = CBbounds.getTopRight().getCopy().getTranslated(0, BRACKET_HEIGHT);
+
+ list.addPoint(topRight);
+ list.addPoint(CBbounds.getTopRight().getCopy());
+ list.addPoint(CBbounds.getTopLeft().getCopy());
+ list.addPoint(topLeft);
+
+ graphics.drawPolyline(list);
+
+ // Bottom Bracket Creation
+ list = new PointList();
+
+ Point bottomLeft = CBbounds.getBottomLeft().getCopy().getTranslated(0, -BRACKET_HEIGHT);
+ Point bottomRight = CBbounds.getBottomRight().getCopy().getTranslated(0, -BRACKET_HEIGHT);
+
+ list.addPoint(bottomRight);
+ list.addPoint(CBbounds.getBottomRight().getCopy());
+ list.addPoint(CBbounds.getBottomLeft().getCopy());
+ list.addPoint(bottomLeft);
+
+ graphics.drawPolyline(list);
+
+ this.setPreferredSize(new Dimension(40, 100));
+ graphics.popState();
+ } else {
+ super.paint(graphics);
+ }
+ }
+
+
+ /**
+ * @return
+ */
+ public boolean isCoregion() {
+
+ return this.coRegion;
+
+ }
+
+ /**
+ * @return
+ */
+ public void setCoregion(boolean coregion) {
+ this.coRegion = coregion;
+
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java
index b3073cb5c4c..b4b467138e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java
@@ -30,8 +30,6 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomStateInvariantE
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomStateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandGuardEditPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java
index b0e4ee6260b..4b6e247da22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java
@@ -20,18 +20,17 @@ import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.emf.validation.model.IClientSelector;
import org.eclipse.gmf.runtime.notation.Bounds;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -63,7 +62,6 @@ public class CustomValidationProvider extends UMLValidationProvider {
result = result || BehaviorExecutionSpecificationEditPart.VISUAL_ID.equals(id);
// CF and Interaction operands
result = result || CombinedFragmentEditPart.VISUAL_ID.equals(id);
- result = result || CombinedFragment2EditPart.VISUAL_ID.equals(id);
result = result || InteractionOperandEditPart.VISUAL_ID.equals(id);
// Time related : do nothing, the real event support will be also moved
// result = result || TimeConstraintEditPart.VISUAL_ID.equals(id);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifelineCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifelineCreationEditPolicy.java
index 29f5d674b82..31460ff8b43 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifelineCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifelineCreationEditPolicy.java
@@ -37,6 +37,7 @@ import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
*/
public class LifelineCreationEditPolicy extends DefaultCreationEditPolicy {
protected DisplayEvent displayEvent;
+
/**
* @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy#getCreateElementAndViewCommand(org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest)
*
@@ -46,57 +47,59 @@ public class LifelineCreationEditPolicy extends DefaultCreationEditPolicy {
@Override
protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
// Used during the drop from the model explorer
- if( request instanceof CreateViewAndElementRequest){
- CreateViewAndElementRequest req=(CreateViewAndElementRequest)request;
- ViewAndElementDescriptor descriptor=(req).getViewAndElementDescriptor();
+ if (request instanceof CreateViewAndElementRequest) {
+ CreateViewAndElementRequest req = (CreateViewAndElementRequest) request;
+ ViewAndElementDescriptor descriptor = (req).getViewAndElementDescriptor();
IElementType elementType = (IElementType) descriptor.getElementAdapter().getAdapter(IElementType.class);
- if (isControlledByLifeline(elementType)){
+ if (isControlledByLifeline(elementType)) {
// get the element descriptor
- CreateElementRequestAdapter requestAdapter =
- req.getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ CreateElementRequestAdapter requestAdapter = req.getViewAndElementDescriptor().getCreateElementRequestAdapter();
// get the semantic request
- CreateElementRequest createElementRequest =
- (CreateElementRequest) requestAdapter.getAdapter(
- CreateElementRequest.class);
- View view = (View)getHost().getModel();
+ CreateElementRequest createElementRequest = (CreateElementRequest) requestAdapter.getAdapter(
+ CreateElementRequest.class);
+ View view = (View) getHost().getModel();
EObject hostElement = ViewUtil.resolveSemanticElement(view);
createElementRequest.setContainer(hostElement.eContainer());
createElementRequest.setParameter(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.COVERED, hostElement);
// case of Message Occurence Specification
- MessageOccurrenceSpecification mos=displayEvent.getMessageEvent(getHostFigure().getParent().getParent(), ((CreateRequest)request).getLocation());
- if( mos!=null){
+ MessageOccurrenceSpecification mos = displayEvent.getMessageEvent(getHostFigure().getParent().getParent(), ((CreateRequest) request).getLocation());
+ if (mos != null) {
createElementRequest.setParameter(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.REPLACE_EXECUTION_SPECIFICATION_START, mos);
}
}
}
return super.getCreateElementAndViewCommand(request);
}
-
+
/**
- * test if the element Type that is normally not a child of the Lifeline should be controlled by the lifeline.
- * Then The lifeline will be set as the parent editpart, but not as the semantic parent.
+ * test if the element Type that is normally not a child of the Lifeline should be controlled by the lifeline.
+ * Then The lifeline will be set as the parent editpart, but not as the semantic parent.
*
- * This is the case of most of the affixed node.
+ * This is the case of most of the affixed node.
*
- * @param elementType the tested element type
- * @return true if the Lifeline should be the
+ * @param elementType
+ * the tested element type
+ * @return true if the Lifeline should be the
*/
- protected boolean isControlledByLifeline(IElementType elementType){
+ protected boolean isControlledByLifeline(IElementType elementType) {
boolean controlledByLifeline = false;
-
- if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.ACTION_EXECUTION_SPECIFICATION_SHAPE)){
+
+ if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.ACTION_EXECUTION_SPECIFICATION_SHAPE)) {
controlledByLifeline = true;
} else if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.BEHAVIOR_EXECUTION_SPECIFICATION_SHAPE)) {
controlledByLifeline = true;
} else if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.TIME_CONSTRAINT_SHAPE)) {
controlledByLifeline = true;
- } else if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.STATE_INVARIANT_SHAPE)){
+ } else if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.STATE_INVARIANT_SHAPE)) {
controlledByLifeline = true;
- }
-
+ } else if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.COMBINED_FRAGMENT_CO_REGION_SHAPE)) {
+ controlledByLifeline = true;
+ }
+
return controlledByLifeline;
-
+
}
+
/**
* @see org.eclipse.gef.editpolicies.AbstractEditPolicy#setHost(org.eclipse.gef.EditPart)
*
@@ -106,14 +109,15 @@ public class LifelineCreationEditPolicy extends DefaultCreationEditPolicy {
public void setHost(EditPart host) {
// TODO Auto-generated method stub
super.setHost(host);
- displayEvent= new DisplayEvent(getHost());
+ displayEvent = new DisplayEvent(getHost());
}
- /**
- * Return the host's figure.
- * The super calls getFigure(). This is a problem when used with shapecompartments. Instead,
- * return getContextPane(). In shape comaprtments this will return the correct containing figure.
+
+ /**
+ * Return the host's figure.
+ * The super calls getFigure(). This is a problem when used with shapecompartments. Instead,
+ * return getContextPane(). In shape comaprtments this will return the correct containing figure.
*/
protected IFigure getHostFigure() {
- return ((GraphicalEditPart)getHost()).getContentPane();
+ return ((GraphicalEditPart) getHost()).getContentPane();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/FixGateViewOnOpening.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/FixGateViewOnOpening.java
index dd73eb636f9..fdbf854dae6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/FixGateViewOnOpening.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/FixGateViewOnOpening.java
@@ -43,10 +43,8 @@ import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.sequence.command.OLDCreateGateViewCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDGateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.Gate;
import org.eclipse.uml2.uml.Interaction;
@@ -88,10 +86,8 @@ public class FixGateViewOnOpening {
* @param gate
*/
private void doFix(Diagram diagram, Shape parent, Gate gate) {
- // Ignore CoRegion.
- if (UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID).equals(parent.getType())) {
- return;
- }
+
+
View view = findPrimaryView(diagram, gate);
if (view != null) {
return;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java
index 352f975c808..4fe761a401f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java
@@ -20,9 +20,8 @@ import java.util.List;
import org.eclipse.draw2d.IFigure;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
@@ -47,8 +46,6 @@ public class LifelineEditPartUtil {
executionSpecificationList.add((ShapeNodeEditPart) obj);
} else if (obj instanceof CCombinedCompartmentEditPart) {
executionSpecificationList.add((ShapeNodeEditPart) obj);
- } else if (obj instanceof CombinedFragment2EditPart) {
- executionSpecificationList.add((ShapeNodeEditPart) obj);
}
}
return executionSpecificationList;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
index 324e63d4284..82a222c0be3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
@@ -67,12 +67,11 @@ import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.InteractionFragmentHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
@@ -281,7 +280,7 @@ public class SequenceUtil {
List<View> views = DiagramEditPartsUtil.findViews(fragment, lifelineEditPart.getViewer());
for (View view : views) {
EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelineEditPart);
- boolean isCombinedFragment = part instanceof CombinedFragmentEditPart || part instanceof CombinedFragment2EditPart;
+ boolean isCombinedFragment = part instanceof CombinedFragmentEditPart;
boolean isContinuation = part instanceof ContinuationEditPart;
boolean isInteractionOperand = part instanceof InteractionOperandEditPart;
boolean isInteractionUse = part instanceof InteractionUseEditPart;
@@ -669,10 +668,7 @@ public class SequenceUtil {
}
}
}
- // CoRegion
- if (child instanceof CombinedFragment2EditPart) {
- completeOccurrencesMapWithMessages((GraphicalEditPart) child, occurrences);
- }
+
}
// messages to and from the lifeline
completeOccurrencesMapWithMessages(lifelineEditPart, occurrences);
@@ -1030,7 +1026,7 @@ public class SequenceUtil {
* @param ignoreSet
* a set of ift to ignore.
* @return
- * a set containing ift at least partially covered by the rectangle.
+ * a set containing ift at least partially covered by the rectangle.
*/
@SuppressWarnings("unchecked")
public static Set<InteractionFragment> getCoveredInteractionFragments(Rectangle selectionRect, EditPart hostEditPart, Set<InteractionFragment> ignoreSet) {
@@ -1056,7 +1052,7 @@ public class SequenceUtil {
coveredInteractionFragments.add(es.getStart());
coveredInteractionFragments.add(es.getFinish());
}
- }
+ }
}
} else if (ep instanceof ConnectionEditPart) {
ConnectionEditPart cep = (ConnectionEditPart) ep;
@@ -1375,7 +1371,7 @@ public class SequenceUtil {
int maxDeltaWithMiddle = 0;
for (Object child : children) {
// children executions
- if (child instanceof CCombinedCompartmentEditPart || child instanceof BehaviorExecutionSpecificationEditPart || child instanceof CombinedFragment2EditPart) {
+ if (child instanceof CCombinedCompartmentEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
GraphicalEditPart childPart = (GraphicalEditPart) child;
Rectangle absoluteBounds = getAbsoluteBounds(childPart);
// enlarge absolute bounds to contain also the right and bottom edges.
@@ -1508,8 +1504,6 @@ public class SequenceUtil {
return ((InteractionOperandEditPart) containerPart).getContentPane();
} else if (containerPart instanceof CombinedFragmentEditPart) {
return ((CombinedFragmentEditPart) containerPart).getContentPane();
- } else if (containerPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart) containerPart).getContentPane();
} else if (containerPart instanceof ContinuationEditPart) {
return ((ContinuationEditPart) containerPart).getContentPane();
} else if (containerPart instanceof InteractionUseEditPart) {
@@ -1653,7 +1647,8 @@ public class SequenceUtil {
if (editPart instanceof DurationObservationEditPart) {
editPart.installEditPolicy(editPolicy, new ObservationLinkPolicy(editPart));
}
- if (editPart instanceof MessageSyncEditPart || editPart instanceof MessageAsyncEditPart || editPart instanceof MessageReplyEditPart || editPart instanceof MessageCreateEditPart || editPart instanceof MessageDeleteEditPart || editPart instanceof MessageLostEditPart
+ if (editPart instanceof MessageSyncEditPart || editPart instanceof MessageAsyncEditPart || editPart instanceof MessageReplyEditPart || editPart instanceof MessageCreateEditPart || editPart instanceof MessageDeleteEditPart
+ || editPart instanceof MessageLostEditPart
|| editPart instanceof MessageFoundEditPart) {
editPart.installEditPolicy(editPolicy, new ObservationLinkPolicy(editPart));
} else if (editPart instanceof MessageSyncNameEditPart || editPart instanceof MessageAsyncNameEditPart || editPart instanceof MessageReplyNameEditPart || editPart instanceof MessageCreateNameEditPart || editPart instanceof MessageDeleteNameEditPart
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/TooltipUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/TooltipUtil.java
index 8cb5a9e6051..5409ce05012 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/TooltipUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/TooltipUtil.java
@@ -40,7 +40,7 @@ import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorLabelProvider;
@@ -312,7 +312,7 @@ public class TooltipUtil {
*/
@Override
public String getTooltipName() {
- if (editPart instanceof CombinedFragment2EditPart) {
+ if (editPart instanceof CCombinedFragmentEditPart && ((CCombinedFragmentEditPart) editPart).isCoregion()) {
return "Co Region";
}
EObject semanticElement = getSemanticElement(editPart);
@@ -401,7 +401,7 @@ public class TooltipUtil {
}
descBuf.append(label);
descBuf.append("\n");
- if (semanticElement instanceof CombinedFragment && !(editPart instanceof CombinedFragment2EditPart)) {
+ if (semanticElement instanceof CombinedFragment && !((editPart instanceof CCombinedFragmentEditPart) && ((CCombinedFragmentEditPart) editPart).isCoregion())) {
descBuf.append("operator: ");
InteractionOperatorKind operator = ((CombinedFragment) semanticElement).getInteractionOperator();
if (operator != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
index a0819267291..86d112a81d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
@@ -2394,13 +2394,6 @@
genNodes="/0/@diagram/@childNodes.14"/>
<entries
xsi:type="gmfgen:ToolEntry"
- title="CoRegion"
- description="Create a CoRegion"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- genNodes="/0/@diagram/@childNodes.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
title="Duration Observation"
description="Create a Duration Observation on a Message"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
@@ -7768,6 +7761,5 @@
genView="/0/@diagram/@childNodes.18/@labels.0"
visualID="Gate_NameLabel"/>
</child>
- <child/>
</papyrusgmfgenextension:VisualIDOverride>
</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
deleted file mode 100644
index 3d9ec843874..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
+++ /dev/null
@@ -1,236 +0,0 @@
-
-/**
- * Copyright (c) 2016 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-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.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class CombinedFragment2EditPart extends RoundedCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final String VISUAL_ID = "CombinedFragment_CoRegionShape";
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CombinedFragment2EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
-
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragment2CanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new LifelineChildGraphicalNodeEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- String vid = UMLVisualIDRegistry.getVisualID(childView);
- if (vid != null) {
- switch (vid) {
- case GateEditPart.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;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new CoRegionCombinedFragmentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure
- * org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure
- *
- * @generated
- */
- @Override
- public CoRegionCombinedFragmentFigure getPrimaryShape() {
- return (CoRegionCombinedFragmentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- @Override
- protected NodeFigure createMainFigure() {
- return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @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) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
index 7b5347b6f7b..a7e40a73c66 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
@@ -82,9 +82,6 @@ public class UMLEditPartFactory implements EditPartFactory {
case StateInvariantLabelEditPart.VISUAL_ID:
return new StateInvariantLabelEditPart(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return new CombinedFragment2EditPart(view);
-
case TimeConstraintEditPart.VISUAL_ID:
return new TimeConstraintEditPart(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
index bdf063bfdda..1fcc014231e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
@@ -33,7 +33,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
@@ -407,10 +406,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
@@ -774,96 +769,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
return result.toArray();
}
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForCombinedFragment2EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(
- Messages.NavigatorGroupName_CombinedFragment_CoRegionShape_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(
- Messages.NavigatorGroupName_CombinedFragment_CoRegionShape_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
-
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageSyncEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageSyncEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageAsyncEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageAsyncEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageReplyEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageReplyEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageCreateEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageCreateEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageDeleteEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageDeleteEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageLostEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageLostEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageFoundEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(MessageFoundEditPart.VISUAL_ID));
-
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
-
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
-
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
-
- return result.toArray();
- }
/**
*
@@ -2059,10 +1964,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -2135,10 +2036,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -2248,10 +2145,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -2324,10 +2217,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -2437,10 +2326,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -2513,10 +2398,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -2626,10 +2507,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -2702,10 +2579,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -2815,10 +2688,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -2891,10 +2760,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -3004,10 +2869,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -3080,10 +2941,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -3193,10 +3050,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -3269,10 +3122,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
@@ -3378,10 +3227,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -3576,10 +3421,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
-
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view),
UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
@@ -3821,10 +3662,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
return getViewChildrenForStateInvariantEditPart(view, parentElement);
}
- case CombinedFragment2EditPart.VISUAL_ID: {
- // modification of the template to avoid mistake of 65kb.
- return getViewChildrenForCombinedFragment2EditPart(view, parentElement);
- }
+
case TimeConstraintEditPart.VISUAL_ID: {
// modification of the template to avoid mistake of 65kb.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
index 4493c7bb14c..bea004e648e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
@@ -27,7 +27,6 @@ import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.ViewerLabel;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
@@ -184,9 +183,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
case StateInvariantEditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/uml2/5.0.0/UML?StateInvariant", //$NON-NLS-1$
UMLElementTypes.StateInvariant_Shape);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/5.0.0/UML?CombinedFragment", //$NON-NLS-1$
- UMLElementTypes.CombinedFragment_CoRegionShape);
case TimeConstraintEditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/uml2/5.0.0/UML?TimeConstraint", //$NON-NLS-1$
UMLElementTypes.TimeConstraint_Shape);
@@ -312,8 +308,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
return getContinuation_ShapeText(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_ShapeText(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_CoRegionShapeText(view);
+
case TimeConstraintEditPart.VISUAL_ID:
return getTimeConstraint_ShapeText(view);
case TimeObservationEditPart.VISUAL_ID:
@@ -546,19 +541,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
}
}
- /**
- * @generated
- */
- private String getCombinedFragment_CoRegionShapeText(View view) {
- CombinedFragment domainModelElement = (CombinedFragment) view.getElement();
- if (domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance()
- .logError("No domain element for view with visualID = CombinedFragment_CoRegionShape"); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
+
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
index c344a45be26..bd504b58efc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
@@ -31,7 +31,6 @@ import org.eclipse.papyrus.uml.diagram.common.helper.TimeObservationHelper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
@@ -129,8 +128,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getInteractionUse_Shape_SemanticChildren(view);
case LifelineEditPart.VISUAL_ID:
return getLifeline_Shape_SemanticChildren(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_CoRegionShape_SemanticChildren(view);
case InteractionInteractionCompartmentEditPart.VISUAL_ID:
return getInteraction_SubfragmentCompartment_SemanticChildren(view);
case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
@@ -254,11 +251,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
if (ae.getCovereds().size() > 0 && ae.getCovereds().get(0) == modelElement) {
result.add(new UMLNodeDescriptor(ae, visualID));
}
- } else if (CombinedFragment2EditPart.VISUAL_ID.equals(visualID)) {
- CombinedFragment ae = (CombinedFragment) nextValue;
- if (ae.getCovereds().size() > 0 && ae.getCovereds().get(0) == modelElement) {
- result.add(new UMLNodeDescriptor(ae, visualID));
- }
}
}
}
@@ -310,13 +302,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- public List<UMLNodeDescriptor> getCombinedFragment_CoRegionShape_SemanticChildren(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
@Override
public List<UMLLinkDescriptor> getContainedLinks(View view) {
String vid = UMLVisualIDRegistry.getVisualID(view);
@@ -344,8 +329,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getBehaviorExecutionSpecification_Shape_ContainedLinks(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_Shape_ContainedLinks(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_CoRegionShape_ContainedLinks(view);
case TimeConstraintEditPart.VISUAL_ID:
return getTimeConstraint_Shape_ContainedLinks(view);
case TimeObservationEditPart.VISUAL_ID:
@@ -413,8 +396,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getBehaviorExecutionSpecification_Shape_IncomingLinks(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_Shape_IncomingLinks(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_CoRegionShape_IncomingLinks(view);
case TimeConstraintEditPart.VISUAL_ID:
return getTimeConstraint_Shape_IncomingLinks(view);
case TimeObservationEditPart.VISUAL_ID:
@@ -482,8 +463,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getBehaviorExecutionSpecification_Shape_OutgoingLinks(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_Shape_OutgoingLinks(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_CoRegionShape_OutgoingLinks(view);
case TimeConstraintEditPart.VISUAL_ID:
return getTimeConstraint_Shape_OutgoingLinks(view);
case TimeObservationEditPart.VISUAL_ID:
@@ -634,15 +613,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return result;
}
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getCombinedFragment_CoRegionShape_ContainedLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_Edge(modelElement));
- return result;
- }
+
/**
* @generated
@@ -997,26 +968,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return result;
}
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getCombinedFragment_CoRegionShape_IncomingLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_SynchEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Message_AsynchEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Message_ReplyEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Message_CreateEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Message_DeleteEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Message_LostEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Message_FoundEdge(modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
- return result;
- }
+
/**
* @generated
@@ -1536,21 +1488,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return result;
}
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getCombinedFragment_CoRegionShape_OutgoingLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_ReplyEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_CreateEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
- return result;
- }
+
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
index 1c0ebfebfe4..2c35226ff6b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
@@ -20,7 +20,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
@@ -237,7 +237,7 @@ public class UMLVisualIDRegistry {
return StateInvariantEditPart.VISUAL_ID;
}
if (UMLPackage.eINSTANCE.getCombinedFragment().isSuperTypeOf(domainElement.eClass())) {
- return CombinedFragment2EditPart.VISUAL_ID;
+ return CCombinedFragmentEditPart.VISUAL_ID;
}
if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
return TimeConstraintEditPart.VISUAL_ID;
@@ -253,11 +253,6 @@ public class UMLVisualIDRegistry {
return DestructionOccurrenceSpecificationEditPart.VISUAL_ID;
}
break;
- case CombinedFragment2EditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getGate().isSuperTypeOf(domainElement.eClass())) {
- return GateEditPart.VISUAL_ID;
- }
- break;
case InteractionInteractionCompartmentEditPart.VISUAL_ID:
if (UMLPackage.eINSTANCE.getConsiderIgnoreFragment().isSuperTypeOf(domainElement.eClass())) {
return ConsiderIgnoreFragmentEditPart.VISUAL_ID;
@@ -383,9 +378,6 @@ public class UMLVisualIDRegistry {
if (StateInvariantEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (CombinedFragment2EditPart.VISUAL_ID.equals(nodeVisualID)) {
- return true;
- }
if (TimeConstraintEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
@@ -407,11 +399,6 @@ public class UMLVisualIDRegistry {
return true;
}
break;
- case CombinedFragment2EditPart.VISUAL_ID:
- if (GateEditPart.VISUAL_ID.equals(nodeVisualID)) {
- return true;
- }
- break;
case TimeConstraintEditPart.VISUAL_ID:
if (TimeConstraintLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
index f42928cd446..604171c915e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
@@ -26,7 +26,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.providers.DiagramElementTypes;
import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.providers.DiagramElementTypeImages;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
@@ -442,8 +441,6 @@ public class UMLElementTypes {
return BehaviorExecutionSpecification_Shape;
case StateInvariantEditPart.VISUAL_ID:
return StateInvariant_Shape;
- case CombinedFragment2EditPart.VISUAL_ID:
- return CombinedFragment_CoRegionShape;
case TimeConstraintEditPart.VISUAL_ID:
return TimeConstraint_Shape;
case TimeObservationEditPart.VISUAL_ID:
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
index e380c4f862d..240e2f6f928 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
@@ -59,7 +59,6 @@ import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceCon
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
@@ -262,7 +261,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case CommentEditPart.VISUAL_ID:
case DurationObservationEditPart.VISUAL_ID:
case GateEditPart.VISUAL_ID:
- case CombinedFragment2EditPart.VISUAL_ID:
case DurationConstraintInMessageEditPart.VISUAL_ID:
if (domainElement == null || !visualID
.equals(UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement))) {
@@ -355,9 +353,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
preferencesHint);
case StateInvariantEditPart.VISUAL_ID:
return createStateInvariant_Shape(domainElement, containerView, index, persisted, preferencesHint);
- case CombinedFragment2EditPart.VISUAL_ID:
- return createCombinedFragment_CoRegionShape(domainElement, containerView, index, persisted,
- preferencesHint);
case TimeConstraintEditPart.VISUAL_ID:
return createTimeConstraint_Shape(domainElement, containerView, index, persisted, preferencesHint);
case TimeObservationEditPart.VISUAL_ID:
@@ -622,22 +617,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return node;
}
- /**
- * @generated
- */
- public Node createCombinedFragment_CoRegionShape(EObject domainElement, View containerView, int index,
- boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CombinedFragment");
- return node;
- }
/**
* @generated
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/BugTest_m7.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/BugTest_m7.java
index aaa331bad27..c99dd05bce8 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/BugTest_m7.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/BugTest_m7.java
@@ -13,15 +13,17 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.tests.bug.m7;
-import org.junit.runner.RunWith;
import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
@RunWith(ClassificationSuite.class)
-@SuiteClasses({ TestDurationConstraint_402967.class, TestElementIcon_396799.class, TestExecutionSpecificationPosition_395462.class, TestGraphicalGate_389531.class, TestGuardVisibility_402966.class, TestInteractionUse.class, TestMessageCreateWithLifeline_403134.class, TestResizeStateInvariant_395774.class, TestTooltip_402964.class, TestMessageOccurrenceSpecification_402975.class, TestMakeSameHeightForLifelines_402978.class, TestMoveAnchorInsideCoRegion_402970.class, TestMoveMessageLostFound_403138.class, TestOrderingFragments_403233.class, TestShiftEnclosingMessageInOperand_402969.class, TestGateNameOnCombinedFragment.class, TestExecutionEndsWithMessageOccurrenceSpecification.class,
- TestMessageOccurrenceSpecification_477463.class})
+@SuiteClasses({ TestDurationConstraint_402967.class, TestElementIcon_396799.class, TestExecutionSpecificationPosition_395462.class, TestGraphicalGate_389531.class, TestGuardVisibility_402966.class, TestInteractionUse.class,
+ TestMessageCreateWithLifeline_403134.class, TestResizeStateInvariant_395774.class, TestTooltip_402964.class, TestMessageOccurrenceSpecification_402975.class, TestMakeSameHeightForLifelines_402978.class, TestMoveMessageLostFound_403138.class,
+ TestOrderingFragments_403233.class, TestShiftEnclosingMessageInOperand_402969.class, TestGateNameOnCombinedFragment.class, TestExecutionEndsWithMessageOccurrenceSpecification.class,
+ TestMessageOccurrenceSpecification_477463.class })
public class BugTest_m7 {
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestMoveAnchorInsideCoRegion_402970.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestMoveAnchorInsideCoRegion_402970.java
deleted file mode 100644
index 473bf5a1e57..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestMoveAnchorInsideCoRegion_402970.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.tests.bug.m7;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.BendpointRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.tests.ISequenceDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.junit.Test;
-
-/**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=402970
- *
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class TestMoveAnchorInsideCoRegion_402970 extends AbstractNodeTest {
-
- @Override
- protected String getProjectName() {
- return ISequenceDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return ISequenceDiagramTestsConstants.FILE_NAME;
- }
-
- @Test
- public void testMoveMessageDown() {
- LifelineEditPart lifeline1 = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), new Dimension(100, 300));
- LifelineEditPart lifeline2 = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), new Dimension(100, 300));
- CombinedFragment2EditPart coRegion = (CombinedFragment2EditPart)createNode(UMLElementTypes.CombinedFragment_CoRegionShape, lifeline1, getAbsoluteBounds(lifeline1).getTop().translate(0, 50), new Dimension(50, 100));
- Point startLocation = getAbsoluteBounds(coRegion).getCenter().getTranslated(0, -30);
- Point endLocation = getAbsoluteBounds(lifeline2).getCenter().setY(startLocation.y);
- MessageAsyncEditPart messagePart = (MessageAsyncEditPart)createLink(UMLElementTypes.Message_AsynchEdge, lifeline1.getViewer(), startLocation, coRegion, endLocation, lifeline2);
- waitForComplete();
- Point sourceLoc = SequenceUtil.getAbsoluteEdgeExtremity(messagePart, true);
- Point targetLoc = SequenceUtil.getAbsoluteEdgeExtremity(messagePart, false);
- //emulate drag line down with create Bendpoint request.
- BendpointRequest request = new BendpointRequest();
- request.setType(RequestConstants.REQ_CREATE_BENDPOINT);
- request.setSource(messagePart);
- int move = 20;
- Point location = new Point(sourceLoc.x + ((targetLoc.x - sourceLoc.x) / 2), sourceLoc.y + move);
- request.setLocation(location);;
- messagePart.showSourceFeedback(request);
- waitForComplete();//waiting for layout connection by change feedback.
- Command command = messagePart.getCommand(request);
- messagePart.eraseSourceFeedback(request);
- waitForComplete();
- if(command == null || !command.canExecute()) {
- fail("Can not move message down.");
- } else {
- getDiagramCommandStack().execute(command);
- waitForComplete();
- Point newSourceLoc = SequenceUtil.getAbsoluteEdgeExtremity(messagePart, true);
- Point newTargetLoc = SequenceUtil.getAbsoluteEdgeExtremity(messagePart, false);
- assertEquals("message source moved down(" + move + ")", sourceLoc.y + move, newSourceLoc.y);
- assertEquals("message target moved down(" + move + ")", targetLoc.y + move, newTargetLoc.y);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestTooltip_402964.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestTooltip_402964.java
index 83115048721..de4f9a313b9 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestTooltip_402964.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestTooltip_402964.java
@@ -34,7 +34,6 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
@@ -90,7 +89,7 @@ public class TestTooltip_402964 extends AbstractNodeTest {
@Test
public void testLifelineTooltip() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline);
final Package model = getPackage();
getDiagramCommandStack().execute(new ICommandProxy(new AbstractTransactionalCommand(getEditingDomain(), "", Collections.singletonList(file)) {
@@ -113,202 +112,202 @@ public class TestTooltip_402964 extends AbstractNodeTest {
IFigure figure = lifeline.getFigure();
assertNotNull(figure);
IFigure toolTip = figure.getToolTip();
- //The tooltip of Lifeline is changed.
+ // The tooltip of Lifeline is changed.
checkTooltip(toolTip, "Lifeline", "name: Lifeline\nrepresent: books\nrepresent type: Book");
}
@Test
public void testActionExecutionSpecification() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline);
- ActionExecutionSpecificationEditPart aes = (ActionExecutionSpecificationEditPart)createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
+ ActionExecutionSpecificationEditPart aes = (ActionExecutionSpecificationEditPart) createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
assertNotNull(aes);
String name = "TestActionExecutionSpecification";
- changeName(getEditingDomain(), (NamedElement)aes.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) aes.resolveSemanticElement(), name);
checkTooltip(aes.getFigure().getToolTip(), "Action Execution Specification", "name: " + name);
}
@Test
public void testBehaviorExecutionSpecification() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline);
- BehaviorExecutionSpecificationEditPart bes = (BehaviorExecutionSpecificationEditPart)createNode(UMLElementTypes.BehaviorExecutionSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
+ BehaviorExecutionSpecificationEditPart bes = (BehaviorExecutionSpecificationEditPart) createNode(UMLElementTypes.BehaviorExecutionSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
assertNotNull(bes);
String name = "TestBehaviorExecutionSpecification";
- changeName(getEditingDomain(), (NamedElement)bes.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) bes.resolveSemanticElement(), name);
checkTooltip(bes.getFigure().getToolTip(), "Behavior Execution Specification", "name: " + name);
}
@Test
public void testCombinedFragment() {
- CombinedFragmentEditPart cf = (CombinedFragmentEditPart)createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(100, 100), new Dimension(200, 100));
+ CombinedFragmentEditPart cf = (CombinedFragmentEditPart) createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(100, 100), new Dimension(200, 100));
assertNotNull(cf);
String name = "Test Combined Fragment";
- CombinedFragment elt = (CombinedFragment)cf.resolveSemanticElement();
+ CombinedFragment elt = (CombinedFragment) cf.resolveSemanticElement();
changeName(getEditingDomain(), elt, name);
checkTooltip(cf.getFigure().getToolTip(), "Combined Fragment", "name: " + name + "\noperator: " + elt.getInteractionOperator().getName());
}
@Test
public void testInteractionOperand() {
- CombinedFragmentEditPart cf = (CombinedFragmentEditPart)createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(100, 100), new Dimension(200, 100));
+ CombinedFragmentEditPart cf = (CombinedFragmentEditPart) createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(100, 100), new Dimension(200, 100));
assertNotNull(cf);
String cfName = "Test Combined Fragment";
- CombinedFragment elt = (CombinedFragment)cf.resolveSemanticElement();
+ CombinedFragment elt = (CombinedFragment) cf.resolveSemanticElement();
changeName(getEditingDomain(), elt, cfName);
- CombinedFragmentCombinedFragmentCompartmentEditPart compartment = (CombinedFragmentCombinedFragmentCompartmentEditPart)cf.getChildBySemanticHint("" + CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID);
+ CombinedFragmentCombinedFragmentCompartmentEditPart compartment = (CombinedFragmentCombinedFragmentCompartmentEditPart) cf.getChildBySemanticHint("" + CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID);
assertNotNull(compartment);
- InteractionOperandEditPart operand = (InteractionOperandEditPart)createNode(UMLElementTypes.InteractionOperand_Shape, compartment, getAbsoluteCenter(compartment), null);
+ InteractionOperandEditPart operand = (InteractionOperandEditPart) createNode(UMLElementTypes.InteractionOperand_Shape, compartment, getAbsoluteCenter(compartment), null);
assertNotNull(operand);
String name = "Test Interaction Operand";
- changeName(getEditingDomain(), (NamedElement)operand.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) operand.resolveSemanticElement(), name);
checkTooltip(operand.getFigure().getToolTip(), "Interaction Operand", "name: " + name + "\nparent:name: " + cfName + "\nparent:operator: " + elt.getInteractionOperator().getName());
}
@Test
public void testSynchronousMessage() {
- LifelineEditPart lifeline1 = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline1 = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline1);
- ActionExecutionSpecificationEditPart source = (ActionExecutionSpecificationEditPart)createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline1, getAbsoluteBounds(lifeline1).getTop().translate(0, 50), null);
+ ActionExecutionSpecificationEditPart source = (ActionExecutionSpecificationEditPart) createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline1, getAbsoluteBounds(lifeline1).getTop().translate(0, 50), null);
assertNotNull(source);
- LifelineEditPart lifeline2 = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart lifeline2 = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(lifeline2);
- ActionExecutionSpecificationEditPart target = (ActionExecutionSpecificationEditPart)createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline2, getAbsoluteBounds(lifeline2).getTop().translate(0, 50), null);
+ ActionExecutionSpecificationEditPart target = (ActionExecutionSpecificationEditPart) createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline2, getAbsoluteBounds(lifeline2).getTop().translate(0, 50), null);
assertNotNull(target);
- MessageSyncEditPart message = (MessageSyncEditPart)createLink(UMLElementTypes.Message_SynchEdge, lifeline1.getViewer(), getAbsoluteCenter(source), getAbsoluteCenter(target));
+ MessageSyncEditPart message = (MessageSyncEditPart) createLink(UMLElementTypes.Message_SynchEdge, lifeline1.getViewer(), getAbsoluteCenter(source), getAbsoluteCenter(target));
assertNotNull(message);
String name = "Test Synchronous Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Synchronous Message", "name: " + name);
}
@Test
public void testAsynchronousMessage() {
- LifelineEditPart source = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart source = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(source);
- LifelineEditPart target = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart target = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(target);
- MessageAsyncEditPart message = (MessageAsyncEditPart)createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
+ MessageAsyncEditPart message = (MessageAsyncEditPart) createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
assertNotNull(message);
String name = "Test Asynchronous Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Asynchronous Message", "name: " + name);
}
@Test
public void testCreateMessage() {
- LifelineEditPart source = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart source = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(source);
- LifelineEditPart target = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart target = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(target);
- MessageCreateEditPart message = (MessageCreateEditPart)createLink(UMLElementTypes.Message_CreateEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
+ MessageCreateEditPart message = (MessageCreateEditPart) createLink(UMLElementTypes.Message_CreateEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
assertNotNull(message);
String name = "Test Create Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Create Message", "name: " + name);
}
@Test
public void testReplyMessage() {
- LifelineEditPart lifeline1 = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart lifeline1 = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(lifeline1);
- ActionExecutionSpecificationEditPart source = (ActionExecutionSpecificationEditPart)createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline1, getAbsoluteBounds(lifeline1).getTop().translate(0, 50), null);
+ ActionExecutionSpecificationEditPart source = (ActionExecutionSpecificationEditPart) createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline1, getAbsoluteBounds(lifeline1).getTop().translate(0, 50), null);
assertNotNull(source);
- LifelineEditPart lifeline2 = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline2 = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline2);
- ActionExecutionSpecificationEditPart target = (ActionExecutionSpecificationEditPart)createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline2, getAbsoluteBounds(lifeline2).getTop().translate(0, 150), null);
+ ActionExecutionSpecificationEditPart target = (ActionExecutionSpecificationEditPart) createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline2, getAbsoluteBounds(lifeline2).getTop().translate(0, 150), null);
assertNotNull(target);
- MessageReplyEditPart message = (MessageReplyEditPart)createLink(UMLElementTypes.Message_ReplyEdge, source.getViewer(), getAbsoluteCenter(source), getAbsoluteCenter(target));
+ MessageReplyEditPart message = (MessageReplyEditPart) createLink(UMLElementTypes.Message_ReplyEdge, source.getViewer(), getAbsoluteCenter(source), getAbsoluteCenter(target));
assertNotNull(message);
String name = "Test Reply Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Reply Message", "name: " + name);
}
@Test
public void testFoundMessage() {
- LifelineEditPart target = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart target = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(target);
Point targetLocation = getAbsoluteBounds(target).getTop().translate(0, 50);
Point sourceLocation = targetLocation.getTranslated(-100, 0);
- MessageFoundEditPart message = (MessageFoundEditPart)createLink(UMLElementTypes.Message_FoundEdge, target.getViewer(), sourceLocation, targetLocation);
+ MessageFoundEditPart message = (MessageFoundEditPart) createLink(UMLElementTypes.Message_FoundEdge, target.getViewer(), sourceLocation, targetLocation);
assertNotNull(message);
String name = "Test Found Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Found Message", "name: " + name);
}
@Test
public void testLostMessage() {
- LifelineEditPart source = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart source = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(source);
Point sourceLocation = getAbsoluteBounds(source).getTop().translate(0, 50);
Point targetLocation = sourceLocation.getTranslated(100, 0);
- MessageLostEditPart message = (MessageLostEditPart)createLink(UMLElementTypes.Message_LostEdge, source.getViewer(), sourceLocation, targetLocation);
+ MessageLostEditPart message = (MessageLostEditPart) createLink(UMLElementTypes.Message_LostEdge, source.getViewer(), sourceLocation, targetLocation);
assertNotNull(message);
String name = "Test Lost Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Lost Message", "name: " + name);
}
@Test
public void testDeleteMessage() {
- LifelineEditPart source = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart source = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(source);
- LifelineEditPart target = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart target = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(target);
- MessageDeleteEditPart message = (MessageDeleteEditPart)createLink(UMLElementTypes.Message_DeleteEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
+ MessageDeleteEditPart message = (MessageDeleteEditPart) createLink(UMLElementTypes.Message_DeleteEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
assertNotNull(message);
String name = "Test Delete Message";
- changeName(getEditingDomain(), (NamedElement)message.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) message.resolveSemanticElement(), name);
checkTooltip(message.getFigure().getToolTip(), "Delete Message", "name: " + name);
}
@Test
public void testMessageOccurrenceSpecification() {
- LifelineEditPart source = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart source = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(source);
- LifelineEditPart target = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart target = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(target);
- MessageAsyncEditPart message = (MessageAsyncEditPart)createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
+ MessageAsyncEditPart message = (MessageAsyncEditPart) createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), getAbsoluteBounds(source).getTop().translate(0, 50), getAbsoluteBounds(target).getTop().translate(0, 50));
assertNotNull(message);
- MessageEndEditPart messageEnd = (MessageEndEditPart)message.getChildBySemanticHint(MessageEndEditPart.VISUAL_ID);
+ MessageEndEditPart messageEnd = (MessageEndEditPart) message.getChildBySemanticHint(MessageEndEditPart.VISUAL_ID);
assertNotNull(messageEnd);
String name = "Test Message Occurrence Specification";
- changeName(getEditingDomain(), (NamedElement)messageEnd.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) messageEnd.resolveSemanticElement(), name);
checkTooltip(messageEnd.getFigure().getToolTip(), "Message Occurrence Specification", "name: " + name);
}
@Test
public void testExecutionOccurrenceSpecification() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline);
- ActionExecutionSpecificationEditPart es = (ActionExecutionSpecificationEditPart)createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
+ ActionExecutionSpecificationEditPart es = (ActionExecutionSpecificationEditPart) createNode(UMLElementTypes.ActionExecutionSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
assertNotNull(es);
- ExecutionSpecificationEndEditPart esEnd = (ExecutionSpecificationEndEditPart)es.getChildren().get(0);
+ ExecutionSpecificationEndEditPart esEnd = (ExecutionSpecificationEndEditPart) es.getChildren().get(0);
assertNotNull(esEnd);
String name = "Test Execution Occurrence Specification";
- changeName(getEditingDomain(), (NamedElement)esEnd.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) esEnd.resolveSemanticElement(), name);
checkTooltip(esEnd.getFigure().getToolTip(), "Execution Occurrence Specification", "name: " + name);
}
@Test
public void testInteractionUse() {
- InteractionUseEditPart interactionUse = (InteractionUseEditPart)createNode(UMLElementTypes.InteractionUse_Shape, getRootEditPart(), new Point(300, 200), new Dimension(200, 100));
+ InteractionUseEditPart interactionUse = (InteractionUseEditPart) createNode(UMLElementTypes.InteractionUse_Shape, getRootEditPart(), new Point(300, 200), new Dimension(200, 100));
assertNotNull(interactionUse);
String name = "Test Interaction Use";
- NamedElement element = (NamedElement)interactionUse.resolveSemanticElement();
+ NamedElement element = (NamedElement) interactionUse.resolveSemanticElement();
changeName(getEditingDomain(), element, name);
checkTooltip(interactionUse.getFigure().getToolTip(), "Interaction Use", "name: " + name);
- //add Refer
+ // add Refer
final String referInteractionName = "Refered Interaction";
final List<Interaction> refers = new ArrayList<Interaction>();
- final Model model = (Model)getPackage();
+ final Model model = (Model) getPackage();
getDiagramCommandStack().execute(new ICommandProxy(new AbstractTransactionalCommand(getEditingDomain(), "", null) {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Interaction interaction = (Interaction)model.createPackagedElement(referInteractionName, UMLPackage.Literals.INTERACTION);
+ Interaction interaction = (Interaction) model.createPackagedElement(referInteractionName, UMLPackage.Literals.INTERACTION);
refers.add(interaction);
return CommandResult.newOKCommandResult();
}
@@ -325,60 +324,60 @@ public class TestTooltip_402964 extends AbstractNodeTest {
@Test
public void testStateInvariant() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline);
Rectangle r = getAbsoluteBounds(lifeline);
- StateInvariantEditPart stateInvariant = (StateInvariantEditPart)createNode(UMLElementTypes.StateInvariant_Shape, lifeline, r.getCenter(), null);
+ StateInvariantEditPart stateInvariant = (StateInvariantEditPart) createNode(UMLElementTypes.StateInvariant_Shape, lifeline, r.getCenter(), null);
assertNotNull(stateInvariant);
String name = "Test State Invariant";
- changeName(getEditingDomain(), (NamedElement)stateInvariant.resolveSemanticElement(), name);
+ changeName(getEditingDomain(), (NamedElement) stateInvariant.resolveSemanticElement(), name);
checkTooltip(stateInvariant.getFigure().getToolTip(), "State Invariant", "");
}
@Test
public void testDestructionEvent() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart lifeline = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(lifeline);
- DestructionOccurrenceSpecificationEditPart destructionEvent = (DestructionOccurrenceSpecificationEditPart)createNode(UMLElementTypes.DestructionOccurrenceSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
+ DestructionOccurrenceSpecificationEditPart destructionEvent = (DestructionOccurrenceSpecificationEditPart) createNode(UMLElementTypes.DestructionOccurrenceSpecification_Shape, lifeline, getAbsoluteCenter(lifeline), null);
assertNotNull(destructionEvent);
checkTooltip(destructionEvent.getFigure().getToolTip(), "Destruction Event", "");
}
@Test
public void testGeneralOrdering() {
- LifelineEditPart source = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ LifelineEditPart source = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
assertNotNull(source);
- LifelineEditPart target = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
+ LifelineEditPart target = (LifelineEditPart) createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), null);
assertNotNull(target);
Point sourcePoint = getAbsoluteBounds(source).getTop().translate(0, 50);
Point targetPoint = getAbsoluteBounds(target).getTop().translate(0, 50);
- MessageAsyncEditPart message1 = (MessageAsyncEditPart)createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), sourcePoint, targetPoint);
+ MessageAsyncEditPart message1 = (MessageAsyncEditPart) createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), sourcePoint, targetPoint);
assertNotNull(message1);
- MessageAsyncEditPart message2 = (MessageAsyncEditPart)createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), sourcePoint.getTranslated(0, 50), targetPoint.getTranslated(0, 50));
+ MessageAsyncEditPart message2 = (MessageAsyncEditPart) createLink(UMLElementTypes.Message_AsynchEdge, source.getViewer(), sourcePoint.getTranslated(0, 50), targetPoint.getTranslated(0, 50));
assertNotNull(message2);
sourcePoint = SequenceUtil.getAbsoluteEdgeExtremity(message1, true);
targetPoint = SequenceUtil.getAbsoluteEdgeExtremity(message2, false);
- GeneralOrderingEditPart generalOrdering = (GeneralOrderingEditPart)createLink(UMLElementTypes.GeneralOrdering_Edge, source.getViewer(), sourcePoint, targetPoint);
+ GeneralOrderingEditPart generalOrdering = (GeneralOrderingEditPart) createLink(UMLElementTypes.GeneralOrdering_Edge, source.getViewer(), sourcePoint, targetPoint);
assertNotNull(generalOrdering);
checkTooltip(generalOrdering.getFigure().getToolTip(), "General Ordering", "");
}
- @Test
- public void testCoRegion() {
- LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
- assertNotNull(lifeline);
- Rectangle r = getAbsoluteBounds(lifeline);
- CombinedFragment2EditPart coRegion = (CombinedFragment2EditPart)createNode(UMLElementTypes.CombinedFragment_CoRegionShape, lifeline, r.getCenter(), null);
- assertNotNull(coRegion);
- String name = "Test CoRegion";
- changeName(getEditingDomain(), (NamedElement)coRegion.resolveSemanticElement(), name);
- checkTooltip(coRegion.getFigure().getToolTip(), "Co Region", "name: " + name);
- }
+ // @Test
+ // public void testCoRegion() {
+ // LifelineEditPart lifeline = (LifelineEditPart)createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), null);
+ // assertNotNull(lifeline);
+ // Rectangle r = getAbsoluteBounds(lifeline);
+ // CombinedFragment2EditPart coRegion = (CombinedFragment2EditPart)createNode(UMLElementTypes.CombinedFragment_CoRegionShape, lifeline, r.getCenter(), null);
+ // assertNotNull(coRegion);
+ // String name = "Test CoRegion";
+ // changeName(getEditingDomain(), (NamedElement)coRegion.resolveSemanticElement(), name);
+ // checkTooltip(coRegion.getFigure().getToolTip(), "Co Region", "name: " + name);
+ // }
private void checkTooltip(IFigure figure, String name, String description) {
assertNotNull(figure);
assertTrue(figure instanceof TooltipFigure);
- TooltipFigure tipFig = (TooltipFigure)figure;
+ TooltipFigure tipFig = (TooltipFigure) figure;
tipFig.update();
assertEquals("Tooltip Name: ", trim(name), trim(tipFig.getName()));
assertEquals("Tooltip Description: ", trim(description), trim(tipFig.getDescription()));

Back to the top