Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2018-06-21 08:20:43 +0000
committerQuentin Le Menez2018-06-21 10:19:13 +0000
commitc57b8da1274dd168fac36523d156f5872541682d (patch)
treea60264274ea97e7f146af207f84e8332d2f9a698
parenta5939d660d706c1cc5cf86083981d67e0219c5b9 (diff)
downloadorg.eclipse.papyrus-c57b8da1274dd168fac36523d156f5872541682d.tar.gz
org.eclipse.papyrus-c57b8da1274dd168fac36523d156f5872541682d.tar.xz
org.eclipse.papyrus-c57b8da1274dd168fac36523d156f5872541682d.zip
Bug 536116 - [Quality] Remove deprecated SemanticAdapter
- delete SemanticAdapter in UML layer - use the SemanticAdapter provided by infra - remove unused import/variable Change-Id: I78ecab2792303a2f85083eca5093d3168d70e036 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/ChangeParentCommand.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/PinLayoutEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/AbstractActionPinUpdater.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java222
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SemanticAdapter.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CommunicationGraphicalNodeEditPolicy.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/DurationObservationHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/CustomDeferredCreateConnectionViewCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/DependencyDiamonViewCreateCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/helpers/MultiDependencyHelper.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/policies/CustomDiagramDragDropEditPolicy.java7
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/AbstractViewProvider.java8
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/ElementInitializers.java4
20 files changed, 25 insertions, 333 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java
index ea4bf393c1d..644ae432c8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java
@@ -35,7 +35,7 @@ import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternati
import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
import org.eclipse.swt.dnd.TransferData;
import org.eclipse.swt.graphics.Image;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/ChangeParentCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/ChangeParentCommand.java
index dbc35b95d99..8da4ac12ec7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/ChangeParentCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/ChangeParentCommand.java
@@ -99,8 +99,8 @@ public class ChangeParentCommand extends AbstractTransactionalCommand {
/**
* Change graphical parent
*/
- View childView = (View) child.getAdapter(View.class);
- View parentView = (View) parent.getAdapter(View.class);
+ View childView = child.getAdapter(View.class);
+ View parentView = parent.getAdapter(View.class);
EObject oldParent = childView.eContainer();
if (oldParent instanceof View) {
((View) oldParent).removeChild(childView);
@@ -111,10 +111,8 @@ public class ChangeParentCommand extends AbstractTransactionalCommand {
parentView.insertChildAt(childView, index);
}
/**
- * Change coordiante
+ * Change coordinate
*/
- Point childViewCoordinate = getLocation(childView);
- Point parentViewCoordinate = getLocation(parentView);
ViewUtil.setStructuralFeatureValue(childView, NotationPackage.eINSTANCE.getLocation_X(), Integer.valueOf(110));
ViewUtil.setStructuralFeatureValue(childView, NotationPackage.eINSTANCE.getLocation_Y(), Integer.valueOf(110));
return CommandResult.newOKCommandResult();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java
index eb59b44bf16..38b615f742f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java
@@ -32,8 +32,8 @@ import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.infra.ui.util.EditorUtils;
import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.uml2.uml.Constraint;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java
index 94910942801..7a174fb7b4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java
@@ -18,7 +18,6 @@ import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java
index 492552c5d86..bbf60f7e678 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java
@@ -17,10 +17,7 @@ import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
@@ -38,28 +35,6 @@ public class CustomActivityParameterNodeEditPart extends ActivityParameterNodeEd
}
/**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
- *
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- // installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
- *
- * @return
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
- return super.createNodePlate();// result;
-
- }
-
- /**
* @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
*
* @param borderItemContainer
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/PinLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/PinLayoutEditPolicy.java
index b113fcf26a3..68be7690396 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/PinLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/policies/PinLayoutEditPolicy.java
@@ -19,7 +19,6 @@ import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.notation.View;
/**
* This edit policy replaces the GMF generated edit policy for Port.
@@ -31,8 +30,6 @@ public class PinLayoutEditPolicy extends LayoutEditPolicy {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
-
return new ExternalLabelPrimaryDragRoleEditPolicy();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/AbstractActionPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/AbstractActionPinUpdater.java
index c36e5b42178..baa7050313d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/AbstractActionPinUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/AbstractActionPinUpdater.java
@@ -30,9 +30,7 @@ import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Pin;
import org.eclipse.uml2.uml.PrimitiveType;
-import org.eclipse.uml2.uml.SignalEvent;
import org.eclipse.uml2.uml.StructuredActivityNode;
-import org.eclipse.uml2.uml.Trigger;
import org.eclipse.uml2.uml.Type;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java
index 391c21754ba..a12b89a4f5f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java
@@ -27,44 +27,18 @@ import org.eclipse.swt.graphics.Image;
public class AcceptEventActionFigure extends RoundedCompartmentFigure {
- /**
- * this label is internal to the figure and represents the name of the acceptEventAction
- */
- // private CenteredWrappedLabel fAcceptEventActionLabel;
-
- // private final Insets marginTemplate;
/** The helper which handles stereotype aspects */
private StereotypeFigureHelper stereotypeHelper;
public AcceptEventActionFigure() {
- // CenteredColumnLayout layoutThis = new CenteredColumnLayout();
- // this.setLayoutManager(layoutThis);
- // this.addPoint(new Point(0, 0));
- // this.addPoint(new Point(200, 0));
- // this.addPoint(new Point(200, 50));
- // this.addPoint(new Point(0, 50));
- // this.addPoint(new Point(50, 25));
- // // add time template
- // this.addTimePoint(new Point(0, 0));
- // this.addTimePoint(new Point(100, 0));
- // this.addTimePoint(new Point(50, 25));
- // this.addTimePoint(new Point(100, 50));
- // this.addTimePoint(new Point(0, 50));
- // this.addTimePoint(new Point(50, 25));
- // this.setFill(true);
- // this.setLineWidth(1);
- // make margin border relative
- // marginTemplate = new Insets(0, 50, 0, 0);
- // this.setBorder(new MarginBorder(marginTemplate));
createContents();
// use StereotypeFigureHelper
stereotypeHelper = new StereotypeFigureHelper(this) {
@Override
public Object getStereotypeRectangleConstraint() {
- CenteredColumnConstraint constraintStereotypeRect0 = new CenteredColumnConstraint(false);
- return constraintStereotypeRect0;
+ return new CenteredColumnConstraint(false);
}
};
}
@@ -73,33 +47,8 @@ public class AcceptEventActionFigure extends RoundedCompartmentFigure {
* This method is used to create the content into the figure, in our case this is the label of the acceptEventAction
*/
private void createContents() {
- // RectangleFigure labelRect0 = new RectangleFigure();
- // labelRect0.setFill(false);
- // labelRect0.setOutline(false);
- // labelRect0.setLineWidth(1);
- // // use CenteredColumnConstraint
- // CenteredColumnConstraint constraintLabelRect0 = new CenteredColumnConstraint(true);
- // this.add(labelRect0, constraintLabelRect0);
- // CenterLayout layoutLabelRect0 = new CenterLayout();
- // labelRect0.setLayoutManager(layoutLabelRect0);
- // fAcceptEventActionLabel = new CenteredWrappedLabel();
- // fAcceptEventActionLabel.setBorder(new MarginBorder(5, 5, 5, 5));
- // this.add(fAcceptEventActionLabel);
}
- //
- //
- // private final PointList myTemplate = new PointList();
- //
- //
- // private Rectangle myTemplateBounds;
-
- //
- // @Override
- // public void addPoint(Point point) {
- // myTemplate.addPoint(point);
- // myTemplateBounds = null;
- // }
/**
* Refresh the layout of the figure
@@ -171,27 +120,9 @@ public class AcceptEventActionFigure extends RoundedCompartmentFigure {
stereotypePropertiesInCompartment = stereotypeProperties;
}
- /**
- * Gets the stereotype label.
- *
- * @return the stereotype label
- * @unused
- * @deprecated
- */
- // @Override
- // @Deprecated
- // public Label getStereotypesLabel() {
- // return null;// fActionStereotypeLabel;
- // }
+ private final PointList myTempslateTime = new PointList();
- /**
- * @generated
- */
- private final PointList myTemplateTime = new PointList();
- /**
- * @generated
- */
private boolean useTemplateTime = false;
/**
@@ -226,153 +157,4 @@ public class AcceptEventActionFigure extends RoundedCompartmentFigure {
return useTemplateTime;
}
- // private Rectangle myTemplateTimeBounds;
-
- // public void addTimePoint(Point point) {
- // myTemplateTime.addPoint(point);
- // myTemplateTimeBounds = null;
- // }
-
- //
- // @Override
- // protected void fillShape(Graphics graphics) {
- // Rectangle bounds = getBounds();
- // graphics.pushState();
- // graphics.translate(bounds.x, bounds.y);
- // graphics.fillPolygon(scalePointList());
- // graphics.popState();
- // // refresh relative margin
- // Insets newInsets = scaleMargin();
- // if (!newInsets.equals(getBorder().getInsets(this))) {
- // this.setBorder(new MarginBorder(scaleMargin()));
- // }
- // }
-
- // @Override
- // protected void outlineShape(Graphics graphics) {
- // Rectangle bounds = getBounds();
- // graphics.pushState();
- // graphics.translate(bounds.x, bounds.y);
- // graphics.setLineWidth(Math.max(1, getLineWidth()));
- // graphics.drawPolygon(scalePointList());
- // graphics.popState();
- // }
-
- // private Insets scaleMargin() {
- // Rectangle pointsBounds = getTemplateBounds();
- // Rectangle actualBounds = getBounds();
- // float xScale = ((float) actualBounds.width) / pointsBounds.width;
- // float yScale = ((float) actualBounds.height) / pointsBounds.height;
- // if (xScale == 1 && yScale == 1) {
- // return marginTemplate;
- // }
- // Insets scaled = new Insets(marginTemplate);
- // scaled.top = (int) Math.floor(scaled.top * yScale);
- // scaled.left = (int) Math.floor(scaled.left * xScale);
- // scaled.bottom = (int) Math.floor(scaled.bottom * yScale);
- // scaled.right = (int) Math.floor(scaled.right * xScale);
- // return scaled;
- // }
-
- // /**
- // * switch between the two templates
- // */
- // private Rectangle getTemplateBounds() {
- // if (myTemplateBounds == null) {
- // myTemplateBounds = myTemplate.getBounds().getCopy().union(0, 0);
- // // just safety -- we are going to use this as divider
- // if (myTemplateBounds.width < 1) {
- // myTemplateBounds.width = 1;
- // }
- // if (myTemplateBounds.height < 1) {
- // myTemplateBounds.height = 1;
- // }
- // }
- // // switch between the two templates : create the second template bounds
- // if (myTemplateTimeBounds == null) {
- // myTemplateTimeBounds = myTemplateTime.getBounds().getCopy().union(0, 0);
- // // just safety -- we are going to use this as divider
- // if (myTemplateTimeBounds.width < 1) {
- // myTemplateTimeBounds.width = 1;
- // }
- // if (myTemplateTimeBounds.height < 1) {
- // myTemplateTimeBounds.height = 1;
- // }
- // }
- // // switch between the two templates : choose appropriate one
- // if (useTemplateTime) {
- // return myTemplateTimeBounds;
- // } else {
- // return myTemplateBounds;
- // }
- // }
-
- // private int[] scalePointList() {
- // Rectangle pointsBounds = getTemplateBounds();
- // Rectangle actualBounds = getBounds();
- // float xScale = ((float) actualBounds.width) / pointsBounds.width;
- // float yScale = ((float) actualBounds.height) / pointsBounds.height;
- // if (xScale == 1 && yScale == 1) {
- // // switch between the two templates
- // if (useTemplateTime) {
- // return myTemplateTime.toIntArray();
- // } else {
- // return myTemplate.toIntArray();
- // }
- // }
- // // switch between the two templates
- // int[] scaled;
- // if (useTemplateTime) {
- // scaled = myTemplateTime.toIntArray().clone();
- // } else {
- // scaled = myTemplate.toIntArray().clone();
- // }
- // for (int i = 0; i < scaled.length; i += 2) {
- // scaled[i] = (int) Math.floor(scaled[i] * xScale);
- // scaled[i + 1] = (int) Math.floor(scaled[i + 1] * yScale);
- // }
- // return scaled;
- // }
-
- // /**
- // * @generated
- // */
- // public CenteredWrappedLabel getAcceptEventActionLabel() {
- // return fAcceptEventActionLabel;
- // // return getNameLabel();
- // }
-
- // @Override
- // public Color getBorderColor() {
- // return null;
- // }
- //
- // @Override
- // public boolean isShadow() {
- // return false;
- // }
- //
- // @Override
- // public void setBorderColor(Color borderColor) {
- //
- // }
- //
- // @Override
- // public void setShadow(boolean shadow) {
- //
- // }
- //
- // @Override
- // public void setTransparency(int transparency) {
- //
- // }
- //
- // @Override
- // public void setGradientData(int gradientColor1, int gradientColor2, int gradientStyle) {
- // }
- //
- // @Override
- // public void setIsUsingGradient(boolean b) {
- //
- // }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java
index 90ca5f9e716..a986c08c241 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java
@@ -36,7 +36,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.SubCompartmentLayoutManager;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SubCompartmentLayoutManager;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Pattern;
@@ -174,11 +174,10 @@ public class InterruptibleActivityRegionFigure extends PapyrusNodeFigure impleme
* the compartment figure
*/
protected void createContentPane(List<String> compartmentFigure) {
- containerFigures = new HashMap<String, RectangleFigure>();
+ containerFigures = new HashMap<>();
for (String id : compartmentFigure) {
RectangleFigure newFigure = new RectangleFigure();
newFigure.setLayoutManager(new SubCompartmentLayoutManager());
- // to debug graphically: newFigure.setFill(true);
newFigure.setFill(false);
newFigure.setBorder(null);
newFigure.setOutline(false);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SemanticAdapter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SemanticAdapter.java
deleted file mode 100644
index c8a2f91204c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SemanticAdapter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.common.commands;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * The Class SemanticAdapter used to package semantic or view element in a
- * deferred command
- *
- * @deprecated since 1.1.0
- * use org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter
- */
-@Deprecated
-public class SemanticAdapter extends org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter {
-
- /**
- * Constructor.
- *
- * @param element
- * @param view
- */
- public SemanticAdapter(EObject element, Object view) {
- super(element, view);
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CommunicationGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CommunicationGraphicalNodeEditPolicy.java
index 82210c9f61a..c918e0cfcdd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CommunicationGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CommunicationGraphicalNodeEditPolicy.java
@@ -19,14 +19,12 @@ import java.util.Iterator;
import org.eclipse.draw2d.Connection;
import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand;
import org.eclipse.papyrus.uml.diagram.communication.custom.helper.CommunicationRequestConstant;
@@ -69,15 +67,6 @@ public class CommunicationGraphicalNodeEditPolicy extends GraphicalNodeEditPolic
}
/**
- * used to obtain the transactional edit domain.
- *
- * @return the current transactional edit domain
- */
- private TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).getEditingDomain();
- }
-
- /**
* Overrides to set the color of the dummyConnection to color black. This
* allow to see the feedback of the connection when it is created. By
* default, the color was the foreground color of the lifeline, which is
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/DurationObservationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/DurationObservationHelper.java
index baaced5d813..29150cc3796 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/DurationObservationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/DurationObservationHelper.java
@@ -39,8 +39,8 @@ import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.helper.AssociationHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java
index 0e67fe401b0..6441a323394 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java
@@ -38,8 +38,8 @@ import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.helper.AssociationHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/CustomDeferredCreateConnectionViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/CustomDeferredCreateConnectionViewCommand.java
index 6eead230ee7..b46d8d65a79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/CustomDeferredCreateConnectionViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/CustomDeferredCreateConnectionViewCommand.java
@@ -28,7 +28,7 @@ import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
/**
* This class is used to create a connection view
@@ -58,7 +58,7 @@ public class CustomDeferredCreateConnectionViewCommand extends CommonDeferredCre
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
CommandResult commandResult = null;
- if (command != null && command instanceof AssociationClassViewCreateCommand) {
+ if (command instanceof AssociationClassViewCreateCommand) {
Map<?, ?> epRegistry = viewer.getEditPartRegistry();
IGraphicalEditPart sourceEP = (IGraphicalEditPart) epRegistry.get(sourceViewAdapter.getAdapter(View.class));
IGraphicalEditPart targetEP = (IGraphicalEditPart) epRegistry.get(((AssociationClassViewCreateCommand) command).getNode());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/DependencyDiamonViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/DependencyDiamonViewCreateCommand.java
index 054ece9cd59..f2d7235d13a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/DependencyDiamonViewCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/command/DependencyDiamonViewCreateCommand.java
@@ -35,7 +35,7 @@ import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLViewProvider;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/helpers/MultiDependencyHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/helpers/MultiDependencyHelper.java
index 33d78cb91c3..085e7a50687 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/helpers/MultiDependencyHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/helpers/MultiDependencyHelper.java
@@ -49,7 +49,7 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.commands.DeleteLinkDuringCreationCommand;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.command.CustomDeferredCreateConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.command.DependencyDiamonViewCreateCommand;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
index 0e2156ae2bf..377ac7841b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -457,14 +457,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* @return the command
*/
private Command dropChildNode(DropObjectsRequest dropRequest, Element semanticElement, String nodeVISUALID, String linkVISUALID) {
-
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
- EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- // if(graphicalParentObject instanceof org.eclipse.uml2.uml.Package) {
return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, dropRequest.getLocation(), semanticElement));
- // }
-
- // return UnexecutableCommand.INSTANCE;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java
index 7063fb0101f..c3c167196bb 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java
@@ -215,7 +215,7 @@ public class CreateSnapshotForInteractionFromViewDescriptorCommand extends Abstr
if (dialog.open() == org.eclipse.jface.window.Window.OK) {
final Object[] result = dialog.getResult();
if (result != null && result.length > 0) {
- return (Diagram) EMFHelper.getEObject(result[0]);// (Diagram)(((ModelElementItem)result[0]).getEObject());
+ return (Diagram) EMFHelper.getEObject(result[0]);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/AbstractViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/AbstractViewProvider.java
index 57a52ef4f76..25524f4a600 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/AbstractViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/AbstractViewProvider.java
@@ -55,7 +55,7 @@ public class AbstractViewProvider extends AbstractProvider implements IViewProvi
private static String diagramCreationMethodName = "createDiagram"; //$NON-NLS-1$
- static protected class ClassToCreationMethodMap extends HashMap {
+ protected static class ClassToCreationMethodMap extends HashMap {
static final long serialVersionUID = 1;
@@ -280,11 +280,11 @@ public class AbstractViewProvider extends AbstractProvider implements IViewProvi
if (semanticAdapter == null) {
return null;
}
- EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ EObject eObject = semanticAdapter.getAdapter(EObject.class);
if (eObject != null) {
return EMFCoreUtil.getProxyClass(eObject);
}
- IElementType type = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ IElementType type = semanticAdapter.getAdapter(IElementType.class);
if (type != null) {
return type.getEClass();
}
@@ -318,7 +318,7 @@ public class AbstractViewProvider extends AbstractProvider implements IViewProvi
if (semanticAdapter == null) {
return null;
}
- EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ EObject eObject = semanticAdapter.getAdapter(EObject.class);
if (eObject != null) {
return EMFCoreUtil.resolve(domain, eObject);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/ElementInitializers.java
index e789cdbdf19..63b4a92363a 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/ElementInitializers.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/ElementInitializers.java
@@ -11,8 +11,8 @@
package org.eclipse.papyrus.uml.diagram.interactionoverview.provider;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper;
import org.eclipse.papyrus.uml.diagram.interactionoverview.Activator;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.CallBehaviorAction;
@@ -36,6 +36,6 @@ public class ElementInitializers extends org.eclipse.papyrus.uml.diagram.activit
}
private String name_CallBehaviorAction_InteractionShape(final CallBehaviorAction self) {
- return LabelHelper.INSTANCE.findName(self.eContainer(), self);
+ return NamedElementUtil.getDefaultNameWithIncrementFromBase(self.eClass().getName(), self.eContainer().eContents());
}
}

Back to the top