Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java30
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java256
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java317
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java859
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkAppliedStereotypeEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java)93
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkEditPart.java123
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkNameEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java)119
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java317
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkAppliedStereotypeEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java)92
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkEditPart.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkNameEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java)108
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java68
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java6
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintBorderNodeEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java)94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintNameEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java)34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationBorderNodeEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java)78
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationNameEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java)41
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java77
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java119
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java741
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java158
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java91
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java306
41 files changed, 1798 insertions, 3886 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
index 79b3c33d2de..e278566d12e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
@@ -25,16 +25,21 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.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.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
@@ -69,13 +74,18 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
*/
@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.ActionExecutionSpecificationCanonicalEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ExecutionSpecificationGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ExecutionSpecificationComponentEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
@@ -100,6 +110,15 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ String vid = UMLVisualIDRegistry.getVisualID(childView);
+ if (vid != null) {
+ switch (vid) {
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -170,7 +189,7 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
@@ -185,6 +204,11 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
*/
@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
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
index c2fa42a02f4..f7e8a4c6f4f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
@@ -25,16 +25,21 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.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.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
@@ -69,13 +74,18 @@ public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpe
*/
@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.BehaviorExecutionSpecificationCanonicalEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ExecutionSpecificationGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ExecutionSpecificationComponentEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
@@ -89,6 +99,15 @@ public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpe
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ String vid = UMLVisualIDRegistry.getVisualID(childView);
+ if (vid != null) {
+ switch (vid) {
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -169,7 +188,7 @@ public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpe
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
@@ -184,6 +203,11 @@ public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpe
*/
@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
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java
index 60910738d20..a9aaefd455e 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2016 CEA LIST.
+ * Copyright (c) 2016, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536486
*/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
index db5c2a72ecb..d4a43ce1ead 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2016 CEA LIST.
+ * Copyright (c) 2016, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536486
*/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
@@ -24,21 +25,26 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
+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.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class DestructionOccurrenceSpecificationEditPart extends AbstractBorderItemEditPart {
+public class DestructionOccurrenceSpecificationEditPart extends BorderedBorderItemEditPart {
/**
* @generated
@@ -67,12 +73,17 @@ public class DestructionOccurrenceSpecificationEditPart extends AbstractBorderIt
*/
@Override
protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
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.DestructionOccurrenceSpecificationCanonicalEditPolicy());
+
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
@@ -86,6 +97,15 @@ public class DestructionOccurrenceSpecificationEditPart extends AbstractBorderIt
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ String vid = UMLVisualIDRegistry.getVisualID(childView);
+ if (vid != null) {
+ switch (vid) {
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -152,7 +172,7 @@ public class DestructionOccurrenceSpecificationEditPart extends AbstractBorderIt
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
@@ -171,6 +191,11 @@ public class DestructionOccurrenceSpecificationEditPart extends AbstractBorderIt
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
return nodeShape; // use nodeShape itself as contentPane
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
deleted file mode 100644
index 56b0f35ba68..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
+++ /dev/null
@@ -1,256 +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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DurationConstraintEditPart extends BorderedBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final String VISUAL_ID = "DurationConstraint_Shape";
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DurationConstraintEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- 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 DurationConstraintLabelEditPart.VISUAL_ID:
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new DurationConstraintFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure
- * org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure
- *
- * @generated
- */
- public DurationConstraintFigure getPrimaryShape() {
- return (DurationConstraintFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationConstraintLabelEditPart
- || borderItemEditPart instanceof DurationConstraintAppliedStereotypeEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- 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() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
-
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @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);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationConstraintLabelEditPart.VISUAL_ID));
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
deleted file mode 100644
index d397b27deb5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,856 +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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Feature;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageAppliedStereotypeEditPart extends PapyrusLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final String VISUAL_ID = "DurationConstraint_StereotypeLabel_CN";
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID),
- new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DurationConstraintInMessageAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeExternalNodeEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
- } else {
- return ((Label) figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
- } else {
- ((Label) figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
- } else {
- return ((Label) figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
- } else {
- ((Label) figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- public void setParser(IParser parser) {
- this.parser = parser;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(ParserUtil.getParserAdapter(getParserElement(), this),
- getParserOptions().intValue());
- }
- if (text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- @Override
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- @Override
- public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(ParserUtil.getParserAdapter(getParserElement(), this),
- getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- public String isValid(final Object value) {
- if (value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
- .runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(
- ParserUtil.getParserAdapter(getParserElement(),
- DurationConstraintInMessageAppliedStereotypeEditPart.this),
- (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(ParserUtil.getParserAdapter(getParserElement(), this));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationConstraint_Shape_CN, getParserElement(), this,
- VISUAL_ID);
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
-
- @Override
- public void run() {
- getManager().show();
- }
- });
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch (directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
- // Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
- initializeDirectEditManager(theRequest);
- return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration)
- .createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(),
- configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(),
- configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
- initializeDirectEditManager(theRequest);
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void initializeDirectEditManager(final Request request) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- } else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- } else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshFont() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(),
- this);
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE,
- resolveSemanticElement(), this);
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")
- && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(),
- this);
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest)
- && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if (resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
deleted file mode 100644
index a80f94c1fd9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
+++ /dev/null
@@ -1,317 +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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-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.editpart.NodeEditPart;
-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.figure.node.RoundedCompartmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageEditPart extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final String VISUAL_ID = "DurationConstraint_Shape_CN";
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DurationConstraintInMessageEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new MoveableNonResizableLabelEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @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 DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new RoundedCompartmentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
- *
- * @generated
- */
- @Override
- public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationConstraintInMessageLabelEditPart) {
- ((DurationConstraintInMessageLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationConstraintInMessageLabelEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationConstraintInMessageAppliedStereotypeEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @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);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationConstraintInMessageLabelEditPart.VISUAL_ID));
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
deleted file mode 100644
index 3b437f5fd15..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
+++ /dev/null
@@ -1,859 +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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.MultilineLabelFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Feature;
-
-/**
- * @generated
- */
-public class DurationConstraintLabelEditPart extends PapyrusLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final String VISUAL_ID = "DurationConstraint_BodyLabel";
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(
- UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart.VISUAL_ID),
- new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DurationConstraintLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
- } else {
- return ((Label) figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
- } else {
- ((Label) figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
- } else {
- return ((Label) figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
- } else {
- ((Label) figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- public void setParser(IParser parser) {
- this.parser = parser;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(ParserUtil.getParserAdapter(getParserElement(), this),
- getParserOptions().intValue());
- }
- if (text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- @Override
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- @Override
- public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(ParserUtil.getParserAdapter(getParserElement(), this),
- getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- public String isValid(final Object value) {
- if (value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
- .runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(
- parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(),
- DurationConstraintLabelEditPart.this), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(ParserUtil.getParserAdapter(getParserElement(), this));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationConstraint_Shape, getParserElement(), this,
- VISUAL_ID);
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
-
- @Override
- public void run() {
- getManager().show();
- }
- });
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch (directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
- // Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this,
- MultilineLabelDirectEditManager.getTextCellEditorClass(this),
- UMLEditPartFactory.getTextCellEditorLocator(this)));
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
- initializeDirectEditManager(theRequest);
- return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration)
- .createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(),
- configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(),
- configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
- initializeDirectEditManager(theRequest);
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void initializeDirectEditManager(final Request request) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- } else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- } else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshFont() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if (checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if (checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(),
- this);
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE,
- resolveSemanticElement(), this);
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")
- && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(),
- this);
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest)
- && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if (resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new MultilineLabelFigure();
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkAppliedStereotypeEditPart.java
index 7fa3a60a383..efe5bccb802 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkAppliedStereotypeEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -17,10 +14,10 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
import java.util.List;
+import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
@@ -34,11 +31,9 @@ import org.eclipse.gef.tools.DirectEditManager;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
@@ -61,17 +56,15 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -89,8 +82,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart {
+public class DurationConstraintLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart
+ implements ITextAwareEditPart, IControlParserForDirectEdit, ILabelRoleProvider {
/**
* @generated
@@ -136,53 +129,34 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
*/
static {
registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart.VISUAL_ID),
- new Point(0, 0));
+ org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkAppliedStereotypeEditPart.VISUAL_ID),
+ new Point(1, -33));
}
/**
* @generated
*/
- public DurationConstraintAppliedStereotypeEditPart(View view) {
+ public DurationConstraintLinkAppliedStereotypeEditPart(View view) {
super(view);
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeExternalNodeEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
* @generated
*/
@Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
}
/**
@@ -267,6 +241,7 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -282,7 +257,7 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
* @generated
*/
protected Image getLabelIcon() {
- return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
+ return null;
}
/**
@@ -356,7 +331,7 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
public void run() {
setResult(parser.isValidEditString(
ParserUtil.getParserAdapter(getParserElement(),
- DurationConstraintAppliedStereotypeEditPart.this),
+ DurationConstraintLinkAppliedStereotypeEditPart.this),
(String) value));
}
});
@@ -397,8 +372,7 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
@Override
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationConstraint_Shape, getParserElement(), this,
- VISUAL_ID);
+ parser = ParserUtil.getParser(UMLElementTypes.DurationConstraint_Edge, getParserElement(), this, VISUAL_ID);
}
return parser;
}
@@ -833,6 +807,7 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
}
}
}
+
super.handleNotificationEvent(event);
}
@@ -841,16 +816,24 @@ public class DurationConstraintAppliedStereotypeEditPart extends PapyrusLabelEdi
*/
@Override
protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getLabelRole() {
+ return "Stereotype";//$NON-NLS-1$
}
/**
* @generated
*/
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
+ @Override
+ public String getIconPathRole() {
+ return "platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif";//$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkEditPart.java
new file mode 100644
index 00000000000..fc9afc13178
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkEditPart.java
@@ -0,0 +1,123 @@
+/**
+ * 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.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.DurationLinkFigure;
+
+/**
+ * @generated
+ */
+public class DurationConstraintLinkEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final String VISUAL_ID = "DurationConstraint_Edge";
+
+ /**
+ * @generated
+ */
+ public DurationConstraintLinkEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
+ new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DurationConstraintLinkNameEditPart) {
+ ((DurationConstraintLinkNameEditPart) childEditPart).setLabel(getPrimaryShape().getDurationLabelFigure());
+ }
+ if (childEditPart instanceof DurationConstraintLinkAppliedStereotypeEditPart) {
+ ((DurationConstraintLinkAppliedStereotypeEditPart) childEditPart)
+ .setLabel(getPrimaryShape().getAppliedStereotypeLabel());
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DurationConstraintLinkNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof DurationConstraintLinkAppliedStereotypeEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new DurationLinkFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public DurationLinkFigure getPrimaryShape() {
+ return (DurationLinkFigure) getFigure();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkNameEditPart.java
index a4e841dd1ad..0c20c65da50 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLinkNameEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -17,6 +14,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
import java.util.List;
+import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
@@ -59,15 +57,17 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
@@ -82,13 +82,13 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartmentEditPart
- implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class DurationConstraintLinkNameEditPart extends PapyrusLabelEditPart
+ implements ITextAwareEditPart, IControlParserForDirectEdit, ILabelRoleProvider {
/**
* @generated
*/
- public static final String VISUAL_ID = "DurationConstraint_BodyLabel_CN";
+ public static final String VISUAL_ID = "DurationConstraint_NameLabel";
/**
* @generated
@@ -113,7 +113,6 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
/**
* direct edition mode (default, undefined, registered editor, etc.)
*
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
@@ -128,20 +127,36 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
/**
* @generated
*/
- public DurationConstraintInMessageLabelEditPart(View view) {
- super(view);
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(
+ org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkNameEditPart.VISUAL_ID),
+ new Point(1, -13));
}
/**
* @generated
*/
+ public DurationConstraintLinkNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated Papyrus Generation
+ */
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
}
/**
@@ -314,10 +329,11 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
@Override
public void run() {
- setResult(parser.isValidEditString(
- ParserUtil.getParserAdapter(getParserElement(),
- DurationConstraintInMessageLabelEditPart.this),
- (String) value));
+ setResult(
+ parser.isValidEditString(
+ ParserUtil.getParserAdapter(getParserElement(),
+ DurationConstraintLinkNameEditPart.this),
+ (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -357,8 +373,7 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
@Override
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationConstraint_Shape_CN, getParserElement(), this,
- VISUAL_ID);
+ parser = ParserUtil.getParser(UMLElementTypes.DurationConstraint_Edge, getParserElement(), this, VISUAL_ID);
}
return parser;
}
@@ -772,26 +787,7 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
* @generated
*/
@Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
protected void handleNotificationEvent(Notification event) {
- refreshLabel();
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
Integer c = (Integer) event.getNewValue();
@@ -820,6 +816,7 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
}
}
}
+
super.handleNotificationEvent(event);
}
@@ -835,41 +832,17 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
/**
* @generated
*/
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
@Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ public String getLabelRole() {
+ return "Name";//$NON-NLS-1$
}
/**
* @generated
*/
@Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
+ public String getIconPathRole() {
+ return "platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png";//$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
deleted file mode 100644
index 57abb7ed4a4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
+++ /dev/null
@@ -1,317 +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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-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.editpart.NodeEditPart;
-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.figure.node.RoundedCompartmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DurationObservationEditPart extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final String VISUAL_ID = "DurationObservation_Shape";
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DurationObservationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new MoveableNonResizableLabelEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @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 DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new RoundedCompartmentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
- *
- * @generated
- */
- @Override
- public RoundedCompartmentFigure getPrimaryShape() {
- return (RoundedCompartmentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationObservationLabelEditPart) {
- ((DurationObservationLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DurationObservationLabelEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationObservationAppliedStereotypeEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @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);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationObservationLabelEditPart.VISUAL_ID));
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkAppliedStereotypeEditPart.java
index a4ab73622fd..9895e5a7d0f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkAppliedStereotypeEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -17,10 +14,10 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
import java.util.List;
+import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
@@ -34,11 +31,9 @@ import org.eclipse.gef.tools.DirectEditManager;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
@@ -61,17 +56,15 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -89,8 +82,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart {
+public class DurationObservationLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart
+ implements ITextAwareEditPart, IControlParserForDirectEdit, ILabelRoleProvider {
/**
* @generated
@@ -136,53 +129,34 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
*/
static {
registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart.VISUAL_ID),
- new Point(0, 0));
+ org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkAppliedStereotypeEditPart.VISUAL_ID),
+ new Point(1, -33));
}
/**
* @generated
*/
- public DurationObservationAppliedStereotypeEditPart(View view) {
+ public DurationObservationLinkAppliedStereotypeEditPart(View view) {
super(view);
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeExternalNodeEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
* @generated
*/
@Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
}
/**
@@ -267,6 +241,7 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -282,7 +257,7 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
* @generated
*/
protected Image getLabelIcon() {
- return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
+ return null;
}
/**
@@ -356,7 +331,7 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
public void run() {
setResult(parser.isValidEditString(
ParserUtil.getParserAdapter(getParserElement(),
- DurationObservationAppliedStereotypeEditPart.this),
+ DurationObservationLinkAppliedStereotypeEditPart.this),
(String) value));
}
});
@@ -397,7 +372,7 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
@Override
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Shape, getParserElement(), this,
+ parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Edge, getParserElement(), this,
VISUAL_ID);
}
return parser;
@@ -833,6 +808,7 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
}
}
}
+
super.handleNotificationEvent(event);
}
@@ -841,16 +817,24 @@ public class DurationObservationAppliedStereotypeEditPart extends PapyrusLabelEd
*/
@Override
protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getLabelRole() {
+ return "Stereotype";//$NON-NLS-1$
}
/**
* @generated
*/
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
+ @Override
+ public String getIconPathRole() {
+ return "platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif";//$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkEditPart.java
new file mode 100644
index 00000000000..05f1006d8da
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkEditPart.java
@@ -0,0 +1,131 @@
+/**
+ * Copyright (c) 2016, 2018 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536486
+ */
+package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.DurationLinkFigure;
+
+/**
+ * @generated
+ */
+public class DurationObservationLinkEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final String VISUAL_ID = "DurationObservation_Edge";
+
+ /**
+ * @generated
+ */
+ public DurationObservationLinkEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPoliciesGen() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
+ new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ createDefaultEditPoliciesGen();
+
+ removeEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DurationObservationLinkNameEditPart) {
+ ((DurationObservationLinkNameEditPart) childEditPart).setLabel(getPrimaryShape().getDurationLabelFigure());
+ }
+ if (childEditPart instanceof DurationObservationLinkAppliedStereotypeEditPart) {
+ ((DurationObservationLinkAppliedStereotypeEditPart) childEditPart)
+ .setLabel(getPrimaryShape().getAppliedStereotypeLabel());
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DurationObservationLinkNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof DurationObservationLinkAppliedStereotypeEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new DurationLinkFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public DurationLinkFigure getPrimaryShape() {
+ return (DurationLinkFigure) getFigure();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkNameEditPart.java
index 523f2e4d845..46c326bdcf3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLinkNameEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -17,6 +14,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
import java.util.List;
+import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
@@ -61,16 +59,18 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
@@ -85,8 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
- implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class DurationObservationLinkNameEditPart extends PapyrusLabelEditPart
+ implements ITextAwareEditPart, IControlParserForDirectEdit, ILabelRoleProvider {
/**
* @generated
@@ -130,20 +130,36 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- public DurationObservationLabelEditPart(View view) {
- super(view);
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(
+ org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkNameEditPart.VISUAL_ID),
+ new Point(1, -13));
}
/**
* @generated
*/
+ public DurationObservationLinkNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated Papyrus Generation
+ */
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
}
/**
@@ -319,7 +335,7 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
setResult(
parser.isValidEditString(
ParserUtil.getParserAdapter(getParserElement(),
- DurationObservationLabelEditPart.this),
+ DurationObservationLinkNameEditPart.this),
(String) value));
}
});
@@ -360,7 +376,7 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
@Override
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Shape, getParserElement(), this,
+ parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Edge, getParserElement(), this,
VISUAL_ID);
}
return parser;
@@ -775,26 +791,7 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
* @generated
*/
@Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
protected void handleNotificationEvent(Notification event) {
- refreshLabel();
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
Integer c = (Integer) event.getNewValue();
@@ -823,6 +820,7 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
}
}
}
+
if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON
.equals(((EAnnotation) event.getNewValue()).getSource())) {
refreshLabel();
@@ -842,41 +840,17 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
@Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
+ public String getLabelRole() {
+ return "Name";//$NON-NLS-1$
}
/**
* @generated
*/
@Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
+ public String getIconPathRole() {
+ return "platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png";//$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
index 38ecb782eae..e5411a37e5d 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
@@ -123,10 +123,9 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
if (vid != null) {
switch (vid) {
case StateInvariantEditPart.VISUAL_ID:
- case TimeConstraintEditPart.VISUAL_ID:
- case TimeObservationEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
}
@@ -188,9 +187,6 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
return true;
}
-
-
-
// Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
if (childEditPart instanceof StateInvariantEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
@@ -198,47 +194,29 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
return true;
}
-
-
-
- // Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
- if (childEditPart instanceof TimeConstraintEditPart) {
- IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((TimeConstraintEditPart) childEditPart).getFigure(), locator);
- return true;
- }
-
-
-
-
- // Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
- if (childEditPart instanceof TimeObservationEditPart) {
- IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((TimeObservationEditPart) childEditPart).getFigure(), locator);
+ // Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
+ if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
+ IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.SOUTH);
+ getBorderedFigure().getBorderItemContainer().add(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure(), locator);
return true;
}
-
-
-
- // Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
- if (childEditPart instanceof DurationConstraintEditPart) {
+ // Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
+ if (childEditPart instanceof TimeConstraintBorderNodeEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((DurationConstraintEditPart) childEditPart).getFigure(), locator);
+ getBorderedFigure().getBorderItemContainer()
+ .add(((TimeConstraintBorderNodeEditPart) childEditPart).getFigure(), locator);
return true;
}
-
-
-
// Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
- if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer().add(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure(), locator);
+ if (childEditPart instanceof TimeObservationBorderNodeEditPart) {
+ IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer()
+ .add(((TimeObservationBorderNodeEditPart) childEditPart).getFigure(), locator);
return true;
}
-
return false;
}
@@ -253,20 +231,18 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
getBorderedFigure().getBorderItemContainer().remove(((StateInvariantEditPart) childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof TimeConstraintEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((TimeConstraintEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof TimeObservationEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((TimeObservationEditPart) childEditPart).getFigure());
+ if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof DurationConstraintEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((DurationConstraintEditPart) childEditPart).getFigure());
+ if (childEditPart instanceof TimeConstraintBorderNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer()
+ .remove(((TimeConstraintBorderNodeEditPart) childEditPart).getFigure());
return true;
}
- if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure());
+ if (childEditPart instanceof TimeObservationBorderNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer()
+ .remove(((TimeObservationBorderNodeEditPart) childEditPart).getFigure());
return true;
}
return false;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java
index bdeb6910644..7c38576948d 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageAsync;
@@ -37,7 +36,6 @@ public class MessageAsyncEditPart extends AbstractMessageEditPart implements ITr
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java
index 7094d8cc2e9..c0be7d4284e 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageCreate;
@@ -37,7 +36,6 @@ public class MessageCreateEditPart extends AbstractMessageEditPart implements IT
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java
index 01dd8949833..ca65318fddc 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageDelete;
@@ -37,7 +36,6 @@ public class MessageDeleteEditPart extends AbstractMessageEditPart implements IT
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
index c18c7217092..6fccbc19c37 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
@@ -22,7 +22,6 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.RunnableWithResult;
@@ -60,7 +59,6 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
@@ -814,10 +812,6 @@ public class MessageFoundAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON
- .equals(((EAnnotation) event.getNewValue()).getSource())) {
- refreshLabel();
- }
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java
index 1bdb2b93bd3..cd2d5bf0c2e 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFound;
@@ -37,7 +36,6 @@ public class MessageFoundEditPart extends AbstractMessageEditPart implements ITr
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java
index 276c1243f4a..82d9becff6a 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageLost;
@@ -37,7 +36,6 @@ public class MessageLostEditPart extends AbstractMessageEditPart implements ITre
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java
index 1178fb6f0dc..31699dd348f 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageReply;
@@ -37,7 +36,6 @@ public class MessageReplyEditPart extends AbstractMessageEditPart implements ITr
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java
index fad1c89937c..45e7fe2403f 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java
@@ -9,7 +9,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageSync;
@@ -37,7 +36,6 @@ public class MessageSyncEditPart extends AbstractMessageEditPart implements ITre
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
index 13831b6fdbb..2f093e81fea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -66,7 +63,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimar
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -282,7 +278,7 @@ public class TimeConstraintAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected Image getLabelIcon() {
- return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
+ return null;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintBorderNodeEditPart.java
index e9e95bc2419..5558d8d104f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintBorderNodeEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -21,6 +18,9 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
@@ -30,25 +30,28 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.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.uml.diagram.sequence.figures.TimeMarkElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.BorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeConstraintFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
+public class TimeConstraintBorderNodeEditPart extends BorderNodeEditPart {
/**
* @generated
@@ -68,7 +71,7 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
/**
* @generated
*/
- public TimeConstraintEditPart(View view) {
+ public TimeConstraintBorderNodeEditPart(View view) {
super(view);
}
@@ -100,7 +103,7 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
String vid = UMLVisualIDRegistry.getVisualID(childView);
if (vid != null) {
switch (vid) {
- case TimeConstraintLabelEditPart.VISUAL_ID:
+ case TimeConstraintNameEditPart.VISUAL_ID:
case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -134,19 +137,66 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new TimeMarkElementFigure();
+ return primaryShape = new TimeConstraintFigure();
+ }
+
+ @Override
+ public void refreshVisuals() {
+ super.refreshVisuals();
+ }
+
+ @Override
+ protected void refreshBounds() {
+ if (getBorderItemLocator() != null) {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+
+ getBorderItemLocator().setConstraint(new Rectangle(loc, size));
+ } else {
+ super.refreshBounds();
+ }
}
/**
- * org.eclipse.papyrus.uml.diagram.sequence.figures.TimeMarkElementFigure
+ * org.eclipse.papyrus.uml.diagram.sequence.figures.TimeConstraintFigure
*
* @generated
*/
- public TimeMarkElementFigure getPrimaryShape() {
- return (TimeMarkElementFigure) primaryShape;
+ @Override
+ public TimeConstraintFigure getPrimaryShape() {
+ return (TimeConstraintFigure) primaryShape;
}
/**
@@ -154,7 +204,7 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeConstraintLabelEditPart
+ if (borderItemEditPart instanceof TimeConstraintNameEditPart
|| borderItemEditPart instanceof TimeConstraintAppliedStereotypeEditPart) {
BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
locator.setBorderItemOffset(new Dimension(-20, -20));
@@ -168,7 +218,7 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 1);
return result;
}
@@ -247,7 +297,7 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeConstraintLabelEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeConstraintNameEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintNameEditPart.java
index 62ed3a1bd6e..a9617d040ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintNameEditPart.java
@@ -1,15 +1,12 @@
-
/**
* 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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;
@@ -65,12 +62,13 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.MultilineLabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.swt.SWT;
@@ -86,13 +84,13 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class TimeConstraintLabelEditPart extends PapyrusLabelEditPart
+public class TimeConstraintNameEditPart extends PapyrusLabelEditPart
implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
*/
- public static final String VISUAL_ID = "TimeConstraint_ConstraintLabel";
+ public static final String VISUAL_ID = "TimeConstraint_NameLabel";
/**
* @generated
@@ -134,14 +132,14 @@ public class TimeConstraintLabelEditPart extends PapyrusLabelEditPart
static {
registerSnapBackPosition(
UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart.VISUAL_ID),
+ org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintNameEditPart.VISUAL_ID),
new Point(0, 0));
}
/**
* @generated
*/
- public TimeConstraintLabelEditPart(View view) {
+ public TimeConstraintNameEditPart(View view) {
super(view);
}
@@ -278,7 +276,7 @@ public class TimeConstraintLabelEditPart extends PapyrusLabelEditPart
* @generated
*/
protected Image getLabelIcon() {
- return null;
+ return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
}
/**
@@ -351,7 +349,7 @@ public class TimeConstraintLabelEditPart extends PapyrusLabelEditPart
@Override
public void run() {
setResult(parser.isValidEditString(ParserUtil.getParserAdapter(
- getParserElement(), TimeConstraintLabelEditPart.this), (String) value));
+ getParserElement(), TimeConstraintNameEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -851,7 +849,7 @@ public class TimeConstraintLabelEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IFigure createFigurePrim() {
- return new MultilineLabelFigure();
+ return new PapyrusWrappingLabel();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
index cc247589c05..eb45c84afe8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
@@ -1,16 +1,15 @@
-
/**
- * 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
+ * Copyright (c) 2018 Christian W. Damus, CEA LIST, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
@@ -66,7 +65,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimar
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -282,7 +280,7 @@ public class TimeObservationAppliedStereotypeEditPart extends PapyrusLabelEditPa
* @generated
*/
protected Image getLabelIcon() {
- return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
+ return null;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationBorderNodeEditPart.java
index 3b583838440..dc8ed111e72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationBorderNodeEditPart.java
@@ -1,16 +1,15 @@
-
/**
- * 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
+ * Copyright (c) 2018 Christian W. Damus, CEA LIST, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
@@ -21,6 +20,7 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
@@ -30,26 +30,28 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.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.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeMarkElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.BorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeObservationFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class TimeObservationEditPart extends BorderedBorderItemEditPart {
+public class TimeObservationBorderNodeEditPart extends BorderNodeEditPart {
/**
* @generated
@@ -69,7 +71,7 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
/**
* @generated
*/
- public TimeObservationEditPart(View view) {
+ public TimeObservationBorderNodeEditPart(View view) {
super(view);
}
@@ -85,7 +87,6 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
@@ -102,7 +103,7 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
String vid = UMLVisualIDRegistry.getVisualID(childView);
if (vid != null) {
switch (vid) {
- case TimeObservationLabelEditPart.VISUAL_ID:
+ case TimeObservationNameEditPart.VISUAL_ID:
case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -136,19 +137,44 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new TimeMarkElementFigure();
+ return primaryShape = new TimeObservationFigure();
}
/**
- * org.eclipse.papyrus.uml.diagram.sequence.figures.TimeMarkElementFigure
+ * org.eclipse.papyrus.uml.diagram.sequence.figures.TimeObservationFigure
*
* @generated
*/
- public TimeMarkElementFigure getPrimaryShape() {
- return (TimeMarkElementFigure) primaryShape;
+ @Override
+ public TimeObservationFigure getPrimaryShape() {
+ return (TimeObservationFigure) primaryShape;
}
/**
@@ -156,7 +182,7 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeObservationLabelEditPart
+ if (borderItemEditPart instanceof TimeObservationNameEditPart
|| borderItemEditPart instanceof TimeObservationAppliedStereotypeEditPart) {
BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
locator.setBorderItemOffset(new Dimension(-20, -20));
@@ -170,7 +196,7 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 1);
return result;
}
@@ -249,7 +275,7 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationLabelEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationNameEditPart.java
index 93a0e40b094..a0be8507a9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationNameEditPart.java
@@ -1,16 +1,15 @@
-
/**
- * 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
+ * Copyright (c) 2018 Christian W. Damus, CEA LIST, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
@@ -65,12 +64,13 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.MultilineLabelFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.swt.SWT;
@@ -86,7 +86,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class TimeObservationLabelEditPart extends PapyrusLabelEditPart
+public class TimeObservationNameEditPart extends PapyrusLabelEditPart
implements ITextAwareEditPart, IBorderItemEditPart {
/**
@@ -134,14 +134,14 @@ public class TimeObservationLabelEditPart extends PapyrusLabelEditPart
static {
registerSnapBackPosition(
UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart.VISUAL_ID),
+ org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationNameEditPart.VISUAL_ID),
new Point(0, 0));
}
/**
* @generated
*/
- public TimeObservationLabelEditPart(View view) {
+ public TimeObservationNameEditPart(View view) {
super(view);
}
@@ -278,7 +278,7 @@ public class TimeObservationLabelEditPart extends PapyrusLabelEditPart
* @generated
*/
protected Image getLabelIcon() {
- return null;
+ return DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
}
/**
@@ -350,9 +350,8 @@ public class TimeObservationLabelEditPart extends PapyrusLabelEditPart
@Override
public void run() {
- setResult(
- parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(),
- TimeObservationLabelEditPart.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(
+ getParserElement(), TimeObservationNameEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -852,7 +851,7 @@ public class TimeObservationLabelEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IFigure createFigurePrim() {
- return new MultilineLabelFigure();
+ return new PapyrusWrappingLabel();
}
}
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 995453e3a29..91b9940ef2c 100755..100644
--- 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,33 +82,6 @@ public class UMLEditPartFactory implements EditPartFactory {
case StateInvariantLabelEditPart.VISUAL_ID:
return new StateInvariantLabelEditPart(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return new TimeConstraintEditPart(view);
-
- case TimeConstraintLabelEditPart.VISUAL_ID:
- return new TimeConstraintLabelEditPart(view);
-
- case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new TimeConstraintAppliedStereotypeEditPart(view);
-
- case TimeObservationEditPart.VISUAL_ID:
- return new TimeObservationEditPart(view);
-
- case TimeObservationLabelEditPart.VISUAL_ID:
- return new TimeObservationLabelEditPart(view);
-
- case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new TimeObservationAppliedStereotypeEditPart(view);
-
- case DurationConstraintEditPart.VISUAL_ID:
- return new DurationConstraintEditPart(view);
-
- case DurationConstraintLabelEditPart.VISUAL_ID:
- return new DurationConstraintLabelEditPart(view);
-
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new DurationConstraintAppliedStereotypeEditPart(view);
-
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return new DestructionOccurrenceSpecificationEditPart(view);
@@ -127,29 +100,29 @@ public class UMLEditPartFactory implements EditPartFactory {
case CommentBodyEditPart.VISUAL_ID:
return new CommentBodyEditPart(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return new DurationConstraintInMessageEditPart(view);
+ case GateEditPart.VISUAL_ID:
+ return new GateEditPart(view);
- case DurationConstraintInMessageLabelEditPart.VISUAL_ID:
- return new DurationConstraintInMessageLabelEditPart(view);
+ case GateNameEditPart.VISUAL_ID:
+ return new GateNameEditPart(view);
- case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- return new DurationConstraintInMessageAppliedStereotypeEditPart(view);
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ return new TimeConstraintBorderNodeEditPart(view);
- case DurationObservationEditPart.VISUAL_ID:
- return new DurationObservationEditPart(view);
+ case TimeConstraintNameEditPart.VISUAL_ID:
+ return new TimeConstraintNameEditPart(view);
- case DurationObservationLabelEditPart.VISUAL_ID:
- return new DurationObservationLabelEditPart(view);
+ case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
+ return new TimeConstraintAppliedStereotypeEditPart(view);
- case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new DurationObservationAppliedStereotypeEditPart(view);
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return new TimeObservationBorderNodeEditPart(view);
- case GateEditPart.VISUAL_ID:
- return new GateEditPart(view);
+ case TimeObservationNameEditPart.VISUAL_ID:
+ return new TimeObservationNameEditPart(view);
- case GateNameEditPart.VISUAL_ID:
- return new GateNameEditPart(view);
+ case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
+ return new TimeObservationAppliedStereotypeEditPart(view);
case InteractionInteractionCompartmentEditPart.VISUAL_ID:
return new InteractionInteractionCompartmentEditPart(view);
@@ -238,6 +211,24 @@ public class UMLEditPartFactory implements EditPartFactory {
case ConstraintContextAppliedStereotypeEditPart.VISUAL_ID:
return new ConstraintContextAppliedStereotypeEditPart(view);
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ return new DurationConstraintLinkEditPart(view);
+
+ case DurationConstraintLinkNameEditPart.VISUAL_ID:
+ return new DurationConstraintLinkNameEditPart(view);
+
+ case DurationConstraintLinkAppliedStereotypeEditPart.VISUAL_ID:
+ return new DurationConstraintLinkAppliedStereotypeEditPart(view);
+
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ return new DurationObservationLinkEditPart(view);
+
+ case DurationObservationLinkNameEditPart.VISUAL_ID:
+ return new DurationObservationLinkNameEditPart(view);
+
+ case DurationObservationLinkAppliedStereotypeEditPart.VISUAL_ID:
+ return new DurationObservationLinkAppliedStereotypeEditPart(view);
+
}
}
return createUnrecognizedEditPart(context, model);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
index e6a3ae04104..b9545365740 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -58,13 +58,17 @@ import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.DurationObservation;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.GeneralOrdering;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.InteractionFragment;
import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLPackage;
/**
@@ -475,6 +479,20 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
+ public boolean canCreateDurationConstraint_Edge(Namespace container, Element source, Element target) {
+ return canExistDurationConstraint_Edge(container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateDurationObservation_Edge(Package container, NamedElement source, NamedElement target) {
+ return canExistDurationObservation_Edge(container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
public boolean canExistMessage_SynchEdge(Interaction container, Message linkInstance, Element source,
Element target) {
try {
@@ -745,6 +763,22 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
public boolean canExistConstraint_ContextEdge(Constraint source, Namespace target) {
return true;
}
+
+ /**
+ * @generated
+ */
+ public boolean canExistDurationConstraint_Edge(Namespace container, DurationConstraint linkInstance,
+ Element source, Element target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistDurationObservation_Edge(Package container, DurationObservation linkInstance,
+ NamedElement source, NamedElement target) {
+ return true;
+ }
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
index 5c750bf205a..a0bd11969ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2016 CEA LIST.
+ * Copyright (c) 2016, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536486
*/
package org.eclipse.papyrus.uml.diagram.sequence.part;
@@ -254,292 +255,292 @@ public class Messages extends NLS {
public static String ValidateActionMessage;
/**
- * @generated
+ * @generated not
*/
public static String Nodes1Group_title;
/**
- * @generated
+ * @generated not
*/
public static String Nodes1Group_desc;
/**
- * @generated
+ * @generated not
*/
public static String Edges2Group_title;
/**
- * @generated
+ * @generated not
*/
public static String Edges2Group_desc;
/**
- * @generated
+ * @generated not
*/
public static String Lifeline1CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String Lifeline1CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String ActionExecutionSpecification2CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String ActionExecutionSpecification2CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String BehaviorExecutionSpecification3CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String BehaviorExecutionSpecification3CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String InteractionUse4CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String InteractionUse4CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String CombinedFragment5CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String CombinedFragment5CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String InteractionOperand6CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String InteractionOperand6CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String Continuation7CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String Continuation7CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String StateInvariant8CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String StateInvariant8CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String Comment9CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String Comment9CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String Constraint10CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String Constraint10CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String DurationObservation11CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String DurationObservation11CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String TimeConstraint12CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String TimeConstraint12CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String TimeObservation13CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String TimeObservation13CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String DurationConstraint14CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String DurationConstraint14CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String NEWGateCreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String NEWGateCreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String ConsiderIgnoreFragment16CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String ConsiderIgnoreFragment16CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageSync1CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageSync1CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageAsync2CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageAsync2CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageReply3CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageReply3CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageCreate4CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageCreate4CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageDelete5CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageDelete5CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageLost6CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageLost6CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String MessageFound7CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String MessageFound7CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String GeneralOrdering8CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String GeneralOrdering8CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String Commentlink9CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String Commentlink9CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String Constraintlink10CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String Constraintlink10CreationTool_desc;
/**
- * @generated
+ * @generated not
*/
public static String ContextLink11CreationTool_title;
/**
- * @generated
+ * @generated not
*/
public static String ContextLink11CreationTool_desc;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
index 6930fea96d3..d5552fa9e14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2016 CEA LIST.
+ * Copyright (c) 2016, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536486
*/
package org.eclipse.papyrus.uml.diagram.sequence.part;
@@ -127,7 +128,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
}
/**
- * @generated
+ * @generated NOT
*/
@Override
protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
index 7c83ae7baa4..2c7f284fdbd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
@@ -189,7 +189,7 @@ public class UMLDiagramEditorUtil {
* Create a new instance of domain element associated with canvas.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private static Package createInitialModel() {
@@ -200,7 +200,7 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
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 952d248d15c..2ffba826292 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
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009, 2014 Atos Origin, CEA, and others.
+ * Copyright (c) 2009, 2018 Atos Origin, CEA, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -12,6 +12,7 @@
* Contributors:
* Atos Origin - Initial API and implementation
* Christian W. Damus (CEA) - bug 410909
+ * Christian W. Damus - bug 536486
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.part;
@@ -27,9 +28,6 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.TimeConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.TimeObservationHelper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
@@ -43,9 +41,8 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
@@ -62,8 +59,8 @@ 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.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintBorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationBorderNodeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.uml2.uml.ActionExecutionSpecification;
import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
@@ -84,6 +81,7 @@ import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.InteractionUse;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.OccurrenceSpecification;
import org.eclipse.uml2.uml.Package;
@@ -130,6 +128,12 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getInteractionUse_Shape_SemanticChildren(view);
case LifelineEditPart.VISUAL_ID:
return getLifeline_Shape_SemanticChildren(view);
+ case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ return getActionExecutionSpecification_Shape_SemanticChildren(view);
+ case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
+ return getBehaviorExecutionSpecification_Shape_SemanticChildren(view);
+ case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ return getDestructionOccurrenceSpecification_Shape_SemanticChildren(view);
case InteractionInteractionCompartmentEditPart.VISUAL_ID:
return getInteraction_SubfragmentCompartment_SemanticChildren(view);
case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
@@ -301,10 +305,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
*/
public static List<UMLNodeDescriptor> getInteraction_Shape_SemanticChildren(View view) {
if (!view.isSetElement()) {
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
Interaction modelElement = (Interaction) view.getElement();
- List result = new LinkedList();
+ List<UMLNodeDescriptor> result = new LinkedList<>();
// remove fake children for messages (DurationConstraintInMessageEditPart/DurationObservationEditPart)
return result;
}
@@ -331,7 +335,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated NOT (update at each lifeline modification) Added code for manage ExecutionSpecification, handle TimeConstraintEditPart and
- * DurationConstraintEditPart children, handle TimeObservationEditPart children
+ * handle TimeObservationEditPart children
*/
public static List<UMLNodeDescriptor> getLifeline_Shape_SemanticChildren(View view) {
if (!view.isSetElement()) {
@@ -366,44 +370,78 @@ public class UMLDiagramUpdater implements DiagramUpdater {
}
}
}
- /*
- * Autogenerated code not valid for (Iterator it = modelElement.getFragments().iterator();
- * it.hasNext();) { InteractionFragment childElement = (InteractionFragment) it.next(); int
- * visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement); if (visualID ==
- * BehaviorExecutionSpecificationEditPart.VISUAL_ID) { result.add(new
- * UMLNodeDescriptor(childElement, visualID)); continue; } }
- */
- // handle TimeConstraintEditPart and DurationConstraintEditPart children
- if (modelElement instanceof Lifeline) {
- for (InteractionFragment covering : modelElement.getCoveredBys()) {
- for (TimeConstraint childElement : TimeConstraintHelper.getTimeConstraintsOn(covering)) {
- // block from generated code
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (TimeConstraintEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (DurationConstraint childElement : DurationConstraintHelper.getDurationConstraintsOn(covering)) {
- // block from generated code
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (DurationConstraintEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
+ return result;
+ }
+
+ /**
+ * @generated NOT
+ */
+ public List<UMLNodeDescriptor> getActionExecutionSpecification_Shape_SemanticChildren(View view) {
+ if (!view.isSetElement()) {
+ return Collections.emptyList();
+ }
+ ActionExecutionSpecification modelElement = (ActionExecutionSpecification) view.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<>();
+ Interaction interaction = modelElement.getEnclosingInteraction();
+ if (interaction == null) {
+ return Collections.emptyList();
+ }
+ for (Iterator<?> it = interaction.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
}
}
- // handle TimeObservationEditPart children
- if (modelElement instanceof Lifeline) {
- for (InteractionFragment covering : modelElement.getCoveredBys()) {
- for (TimeObservation childElement : TimeObservationHelper.getTimeObservations(covering)) {
- // block from generated code
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (TimeObservationEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
+ return result;
+ }
+
+ /**
+ * @generated NOT
+ */
+ public List<UMLNodeDescriptor> getBehaviorExecutionSpecification_Shape_SemanticChildren(View view) {
+ if (!view.isSetElement()) {
+ return Collections.emptyList();
+ }
+ BehaviorExecutionSpecification modelElement = (BehaviorExecutionSpecification) view.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<>();
+ Interaction interaction = modelElement.getEnclosingInteraction();
+ if (interaction == null) {
+ return Collections.emptyList();
+ }
+ for (Iterator<?> it = interaction.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated NOT
+ */
+ public List<UMLNodeDescriptor> getDestructionOccurrenceSpecification_Shape_SemanticChildren(View view) {
+ if (!view.isSetElement()) {
+ return Collections.emptyList();
+ }
+ DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification) view.getElement();
+ Interaction interaction = modelElement.getEnclosingInteraction();
+ if (interaction == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<>();
+ for (Iterator<?> it = interaction.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ // Does it constrain this destruction occurrence?
+ if (childElement.getConstrainedElements().contains(modelElement)) {
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
}
}
}
@@ -440,24 +478,18 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getBehaviorExecutionSpecification_Shape_ContainedLinks(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_Shape_ContainedLinks(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_Shape_ContainedLinks(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_Shape_ContainedLinks(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_Shape_ContainedLinks(view);
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return getDestructionOccurrenceSpecification_Shape_ContainedLinks(view);
case ConstraintEditPart.VISUAL_ID:
return getConstraint_Shape_ContainedLinks(view);
case CommentEditPart.VISUAL_ID:
return getComment_Shape_ContainedLinks(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_Shape_CN_ContainedLinks(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_Shape_ContainedLinks(view);
case GateEditPart.VISUAL_ID:
return getGate_Shape_ContainedLinks(view);
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ return getTimeConstraint_Shape_ContainedLinks(view);
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return getTimeObservation_Shape_ContainedLinks(view);
case MessageSyncEditPart.VISUAL_ID:
return getMessage_SynchEdge_ContainedLinks(view);
case MessageAsyncEditPart.VISUAL_ID:
@@ -474,6 +506,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getMessage_FoundEdge_ContainedLinks(view);
case GeneralOrderingEditPart.VISUAL_ID:
return getGeneralOrdering_Edge_ContainedLinks(view);
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ return getDurationConstraint_Edge_ContainedLinks(view);
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ return getDurationObservation_Edge_ContainedLinks(view);
}
}
return Collections.emptyList();
@@ -507,24 +543,18 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getBehaviorExecutionSpecification_Shape_IncomingLinks(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_Shape_IncomingLinks(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_Shape_IncomingLinks(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_Shape_IncomingLinks(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_Shape_IncomingLinks(view);
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return getDestructionOccurrenceSpecification_Shape_IncomingLinks(view);
case ConstraintEditPart.VISUAL_ID:
return getConstraint_Shape_IncomingLinks(view);
case CommentEditPart.VISUAL_ID:
return getComment_Shape_IncomingLinks(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_Shape_CN_IncomingLinks(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_Shape_IncomingLinks(view);
case GateEditPart.VISUAL_ID:
return getGate_Shape_IncomingLinks(view);
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ return getTimeConstraint_Shape_IncomingLinks(view);
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return getTimeObservation_Shape_IncomingLinks(view);
case MessageSyncEditPart.VISUAL_ID:
return getMessage_SynchEdge_IncomingLinks(view);
case MessageAsyncEditPart.VISUAL_ID:
@@ -541,6 +571,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getMessage_FoundEdge_IncomingLinks(view);
case GeneralOrderingEditPart.VISUAL_ID:
return getGeneralOrdering_Edge_IncomingLinks(view);
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ return getDurationConstraint_Edge_IncomingLinks(view);
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ return getDurationObservation_Edge_IncomingLinks(view);
}
}
return Collections.emptyList();
@@ -574,24 +608,18 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getBehaviorExecutionSpecification_Shape_OutgoingLinks(view);
case StateInvariantEditPart.VISUAL_ID:
return getStateInvariant_Shape_OutgoingLinks(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_Shape_OutgoingLinks(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_Shape_OutgoingLinks(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_Shape_OutgoingLinks(view);
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return getDestructionOccurrenceSpecification_Shape_OutgoingLinks(view);
case ConstraintEditPart.VISUAL_ID:
return getConstraint_Shape_OutgoingLinks(view);
case CommentEditPart.VISUAL_ID:
return getComment_Shape_OutgoingLinks(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_Shape_CN_OutgoingLinks(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_Shape_OutgoingLinks(view);
case GateEditPart.VISUAL_ID:
return getGate_Shape_OutgoingLinks(view);
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ return getTimeConstraint_Shape_OutgoingLinks(view);
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return getTimeObservation_Shape_OutgoingLinks(view);
case MessageSyncEditPart.VISUAL_ID:
return getMessage_SynchEdge_OutgoingLinks(view);
case MessageAsyncEditPart.VISUAL_ID:
@@ -608,6 +636,10 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getMessage_FoundEdge_OutgoingLinks(view);
case GeneralOrderingEditPart.VISUAL_ID:
return getGeneralOrdering_Edge_OutgoingLinks(view);
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ return getDurationConstraint_Edge_OutgoingLinks(view);
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ return getDurationObservation_Edge_OutgoingLinks(view);
}
}
return Collections.emptyList();
@@ -617,7 +649,11 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLLinkDescriptor> getPackage_SequenceDiagram_ContainedLinks(View view) {
- return Collections.emptyList();
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ result.addAll(getContainedTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_DurationObservation_Edge(modelElement));
+ return result;
}
/**
@@ -634,6 +670,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getContainedTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getContainedTypeModelFacetLinks_Message_FoundEdge(modelElement));
result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_Edge(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
return result;
}
@@ -664,6 +701,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
InteractionOperand modelElement = (InteractionOperand) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_Edge(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
return result;
}
@@ -727,35 +765,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- public List<UMLLinkDescriptor> getTimeConstraint_Shape_ContainedLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getTimeObservation_Shape_ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDurationConstraint_Shape_ContainedLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
public List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_Shape_ContainedLinks(View view) {
DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -787,25 +796,25 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationConstraint_Shape_CN_ContainedLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
- return result;
+ public List<UMLLinkDescriptor> getGate_Shape_ContainedLinks(View view) {
+ return Collections.emptyList();
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationObservation_Shape_ContainedLinks(View view) {
- return Collections.emptyList();
+ public List<UMLLinkDescriptor> getTimeConstraint_Shape_ContainedLinks(View view) {
+ TimeConstraint modelElement = (TimeConstraint) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getGate_Shape_ContainedLinks(View view) {
+ public List<UMLLinkDescriptor> getTimeObservation_Shape_ContainedLinks(View view) {
return Collections.emptyList();
}
@@ -868,6 +877,24 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
+ public List<UMLLinkDescriptor> getDurationConstraint_Edge_ContainedLinks(View view) {
+ DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDurationObservation_Edge_ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
public List<UMLLinkDescriptor> getInteraction_Shape_IncomingLinks(View view) {
Interaction modelElement = (Interaction) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
@@ -884,6 +911,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -905,6 +934,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -926,6 +957,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -948,6 +981,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -969,6 +1004,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -990,6 +1027,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -1011,6 +1050,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -1032,6 +1073,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -1053,6 +1096,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -1074,35 +1119,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getTimeConstraint_Shape_IncomingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) 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
- */
- public List<UMLLinkDescriptor> getTimeObservation_Shape_IncomingLinks(View view) {
- TimeObservation modelElement = (TimeObservation) view.getElement();
+ public List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_Shape_IncomingLinks(View view) {
+ DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1116,14 +1142,17 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_GeneralOrdering_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationConstraint_Shape_IncomingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ public List<UMLLinkDescriptor> getConstraint_Shape_IncomingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1137,14 +1166,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_Shape_IncomingLinks(View view) {
- DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification) view.getElement();
+ public List<UMLLinkDescriptor> getComment_Shape_IncomingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1158,15 +1189,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_GeneralOrdering_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getConstraint_Shape_IncomingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
+ public List<UMLLinkDescriptor> getGate_Shape_IncomingLinks(View view) {
+ Gate modelElement = (Gate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1180,14 +1211,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getComment_Shape_IncomingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ public List<UMLLinkDescriptor> getTimeConstraint_Shape_IncomingLinks(View view) {
+ TimeConstraint modelElement = (TimeConstraint) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1201,14 +1234,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationConstraint_Shape_CN_IncomingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ public List<UMLLinkDescriptor> getTimeObservation_Shape_IncomingLinks(View view) {
+ TimeObservation modelElement = (TimeObservation) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1222,14 +1257,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationObservation_Shape_IncomingLinks(View view) {
- DurationObservation modelElement = (DurationObservation) view.getElement();
+ public List<UMLLinkDescriptor> getMessage_SynchEdge_IncomingLinks(View view) {
+ Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1243,14 +1280,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getGate_Shape_IncomingLinks(View view) {
- Gate modelElement = (Gate) view.getElement();
+ public List<UMLLinkDescriptor> getMessage_AsynchEdge_IncomingLinks(View view) {
+ Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1264,13 +1303,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_SynchEdge_IncomingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_ReplyEdge_IncomingLinks(View view) {
Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1285,13 +1326,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_AsynchEdge_IncomingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_CreateEdge_IncomingLinks(View view) {
Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1306,13 +1349,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_ReplyEdge_IncomingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_DeleteEdge_IncomingLinks(View view) {
Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1327,13 +1372,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_CreateEdge_IncomingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_LostEdge_IncomingLinks(View view) {
Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1348,13 +1395,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_DeleteEdge_IncomingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_FoundEdge_IncomingLinks(View view) {
Message modelElement = (Message) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1369,14 +1418,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_LostEdge_IncomingLinks(View view) {
- Message modelElement = (Message) view.getElement();
+ public List<UMLLinkDescriptor> getGeneralOrdering_Edge_IncomingLinks(View view) {
+ GeneralOrdering modelElement = (GeneralOrdering) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1390,14 +1441,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_FoundEdge_IncomingLinks(View view) {
- Message modelElement = (Message) view.getElement();
+ public List<UMLLinkDescriptor> getDurationConstraint_Edge_IncomingLinks(View view) {
+ DurationConstraint modelElement = (DurationConstraint) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1411,14 +1464,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getGeneralOrdering_Edge_IncomingLinks(View view) {
- GeneralOrdering modelElement = (GeneralOrdering) view.getElement();
+ public List<UMLLinkDescriptor> getDurationObservation_Edge_IncomingLinks(View view) {
+ DurationObservation modelElement = (DurationObservation) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -1432,6 +1487,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
result.addAll(
getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationConstraint_Edge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_DurationObservation_Edge(modelElement, crossReferencer));
return result;
}
@@ -1448,6 +1505,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1464,6 +1523,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1480,6 +1541,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1496,6 +1559,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1512,6 +1577,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1528,6 +1595,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1544,6 +1613,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1560,6 +1631,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1576,6 +1649,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -1592,32 +1667,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getTimeConstraint_Shape_OutgoingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint) 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));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getTimeObservation_Shape_OutgoingLinks(View view) {
- TimeObservation modelElement = (TimeObservation) view.getElement();
+ public List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_Shape_OutgoingLinks(View view) {
+ DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1626,14 +1685,17 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_GeneralOrdering_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationConstraint_Shape_OutgoingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ public List<UMLLinkDescriptor> getConstraint_Shape_OutgoingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1644,14 +1706,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_Shape_OutgoingLinks(View view) {
- DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification) view.getElement();
+ public List<UMLLinkDescriptor> getComment_Shape_OutgoingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1660,15 +1724,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_GeneralOrdering_Edge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getConstraint_Shape_OutgoingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
+ public List<UMLLinkDescriptor> getGate_Shape_OutgoingLinks(View view) {
+ Gate modelElement = (Gate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1677,16 +1742,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getComment_Shape_OutgoingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
+ public List<UMLLinkDescriptor> getTimeConstraint_Shape_OutgoingLinks(View view) {
+ TimeConstraint modelElement = (TimeConstraint) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1695,15 +1760,18 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationConstraint_Shape_CN_OutgoingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint) view.getElement();
+ public List<UMLLinkDescriptor> getTimeObservation_Shape_OutgoingLinks(View view) {
+ TimeObservation modelElement = (TimeObservation) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1712,16 +1780,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getDurationObservation_Shape_OutgoingLinks(View view) {
- DurationObservation modelElement = (DurationObservation) view.getElement();
+ public List<UMLLinkDescriptor> getMessage_SynchEdge_OutgoingLinks(View view) {
+ Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1730,14 +1798,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getGate_Shape_OutgoingLinks(View view) {
- Gate modelElement = (Gate) view.getElement();
+ public List<UMLLinkDescriptor> getMessage_AsynchEdge_OutgoingLinks(View view) {
+ Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1746,13 +1816,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_SynchEdge_OutgoingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_ReplyEdge_OutgoingLinks(View view) {
Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
@@ -1762,13 +1834,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_AsynchEdge_OutgoingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_CreateEdge_OutgoingLinks(View view) {
Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
@@ -1778,13 +1852,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_ReplyEdge_OutgoingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_DeleteEdge_OutgoingLinks(View view) {
Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
@@ -1794,13 +1870,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_CreateEdge_OutgoingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_LostEdge_OutgoingLinks(View view) {
Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
@@ -1810,13 +1888,15 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_DeleteEdge_OutgoingLinks(View view) {
+ public List<UMLLinkDescriptor> getMessage_FoundEdge_OutgoingLinks(View view) {
Message modelElement = (Message) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
@@ -1826,14 +1906,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_LostEdge_OutgoingLinks(View view) {
- Message modelElement = (Message) view.getElement();
+ public List<UMLLinkDescriptor> getGeneralOrdering_Edge_OutgoingLinks(View view) {
+ GeneralOrdering modelElement = (GeneralOrdering) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1842,14 +1924,16 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getMessage_FoundEdge_OutgoingLinks(View view) {
- Message modelElement = (Message) view.getElement();
+ public List<UMLLinkDescriptor> getDurationConstraint_Edge_OutgoingLinks(View view) {
+ DurationConstraint modelElement = (DurationConstraint) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1858,14 +1942,18 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ContextEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
/**
* @generated
*/
- public List<UMLLinkDescriptor> getGeneralOrdering_Edge_OutgoingLinks(View view) {
- GeneralOrdering modelElement = (GeneralOrdering) view.getElement();
+ public List<UMLLinkDescriptor> getDurationObservation_Edge_OutgoingLinks(View view) {
+ DurationObservation modelElement = (DurationObservation) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
result.addAll(getOutgoingTypeModelFacetLinks_Message_SynchEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_AsynchEdge(modelElement));
@@ -1874,6 +1962,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
result.addAll(getOutgoingTypeModelFacetLinks_Message_DeleteEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_LostEdge(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Message_FoundEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_DurationObservation_Edge(modelElement));
return result;
}
@@ -2092,6 +2182,72 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_DurationConstraint_Edge(
+ Namespace container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ for (Iterator<?> links = container.getOwnedRules().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof DurationConstraint) {
+ continue;
+ }
+ DurationConstraint link = (DurationConstraint) linkObject;
+ if (!DurationConstraintLinkEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> targets = link.getConstrainedElements();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof Element) {
+ continue;
+ }
+ Element dst = (Element) theTarget;
+ List<?> sources = link.getConstrainedElements();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof Element) {
+ continue;
+ }
+ Element src = (Element) theSource;
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.DurationConstraint_Edge,
+ DurationConstraintLinkEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_DurationObservation_Edge(
+ Package container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ for (Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof DurationObservation) {
+ continue;
+ }
+ DurationObservation link = (DurationObservation) linkObject;
+ if (!DurationObservationLinkEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> targets = link.getEvents();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof NamedElement) {
+ continue;
+ }
+ NamedElement dst = (NamedElement) theTarget;
+ List<?> sources = link.getEvents();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.DurationObservation_Edge,
+ DurationObservationLinkEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_SynchEdge(Element target,
CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
@@ -2325,6 +2481,62 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_DurationConstraint_Edge(Element target,
+ CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()
+ || false == setting.getEObject() instanceof DurationConstraint) {
+ continue;
+ }
+ DurationConstraint link = (DurationConstraint) setting.getEObject();
+ if (!DurationConstraintLinkEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> sources = link.getConstrainedElements();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof Element) {
+ continue;
+ }
+ Element src = (Element) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.DurationConstraint_Edge,
+ DurationConstraintLinkEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_DurationObservation_Edge(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDurationObservation_Event()
+ || false == setting.getEObject() instanceof DurationObservation) {
+ continue;
+ }
+ DurationObservation link = (DurationObservation) setting.getEObject();
+ if (!DurationObservationLinkEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> sources = link.getEvents();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.DurationObservation_Edge,
+ DurationObservationLinkEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_SynchEdge(Element source) {
Interaction container = null;
// Find container element for the link.
@@ -2697,4 +2909,99 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return result;
}
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_DurationConstraint_Edge(Element source) {
+ Namespace container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Namespace) {
+ container = (Namespace) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ for (Iterator<?> links = container.getOwnedRules().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof DurationConstraint) {
+ continue;
+ }
+ DurationConstraint link = (DurationConstraint) linkObject;
+ if (!DurationConstraintLinkEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> targets = link.getConstrainedElements();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof Element) {
+ continue;
+ }
+ Element dst = (Element) theTarget;
+ List<?> sources = link.getConstrainedElements();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof Element) {
+ continue;
+ }
+ Element src = (Element) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.DurationConstraint_Edge,
+ DurationConstraintLinkEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_DurationObservation_Edge(
+ NamedElement source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<>();
+ for (Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof DurationObservation) {
+ continue;
+ }
+ DurationObservation link = (DurationObservation) linkObject;
+ if (!DurationObservationLinkEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> targets = link.getEvents();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof NamedElement) {
+ continue;
+ }
+ NamedElement dst = (NamedElement) theTarget;
+ List<?> sources = link.getEvents();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.DurationObservation_Edge,
+ DurationObservationLinkEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
}
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 5d7aef810ba..6b28e436e29 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
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2018 Atos Origin, Christian W. Damus, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 536486
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.part;
@@ -35,15 +36,12 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkNameEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkNameEditPart;
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.GeneralOrderingAppliedStereotypeEditPart;
@@ -83,11 +81,11 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPar
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintBorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationBorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.expressions.UMLOCLFactory;
import org.eclipse.uml2.uml.Message;
import org.eclipse.uml2.uml.Package;
@@ -193,9 +191,6 @@ public class UMLVisualIDRegistry {
}
break;
case InteractionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
- return DurationConstraintInMessageEditPart.VISUAL_ID;
- }
if (UMLPackage.eINSTANCE.getGate().isSuperTypeOf(domainElement.eClass())) {
return GateEditPart.VISUAL_ID;
}
@@ -234,18 +229,39 @@ public class UMLVisualIDRegistry {
if (UMLPackage.eINSTANCE.getStateInvariant().isSuperTypeOf(domainElement.eClass())) {
return StateInvariantEditPart.VISUAL_ID;
}
+ if (UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification()
+ .isSuperTypeOf(domainElement.eClass())) {
+ return DestructionOccurrenceSpecificationEditPart.VISUAL_ID;
+ }
if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
- return TimeConstraintEditPart.VISUAL_ID;
+ return TimeConstraintBorderNodeEditPart.VISUAL_ID;
}
if (UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())) {
- return TimeObservationEditPart.VISUAL_ID;
+ return TimeObservationBorderNodeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
- return DurationConstraintEditPart.VISUAL_ID;
+ break;
+ case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return TimeConstraintBorderNodeEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification()
- .isSuperTypeOf(domainElement.eClass())) {
- return DestructionOccurrenceSpecificationEditPart.VISUAL_ID;
+ if (UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())) {
+ return TimeObservationBorderNodeEditPart.VISUAL_ID;
+ }
+ break;
+ case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return TimeConstraintBorderNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())) {
+ return TimeObservationBorderNodeEditPart.VISUAL_ID;
+ }
+ break;
+ case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return TimeConstraintBorderNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())) {
+ return TimeObservationBorderNodeEditPart.VISUAL_ID;
}
break;
case InteractionInteractionCompartmentEditPart.VISUAL_ID:
@@ -267,9 +283,6 @@ public class UMLVisualIDRegistry {
if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPart.VISUAL_ID;
}
- if (UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())) {
- return DurationObservationEditPart.VISUAL_ID;
- }
break;
case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
if (UMLPackage.eINSTANCE.getInteractionOperand().isSuperTypeOf(domainElement.eClass())) {
@@ -315,9 +328,6 @@ public class UMLVisualIDRegistry {
if (InteractionInteractionCompartmentEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (DurationConstraintInMessageEditPart.VISUAL_ID.equals(nodeVisualID)) {
- return true;
- }
if (GateEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
@@ -373,48 +383,45 @@ public class UMLVisualIDRegistry {
if (StateInvariantEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (TimeConstraintEditPart.VISUAL_ID.equals(nodeVisualID)) {
- return true;
- }
- if (TimeObservationEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (DestructionOccurrenceSpecificationEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (DurationConstraintEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (DestructionOccurrenceSpecificationEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (TimeObservationBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
- case StateInvariantEditPart.VISUAL_ID:
- if (StateInvariantNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (StateInvariantLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (TimeObservationBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
- case TimeConstraintEditPart.VISUAL_ID:
- if (TimeConstraintLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (TimeConstraintAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (TimeObservationBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
- case TimeObservationEditPart.VISUAL_ID:
- if (TimeObservationLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case StateInvariantEditPart.VISUAL_ID:
+ if (StateInvariantNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (TimeObservationAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (StateInvariantLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
- case DurationConstraintEditPart.VISUAL_ID:
- if (DurationConstraintLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ if (TimeConstraintBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (DurationConstraintAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (TimeObservationBorderNodeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
@@ -431,24 +438,24 @@ public class UMLVisualIDRegistry {
return true;
}
break;
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- if (DurationConstraintInMessageLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
- return true;
- }
- if (DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case GateEditPart.VISUAL_ID:
+ if (GateNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
- case DurationObservationEditPart.VISUAL_ID:
- if (DurationObservationLabelEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ if (TimeConstraintNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (DurationObservationAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (TimeConstraintAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
- case GateEditPart.VISUAL_ID:
- if (GateNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ if (TimeObservationNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ return true;
+ }
+ if (TimeObservationAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
break;
@@ -471,9 +478,6 @@ public class UMLVisualIDRegistry {
if (CommentEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (DurationObservationEditPart.VISUAL_ID.equals(nodeVisualID)) {
- return true;
- }
break;
case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
if (InteractionOperandEditPart.VISUAL_ID.equals(nodeVisualID)) {
@@ -546,6 +550,22 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ if (DurationConstraintLinkNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ return true;
+ }
+ if (DurationConstraintLinkAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ return true;
+ }
+ break;
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ if (DurationObservationLinkNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ return true;
+ }
+ if (DurationObservationLinkAppliedStereotypeEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ return true;
+ }
+ break;
}
}
return false;
@@ -589,6 +609,12 @@ public class UMLVisualIDRegistry {
if (UMLPackage.eINSTANCE.getGeneralOrdering().isSuperTypeOf(domainElement.eClass())) {
return GeneralOrderingEditPart.VISUAL_ID;
}
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return DurationConstraintLinkEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())) {
+ return DurationObservationLinkEditPart.VISUAL_ID;
+ }
return "";
}
@@ -696,19 +722,13 @@ public class UMLVisualIDRegistry {
switch (visualID) {
case SequenceDiagramEditPart.VISUAL_ID:
return false;
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
case ConstraintEditPart.VISUAL_ID:
case CommentEditPart.VISUAL_ID:
case ContinuationEditPart.VISUAL_ID:
case StateInvariantEditPart.VISUAL_ID:
- case TimeConstraintEditPart.VISUAL_ID:
- case TimeObservationEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- case DurationObservationEditPart.VISUAL_ID:
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
case GateEditPart.VISUAL_ID:
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java
index e17be236cf6..8f5f9698425 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2018 Atos Origin, Christian W. Damus, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 536486
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.providers;
@@ -154,29 +155,11 @@ public class ElementInitializers {
}
/**
- * @generated NOT init Time Interval
- */
- public void init_TimeConstraint_Shape(TimeConstraint instance) {
- try {
- TimeInterval newInstance_0_0 = UMLFactory.eINSTANCE.createTimeInterval();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = name_specification_TimeConstraint_Shape(newInstance_0_0);
- newInstance_0_0.setName((String) value_0_0_0);
- // init Time Interval
- init_TimeInterval(newInstance_0_0);
- Object value_1 = name_TimeConstraint_Shape(instance);
- instance.setName((String) value_1);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
* @generated
*/
- public void init_TimeObservation_Shape(TimeObservation instance) {
+ public void init_DestructionOccurrenceSpecification_Shape(DestructionOccurrenceSpecification instance) {
try {
- Object value_0 = name_TimeObservation_Shape(instance);
+ Object value_0 = name_DestructionOccurrenceSpecification_Shape(instance);
if (value_0 != null) {
instance.setName((String) value_0);
}
@@ -186,18 +169,16 @@ public class ElementInitializers {
}
/**
- * @generated NOT init Duration Interval
+ * @generated
*/
- public void init_DurationConstraint_Shape(DurationConstraint instance) {
+ public void init_Constraint_Shape(Constraint instance) {
try {
- DurationInterval newInstance_0_0 = UMLFactory.eINSTANCE.createDurationInterval();
+ LiteralString newInstance_0_0 = UMLFactory.eINSTANCE.createLiteralString();
instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = name_specification_DurationConstraint_Shape(newInstance_0_0);
- newInstance_0_0.setName((String) value_0_0_0);
- // init Duration Interval
- init_DurationInterval(newInstance_0_0);
- Object value_1 = name_DurationConstraint_Shape(instance);
- instance.setName((String) value_1);
+ Object value_0_0_0 = value_specification_Constraint_Shape(newInstance_0_0);
+ if (value_0_0_0 != null) {
+ newInstance_0_0.setValue((String) value_0_0_0);
+ }
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
}
@@ -206,11 +187,11 @@ public class ElementInitializers {
/**
* @generated
*/
- public void init_DestructionOccurrenceSpecification_Shape(DestructionOccurrenceSpecification instance) {
+ public void init_Comment_Shape(Comment instance) {
try {
- Object value_0 = name_DestructionOccurrenceSpecification_Shape(instance);
+ Object value_0 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getComment(), null).evaluate(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setBody((String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -220,13 +201,11 @@ public class ElementInitializers {
/**
* @generated
*/
- public void init_Constraint_Shape(Constraint instance) {
+ public void init_TimeConstraint_Shape(TimeConstraint instance) {
try {
- LiteralString newInstance_0_0 = UMLFactory.eINSTANCE.createLiteralString();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = value_specification_Constraint_Shape(newInstance_0_0);
- if (value_0_0_0 != null) {
- newInstance_0_0.setValue((String) value_0_0_0);
+ Object value_0 = name_TimeConstraint_Shape(instance);
+ if (value_0 != null) {
+ instance.setName((String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -236,11 +215,11 @@ public class ElementInitializers {
/**
* @generated
*/
- public void init_Comment_Shape(Comment instance) {
+ public void init_TimeObservation_Shape(TimeObservation instance) {
try {
- Object value_0 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getComment(), null).evaluate(instance);
+ Object value_0 = name_TimeObservation_Shape(instance);
if (value_0 != null) {
- instance.setBody((String) value_0);
+ instance.setName((String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -294,18 +273,14 @@ public class ElementInitializers {
}
/**
- * @generated NOT init Duration Interval
+ * @generated
*/
- public void init_DurationConstraint_Shape_CN(DurationConstraint instance) {
+ public void init_GeneralOrdering_Edge(GeneralOrdering instance) {
try {
- DurationInterval newInstance_0_0 = UMLFactory.eINSTANCE.createDurationInterval();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = name_specification_DurationConstraint_Shape_CN(newInstance_0_0);
- newInstance_0_0.setName((String) value_0_0_0);
- // init Duration Interval
- init_DurationInterval(newInstance_0_0);
- Object value_1 = name_DurationConstraint_Shape_CN(instance);
- instance.setName((String) value_1);
+ Object value_0 = name_GeneralOrdering_Edge(instance);
+ if (value_0 != null) {
+ instance.setName((String) value_0);
+ }
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
}
@@ -314,9 +289,9 @@ public class ElementInitializers {
/**
* @generated
*/
- public void init_DurationObservation_Shape(DurationObservation instance) {
+ public void init_DurationConstraint_Edge(DurationConstraint instance) {
try {
- Object value_0 = name_DurationObservation_Shape(instance);
+ Object value_0 = name_DurationConstraint_Edge(instance);
if (value_0 != null) {
instance.setName((String) value_0);
}
@@ -328,9 +303,9 @@ public class ElementInitializers {
/**
* @generated
*/
- public void init_GeneralOrdering_Edge(GeneralOrdering instance) {
+ public void init_DurationObservation_Edge(DurationObservation instance) {
try {
- Object value_0 = name_GeneralOrdering_Edge(instance);
+ Object value_0 = name_DurationObservation_Edge(instance);
if (value_0 != null) {
instance.setName((String) value_0);
}
@@ -391,77 +366,49 @@ public class ElementInitializers {
/**
* @generated
*/
- private String name_TimeConstraint_Shape(TimeConstraint it) {
- return getNamedElement(it, "", it.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_specification_TimeConstraint_Shape(TimeInterval it) {
+ private String name_DestructionOccurrenceSpecification_Shape(DestructionOccurrenceSpecification it) {
return getNamedElement(it, "", it.eClass().getName(), "");
}
/**
* @generated
*/
- private String name_TimeObservation_Shape(TimeObservation it) {
- return getNamedElement(it, "", "t", "");
- }
-
- /**
- * @generated
- */
- private String name_DurationConstraint_Shape(DurationConstraint it) {
- return getNamedElement(it, "", it.eClass().getName(), "");
+ private String value_specification_Constraint_Shape(LiteralString it) {
+ return "";
}
/**
* @generated
*/
- private String name_specification_DurationConstraint_Shape(DurationInterval it) {
+ private String name_TimeConstraint_Shape(TimeConstraint it) {
return getNamedElement(it, "", it.eClass().getName(), "");
}
/**
* @generated
*/
- private String name_DestructionOccurrenceSpecification_Shape(DestructionOccurrenceSpecification it) {
+ private String name_TimeObservation_Shape(TimeObservation it) {
return getNamedElement(it, "", it.eClass().getName(), "");
}
/**
* @generated
*/
- private String value_specification_Constraint_Shape(LiteralString it) {
- return "";
- }
-
- /**
- * @generated
- */
- private String name_DurationConstraint_Shape_CN(DurationConstraint it) {
+ private String name_GeneralOrdering_Edge(GeneralOrdering it) {
return getNamedElement(it, "", it.eClass().getName(), "");
}
/**
* @generated
*/
- private String name_specification_DurationConstraint_Shape_CN(DurationInterval it) {
+ private String name_DurationConstraint_Edge(DurationConstraint it) {
return getNamedElement(it, "", it.eClass().getName(), "");
}
/**
* @generated
*/
- private String name_DurationObservation_Shape(DurationObservation it) {
- return getNamedElement(it, "", "d", "");
- }
-
- /**
- * @generated
- */
- private String name_GeneralOrdering_Edge(GeneralOrdering it) {
+ private String name_DurationObservation_Edge(DurationObservation it) {
return getNamedElement(it, "", it.eClass().getName(), "");
}
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 66b5edf531c..b3a0df15d68 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
@@ -37,9 +37,8 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
@@ -55,8 +54,8 @@ 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.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintBorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationBorderNodeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.graphics.Image;
import org.eclipse.uml2.uml.UMLPackage;
@@ -146,21 +145,6 @@ public class UMLElementTypes {
/**
* @generated
*/
- public static final IElementType TimeConstraint_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.TimeConstraint_Shape"); //$NON-NLS-1$
- /**
- * @generated
- */
- public static final IElementType TimeObservation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.TimeObservation_Shape"); //$NON-NLS-1$
- /**
- * @generated
- */
- public static final IElementType DurationConstraint_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.DurationConstraint_Shape"); //$NON-NLS-1$
- /**
- * @generated
- */
public static final IElementType DestructionOccurrenceSpecification_Shape = getElementTypeByUniqueId(
"org.eclipse.papyrus.umldi.DestructionOccurrenceSpecification_Shape"); //$NON-NLS-1$
/**
@@ -176,17 +160,19 @@ public class UMLElementTypes {
/**
* @generated
*/
- public static final IElementType DurationConstraint_Shape_CN = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.DurationConstraint_Shape_CN"); //$NON-NLS-1$
+ public static final IElementType Gate_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Gate_Shape"); //$NON-NLS-1$
+
/**
* @generated
*/
- public static final IElementType DurationObservation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.DurationObservation_Shape"); //$NON-NLS-1$
+ public static final IElementType TimeConstraint_Shape = getElementTypeByUniqueId(
+ "org.eclipse.papyrus.umldi.TimeConstraint_Shape"); //$NON-NLS-1$
+
/**
* @generated
*/
- public static final IElementType Gate_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Gate_Shape"); //$NON-NLS-1$
+ public static final IElementType TimeObservation_Shape = getElementTypeByUniqueId(
+ "org.eclipse.papyrus.umldi.TimeObservation_Shape"); //$NON-NLS-1$
/**
* @generated
@@ -247,6 +233,18 @@ public class UMLElementTypes {
/**
* @generated
*/
+ public static final IElementType DurationConstraint_Edge = getElementTypeByUniqueId(
+ "org.eclipse.papyrus.umldi.DurationConstraint_Edge"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType DurationObservation_Edge = getElementTypeByUniqueId(
+ "org.eclipse.papyrus.umldi.DurationObservation_Edge"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static ImageDescriptor getImageDescriptor(ENamedElement element) {
return elementTypeImages.getImageDescriptor(element);
}
@@ -305,12 +303,6 @@ public class UMLElementTypes {
elements.put(StateInvariant_Shape, UMLPackage.eINSTANCE.getStateInvariant());
- elements.put(TimeConstraint_Shape, UMLPackage.eINSTANCE.getTimeConstraint());
-
- elements.put(TimeObservation_Shape, UMLPackage.eINSTANCE.getTimeObservation());
-
- elements.put(DurationConstraint_Shape, UMLPackage.eINSTANCE.getDurationConstraint());
-
elements.put(DestructionOccurrenceSpecification_Shape,
UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
@@ -318,11 +310,11 @@ public class UMLElementTypes {
elements.put(Comment_Shape, UMLPackage.eINSTANCE.getComment());
- elements.put(DurationConstraint_Shape_CN, UMLPackage.eINSTANCE.getDurationConstraint());
+ elements.put(Gate_Shape, UMLPackage.eINSTANCE.getGate());
- elements.put(DurationObservation_Shape, UMLPackage.eINSTANCE.getDurationObservation());
+ elements.put(TimeConstraint_Shape, UMLPackage.eINSTANCE.getTimeConstraint());
- elements.put(Gate_Shape, UMLPackage.eINSTANCE.getGate());
+ elements.put(TimeObservation_Shape, UMLPackage.eINSTANCE.getTimeObservation());
elements.put(Message_SynchEdge, UMLPackage.eINSTANCE.getMessage());
@@ -345,6 +337,10 @@ public class UMLElementTypes {
elements.put(GeneralOrdering_Edge, UMLPackage.eINSTANCE.getGeneralOrdering());
elements.put(Constraint_ContextEdge, UMLPackage.eINSTANCE.getConstraint_Context());
+
+ elements.put(DurationConstraint_Edge, UMLPackage.eINSTANCE.getDurationConstraint());
+
+ elements.put(DurationObservation_Edge, UMLPackage.eINSTANCE.getDurationObservation());
}
return elements.get(type);
}
@@ -373,15 +369,12 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(ActionExecutionSpecification_Shape);
KNOWN_ELEMENT_TYPES.add(BehaviorExecutionSpecification_Shape);
KNOWN_ELEMENT_TYPES.add(StateInvariant_Shape);
- KNOWN_ELEMENT_TYPES.add(TimeConstraint_Shape);
- KNOWN_ELEMENT_TYPES.add(TimeObservation_Shape);
- KNOWN_ELEMENT_TYPES.add(DurationConstraint_Shape);
KNOWN_ELEMENT_TYPES.add(DestructionOccurrenceSpecification_Shape);
KNOWN_ELEMENT_TYPES.add(Constraint_Shape);
KNOWN_ELEMENT_TYPES.add(Comment_Shape);
- KNOWN_ELEMENT_TYPES.add(DurationConstraint_Shape_CN);
- KNOWN_ELEMENT_TYPES.add(DurationObservation_Shape);
KNOWN_ELEMENT_TYPES.add(Gate_Shape);
+ KNOWN_ELEMENT_TYPES.add(TimeConstraint_Shape);
+ KNOWN_ELEMENT_TYPES.add(TimeObservation_Shape);
KNOWN_ELEMENT_TYPES.add(Message_SynchEdge);
KNOWN_ELEMENT_TYPES.add(Message_AsynchEdge);
KNOWN_ELEMENT_TYPES.add(Message_ReplyEdge);
@@ -393,6 +386,8 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(Constraint_ConstrainedElementEdge);
KNOWN_ELEMENT_TYPES.add(GeneralOrdering_Edge);
KNOWN_ELEMENT_TYPES.add(Constraint_ContextEdge);
+ KNOWN_ELEMENT_TYPES.add(DurationConstraint_Edge);
+ KNOWN_ELEMENT_TYPES.add(DurationObservation_Edge);
}
boolean result = KNOWN_ELEMENT_TYPES.contains(elementType);
@@ -435,24 +430,18 @@ public class UMLElementTypes {
return BehaviorExecutionSpecification_Shape;
case StateInvariantEditPart.VISUAL_ID:
return StateInvariant_Shape;
- case TimeConstraintEditPart.VISUAL_ID:
- return TimeConstraint_Shape;
- case TimeObservationEditPart.VISUAL_ID:
- return TimeObservation_Shape;
- case DurationConstraintEditPart.VISUAL_ID:
- return DurationConstraint_Shape;
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return DestructionOccurrenceSpecification_Shape;
case ConstraintEditPart.VISUAL_ID:
return Constraint_Shape;
case CommentEditPart.VISUAL_ID:
return Comment_Shape;
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return DurationConstraint_Shape_CN;
- case DurationObservationEditPart.VISUAL_ID:
- return DurationObservation_Shape;
case GateEditPart.VISUAL_ID:
return Gate_Shape;
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ return TimeConstraint_Shape;
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return TimeObservation_Shape;
case MessageSyncEditPart.VISUAL_ID:
return Message_SynchEdge;
case MessageAsyncEditPart.VISUAL_ID:
@@ -475,6 +464,10 @@ public class UMLElementTypes {
return GeneralOrdering_Edge;
case ContextLinkEditPart.VISUAL_ID:
return Constraint_ContextEdge;
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ return DurationConstraint_Edge;
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ return DurationObservation_Edge;
}
}
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java
index 803f55f7f11..f2e454b174c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2018 Atos Origin, Christian W. Damus, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 536486
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.providers;
@@ -29,17 +30,16 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ObservationParser;
import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Constraint2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkNameEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart;
@@ -63,15 +63,12 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncNameEditPa
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.DurationObservationParser;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.InteractionUseCustomParsers;
import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.LifelineCustomParsers;
import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.MessageCustomParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.TimeConstraintParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.TimeObservationParser;
import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.uml2.uml.UMLPackage;
@@ -203,96 +200,6 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- private TimeConstraintParser timeConstraint_ConstraintLabel_Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraint_ConstraintLabel_Parser() {
- if (timeConstraint_ConstraintLabel_Parser == null) {
- timeConstraint_ConstraintLabel_Parser = new TimeConstraintParser();
- }
- return timeConstraint_ConstraintLabel_Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser timeConstraint_StereotypeLabel_Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraint_StereotypeLabel_Parser() {
- if (timeConstraint_StereotypeLabel_Parser == null) {
- timeConstraint_StereotypeLabel_Parser = new AppliedStereotypeParser();
- }
- return timeConstraint_StereotypeLabel_Parser;
- }
-
- /**
- * @generated
- */
- private TimeObservationParser timeObservation_NameLabel_Parser;
-
- /**
- * @generated
- */
- private IParser getTimeObservation_NameLabel_Parser() {
- if (timeObservation_NameLabel_Parser == null) {
- timeObservation_NameLabel_Parser = new TimeObservationParser();
- }
- return timeObservation_NameLabel_Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser timeObservation_StereotypeLabel_Parser;
-
- /**
- * @generated
- */
- private IParser getTimeObservation_StereotypeLabel_Parser() {
- if (timeObservation_StereotypeLabel_Parser == null) {
- timeObservation_StereotypeLabel_Parser = new AppliedStereotypeParser();
- }
- return timeObservation_StereotypeLabel_Parser;
- }
-
- /**
- * @generated
- */
- private TimeConstraintParser durationConstraint_BodyLabel_Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraint_BodyLabel_Parser() {
- if (durationConstraint_BodyLabel_Parser == null) {
- durationConstraint_BodyLabel_Parser = new TimeConstraintParser();
- }
- return durationConstraint_BodyLabel_Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser durationConstraint_StereotypeLabel_Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraint_StereotypeLabel_Parser() {
- if (durationConstraint_StereotypeLabel_Parser == null) {
- durationConstraint_StereotypeLabel_Parser = new AppliedStereotypeParser();
- }
- return durationConstraint_StereotypeLabel_Parser;
- }
-
- /**
- * @generated
- */
private IParser constraint_NameLabel_Parser;
/**
@@ -340,78 +247,78 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- private TimeConstraintParser durationConstraint_BodyLabel_CN_Parser;
+ private IParser gate_NameLabel_Parser;
/**
* @generated
*/
- private IParser getDurationConstraint_BodyLabel_CN_Parser() {
- if (durationConstraint_BodyLabel_CN_Parser == null) {
- durationConstraint_BodyLabel_CN_Parser = new TimeConstraintParser();
+ private IParser getGate_NameLabel_Parser() {
+ if (gate_NameLabel_Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ gate_NameLabel_Parser = parser;
}
- return durationConstraint_BodyLabel_CN_Parser;
+ return gate_NameLabel_Parser;
}
/**
* @generated
*/
- private AppliedStereotypeParser durationConstraint_StereotypeLabel_CN_Parser;
+ private ConstraintParser timeConstraint_NameLabel_Parser;
/**
* @generated
*/
- private IParser getDurationConstraint_StereotypeLabel_CN_Parser() {
- if (durationConstraint_StereotypeLabel_CN_Parser == null) {
- durationConstraint_StereotypeLabel_CN_Parser = new AppliedStereotypeParser();
+ private IParser getTimeConstraint_NameLabel_Parser() {
+ if (timeConstraint_NameLabel_Parser == null) {
+ timeConstraint_NameLabel_Parser = new ConstraintParser();
}
- return durationConstraint_StereotypeLabel_CN_Parser;
+ return timeConstraint_NameLabel_Parser;
}
/**
* @generated
*/
- private DurationObservationParser durationObservation_NameLabel_Parser;
+ private AppliedStereotypeParser timeConstraint_StereotypeLabel_Parser;
/**
* @generated
*/
- private IParser getDurationObservation_NameLabel_Parser() {
- if (durationObservation_NameLabel_Parser == null) {
- durationObservation_NameLabel_Parser = new DurationObservationParser();
+ private IParser getTimeConstraint_StereotypeLabel_Parser() {
+ if (timeConstraint_StereotypeLabel_Parser == null) {
+ timeConstraint_StereotypeLabel_Parser = new AppliedStereotypeParser();
}
- return durationObservation_NameLabel_Parser;
+ return timeConstraint_StereotypeLabel_Parser;
}
/**
* @generated
*/
- private AppliedStereotypeParser durationObservation_StereotypeLabel_Parser;
+ private ObservationParser timeObservation_NameLabel_Parser;
/**
* @generated
*/
- private IParser getDurationObservation_StereotypeLabel_Parser() {
- if (durationObservation_StereotypeLabel_Parser == null) {
- durationObservation_StereotypeLabel_Parser = new AppliedStereotypeParser();
+ private IParser getTimeObservation_NameLabel_Parser() {
+ if (timeObservation_NameLabel_Parser == null) {
+ timeObservation_NameLabel_Parser = new ObservationParser();
}
- return durationObservation_StereotypeLabel_Parser;
+ return timeObservation_NameLabel_Parser;
}
/**
* @generated
*/
- private IParser gate_NameLabel_Parser;
+ private AppliedStereotypeParser timeObservation_StereotypeLabel_Parser;
/**
* @generated
*/
- private IParser getGate_NameLabel_Parser() {
- if (gate_NameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- gate_NameLabel_Parser = parser;
+ private IParser getTimeObservation_StereotypeLabel_Parser() {
+ if (timeObservation_StereotypeLabel_Parser == null) {
+ timeObservation_StereotypeLabel_Parser = new AppliedStereotypeParser();
}
- return gate_NameLabel_Parser;
+ return timeObservation_StereotypeLabel_Parser;
}
/**
@@ -642,6 +549,66 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private ConstraintParser durationConstraint_NameLabel_Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationConstraint_NameLabel_Parser() {
+ if (durationConstraint_NameLabel_Parser == null) {
+ durationConstraint_NameLabel_Parser = new ConstraintParser();
+ }
+ return durationConstraint_NameLabel_Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser durationConstraint_StereotypeLabel_Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationConstraint_StereotypeLabel_Parser() {
+ if (durationConstraint_StereotypeLabel_Parser == null) {
+ durationConstraint_StereotypeLabel_Parser = new AppliedStereotypeParser();
+ }
+ return durationConstraint_StereotypeLabel_Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObservationParser durationObservation_NameLabel_Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationObservation_NameLabel_Parser() {
+ if (durationObservation_NameLabel_Parser == null) {
+ durationObservation_NameLabel_Parser = new ObservationParser();
+ }
+ return durationObservation_NameLabel_Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser durationObservation_StereotypeLabel_Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationObservation_StereotypeLabel_Parser() {
+ if (durationObservation_StereotypeLabel_Parser == null) {
+ durationObservation_StereotypeLabel_Parser = new AppliedStereotypeParser();
+ }
+ return durationObservation_StereotypeLabel_Parser;
+ }
+
+ /**
+ * @generated
+ */
protected IParser getParser(String visualID) {
if (visualID != null) {
switch (visualID) {
@@ -664,21 +631,6 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case StateInvariantLabelEditPart.VISUAL_ID:
return getStateInvariant_ConstraintLabel_Parser();
- case TimeConstraintLabelEditPart.VISUAL_ID:
- return getTimeConstraint_ConstraintLabel_Parser();
- case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return getTimeConstraint_StereotypeLabel_Parser();
-
- case TimeObservationLabelEditPart.VISUAL_ID:
- return getTimeObservation_NameLabel_Parser();
- case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
- return getTimeObservation_StereotypeLabel_Parser();
-
- case DurationConstraintLabelEditPart.VISUAL_ID:
- return getDurationConstraint_BodyLabel_Parser();
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return getDurationConstraint_StereotypeLabel_Parser();
-
case ConstraintNameEditPart.VISUAL_ID:
return getConstraint_NameLabel_Parser();
case Constraint2EditPart.VISUAL_ID:
@@ -687,19 +639,19 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case CommentBodyEditPart.VISUAL_ID:
return getComment_BodyLabel_Parser();
- case DurationConstraintInMessageLabelEditPart.VISUAL_ID:
- return getDurationConstraint_BodyLabel_CN_Parser();
- case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- return getDurationConstraint_StereotypeLabel_CN_Parser();
-
- case DurationObservationLabelEditPart.VISUAL_ID:
- return getDurationObservation_NameLabel_Parser();
- case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- return getDurationObservation_StereotypeLabel_Parser();
-
case GateNameEditPart.VISUAL_ID:
return getGate_NameLabel_Parser();
+ case TimeConstraintNameEditPart.VISUAL_ID:
+ return getTimeConstraint_NameLabel_Parser();
+ case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
+ return getTimeConstraint_StereotypeLabel_Parser();
+
+ case TimeObservationNameEditPart.VISUAL_ID:
+ return getTimeObservation_NameLabel_Parser();
+ case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
+ return getTimeObservation_StereotypeLabel_Parser();
+
case MessageSyncNameEditPart.VISUAL_ID:
return getMessage_SynchNameLabel_Parser();
case MessageSyncAppliedStereotypeEditPart.VISUAL_ID:
@@ -738,6 +690,16 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID:
return getGeneralOrdering_StereotypeLabel_Parser();
+ case DurationConstraintLinkNameEditPart.VISUAL_ID:
+ return getDurationConstraint_NameLabel_Parser();
+ case DurationConstraintLinkAppliedStereotypeEditPart.VISUAL_ID:
+ return getDurationConstraint_StereotypeLabel_Parser();
+
+ case DurationObservationLinkNameEditPart.VISUAL_ID:
+ return getDurationObservation_NameLabel_Parser();
+ case DurationObservationLinkAppliedStereotypeEditPart.VISUAL_ID:
+ return getDurationObservation_StereotypeLabel_Parser();
+
}
}
return null;
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 c9fc0ca2ef7..a790e212465 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
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2018 Atos Origin, Christian W. Damus, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -12,6 +12,7 @@
* Contributors:
* Atos Origin - Initial API and implementation
* Vincent Lorenzo - vincent.lorenzo@cea.fr - CEA - LIST
+ * Christian W. Damus - bug 536486
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.providers;
@@ -77,15 +78,12 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLinkNameEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLinkNameEditPart;
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.GeneralOrderingAppliedStereotypeEditPart;
@@ -125,11 +123,11 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPar
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintBorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationBorderNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontData;
@@ -202,7 +200,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* <p>
* This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
- *
+ *
* @return the unique identifier of the diagram for which views are provided.
*/
return SequenceDiagramEditPart.MODEL_ID;
@@ -266,15 +264,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case ActionExecutionSpecificationEditPart.VISUAL_ID:
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
case StateInvariantEditPart.VISUAL_ID:
- case TimeConstraintEditPart.VISUAL_ID:
- case TimeObservationEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
case ConstraintEditPart.VISUAL_ID:
case CommentEditPart.VISUAL_ID:
- case DurationObservationEditPart.VISUAL_ID:
case GateEditPart.VISUAL_ID:
- case DurationConstraintInMessageEditPart.VISUAL_ID:
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
if (domainElement == null || !visualID
.equals(UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement))) {
return false; // visual id in semantic hint should match visual id for domain element
@@ -366,12 +361,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
preferencesHint);
case StateInvariantEditPart.VISUAL_ID:
return createStateInvariant_Shape(domainElement, containerView, index, persisted, preferencesHint);
- case TimeConstraintEditPart.VISUAL_ID:
- return createTimeConstraint_Shape(domainElement, containerView, index, persisted, preferencesHint);
- case TimeObservationEditPart.VISUAL_ID:
- return createTimeObservation_Shape(domainElement, containerView, index, persisted, preferencesHint);
- case DurationConstraintEditPart.VISUAL_ID:
- return createDurationConstraint_Shape(domainElement, containerView, index, persisted, preferencesHint);
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return createDestructionOccurrenceSpecification_Shape(domainElement, containerView, index, persisted,
preferencesHint);
@@ -379,13 +368,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return createConstraint_Shape(domainElement, containerView, index, persisted, preferencesHint);
case CommentEditPart.VISUAL_ID:
return createComment_Shape(domainElement, containerView, index, persisted, preferencesHint);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return createDurationConstraint_Shape_CN(domainElement, containerView, index, persisted,
- preferencesHint);
- case DurationObservationEditPart.VISUAL_ID:
- return createDurationObservation_Shape(domainElement, containerView, index, persisted, preferencesHint);
case GateEditPart.VISUAL_ID:
return createGate_Shape(domainElement, containerView, index, persisted, preferencesHint);
+ case TimeConstraintBorderNodeEditPart.VISUAL_ID:
+ return createTimeConstraint_Shape(domainElement, containerView, index, persisted, preferencesHint);
+ case TimeObservationBorderNodeEditPart.VISUAL_ID:
+ return createTimeObservation_Shape(domainElement, containerView, index, persisted, preferencesHint);
}
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
@@ -433,6 +421,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
preferencesHint);
case ContextLinkEditPart.VISUAL_ID:
return createConstraint_ContextEdge(containerView, index, persisted, preferencesHint);
+ case DurationConstraintLinkEditPart.VISUAL_ID:
+ return createDurationConstraint_Edge(getSemanticElement(semanticAdapter), containerView, index,
+ persisted, preferencesHint);
+ case DurationObservationLinkEditPart.VISUAL_ID:
+ return createDurationObservation_Edge(getSemanticElement(semanticAdapter), containerView, index,
+ persisted, preferencesHint);
}
}
// can never happen, provided #provides(CreateEdgeViewOperation) is correct
@@ -633,97 +627,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createTimeConstraint_Shape(EObject domainElement, View containerView, int index, boolean persisted,
- PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
- Node timeConstraint_ConstraintLabel = createLabel(node,
- UMLVisualIDRegistry.getType(TimeConstraintLabelEditPart.VISUAL_ID));
- timeConstraint_ConstraintLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location timeConstraint_ConstraintLabel_Location = (Location) timeConstraint_ConstraintLabel
- .getLayoutConstraint();
- timeConstraint_ConstraintLabel_Location.setX(0);
- timeConstraint_ConstraintLabel_Location.setY(15);
- Node timeConstraint_StereotypeLabel = createLabel(node,
- UMLVisualIDRegistry.getType(TimeConstraintAppliedStereotypeEditPart.VISUAL_ID));
- timeConstraint_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location timeConstraint_StereotypeLabel_Location = (Location) timeConstraint_StereotypeLabel
- .getLayoutConstraint();
- timeConstraint_StereotypeLabel_Location.setX(0);
- timeConstraint_StereotypeLabel_Location.setY(-22);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createTimeObservation_Shape(EObject domainElement, View containerView, int index, boolean persisted,
- PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
- Node timeObservation_NameLabel = createLabel(node,
- UMLVisualIDRegistry.getType(TimeObservationLabelEditPart.VISUAL_ID));
- timeObservation_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location timeObservation_NameLabel_Location = (Location) timeObservation_NameLabel.getLayoutConstraint();
- timeObservation_NameLabel_Location.setX(0);
- timeObservation_NameLabel_Location.setY(15);
- Node timeObservation_StereotypeLabel = createLabel(node,
- UMLVisualIDRegistry.getType(TimeObservationAppliedStereotypeEditPart.VISUAL_ID));
- timeObservation_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location timeObservation_StereotypeLabel_Location = (Location) timeObservation_StereotypeLabel
- .getLayoutConstraint();
- timeObservation_StereotypeLabel_Location.setX(0);
- timeObservation_StereotypeLabel_Location.setY(-22);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDurationConstraint_Shape(EObject domainElement, View containerView, int index, boolean persisted,
- PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
- Node durationConstraint_BodyLabel = createLabel(node,
- UMLVisualIDRegistry.getType(DurationConstraintLabelEditPart.VISUAL_ID));
- durationConstraint_BodyLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location durationConstraint_BodyLabel_Location = (Location) durationConstraint_BodyLabel.getLayoutConstraint();
- durationConstraint_BodyLabel_Location.setX(0);
- durationConstraint_BodyLabel_Location.setY(15);
- Node durationConstraint_StereotypeLabel = createLabel(node,
- UMLVisualIDRegistry.getType(DurationConstraintAppliedStereotypeEditPart.VISUAL_ID));
- durationConstraint_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location durationConstraint_StereotypeLabel_Location = (Location) durationConstraint_StereotypeLabel
- .getLayoutConstraint();
- durationConstraint_StereotypeLabel_Location.setX(0);
- durationConstraint_StereotypeLabel_Location.setY(-22);
- return node;
- }
-
- /**
- * @generated
- */
public Node createDestructionOccurrenceSpecification_Shape(EObject domainElement, View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
@@ -779,75 +682,83 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createDurationConstraint_Shape_CN(EObject domainElement, View containerView, int index,
- boolean persisted, PreferencesHint preferencesHint) {
+ public Node createGate_Shape(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
+ node.setType(UMLVisualIDRegistry.getType(GateEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
- Node durationConstraint_BodyLabel_CN = createLabel(node,
- UMLVisualIDRegistry.getType(DurationConstraintInMessageLabelEditPart.VISUAL_ID));
- Node durationConstraint_StereotypeLabel_CN = createLabel(node,
- UMLVisualIDRegistry.getType(DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID));
- durationConstraint_StereotypeLabel_CN.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location durationConstraint_StereotypeLabel_CN_Location = (Location) durationConstraint_StereotypeLabel_CN
- .getLayoutConstraint();
- durationConstraint_StereotypeLabel_CN_Location.setX(0);
- durationConstraint_StereotypeLabel_CN_Location.setY(-22);
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Gate");
+ Node gate_NameLabel = createLabel(node, UMLVisualIDRegistry.getType(GateNameEditPart.VISUAL_ID));
+ gate_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location gate_NameLabel_Location = (Location) gate_NameLabel.getLayoutConstraint();
+ gate_NameLabel_Location.setX(25);
+ gate_NameLabel_Location.setY(3);
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(node, prefStore, "Gate");
return node;
}
/**
* @generated
*/
- public Node createDurationObservation_Shape(EObject domainElement, View containerView, int index, boolean persisted,
+ public Node createTimeConstraint_Shape(EObject domainElement, View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
+ node.setType(UMLVisualIDRegistry.getType(TimeConstraintBorderNodeEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationObservation");
- Node durationObservation_NameLabel = createLabel(node,
- UMLVisualIDRegistry.getType(DurationObservationLabelEditPart.VISUAL_ID));
- Node durationObservation_StereotypeLabel = createLabel(node,
- UMLVisualIDRegistry.getType(DurationObservationAppliedStereotypeEditPart.VISUAL_ID));
- durationObservation_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location durationObservation_StereotypeLabel_Location = (Location) durationObservation_StereotypeLabel
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
+ Node timeConstraint_NameLabel = createLabel(node,
+ UMLVisualIDRegistry.getType(TimeConstraintNameEditPart.VISUAL_ID));
+ timeConstraint_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location timeConstraint_NameLabel_Location = (Location) timeConstraint_NameLabel.getLayoutConstraint();
+ timeConstraint_NameLabel_Location.setX(25);
+ timeConstraint_NameLabel_Location.setY(3);
+ Node timeConstraint_StereotypeLabel = createLabel(node,
+ UMLVisualIDRegistry.getType(TimeConstraintAppliedStereotypeEditPart.VISUAL_ID));
+ timeConstraint_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location timeConstraint_StereotypeLabel_Location = (Location) timeConstraint_StereotypeLabel
.getLayoutConstraint();
- durationObservation_StereotypeLabel_Location.setX(0);
- durationObservation_StereotypeLabel_Location.setY(-22);
+ timeConstraint_StereotypeLabel_Location.setX(0);
+ timeConstraint_StereotypeLabel_Location.setY(-22);
return node;
}
/**
* @generated
*/
- public Node createGate_Shape(EObject domainElement, View containerView, int index, boolean persisted,
+ public Node createTimeObservation_Shape(EObject domainElement, View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(GateEditPart.VISUAL_ID));
+ node.setType(UMLVisualIDRegistry.getType(TimeObservationBorderNodeEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Gate");
- Node gate_NameLabel = createLabel(node, UMLVisualIDRegistry.getType(GateNameEditPart.VISUAL_ID));
- gate_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location gate_NameLabel_Location = (Location) gate_NameLabel.getLayoutConstraint();
- gate_NameLabel_Location.setX(25);
- gate_NameLabel_Location.setY(3);
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(node, prefStore, "Gate");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
+ Node timeObservation_NameLabel = createLabel(node,
+ UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
+ timeObservation_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location timeObservation_NameLabel_Location = (Location) timeObservation_NameLabel.getLayoutConstraint();
+ timeObservation_NameLabel_Location.setX(25);
+ timeObservation_NameLabel_Location.setY(3);
+ Node timeObservation_StereotypeLabel = createLabel(node,
+ UMLVisualIDRegistry.getType(TimeObservationAppliedStereotypeEditPart.VISUAL_ID));
+ timeObservation_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location timeObservation_StereotypeLabel_Location = (Location) timeObservation_StereotypeLabel
+ .getLayoutConstraint();
+ timeObservation_StereotypeLabel_Location.setX(0);
+ timeObservation_StereotypeLabel_Location.setY(-22);
return node;
}
@@ -1266,6 +1177,91 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
+ public Edge createDurationConstraint_Edge(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(DurationConstraintLinkEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DurationConstraint");
+ // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
+ // if (routing != null) {
+ // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ // }
+ Node durationConstraint_NameLabel = createLabel(edge,
+ UMLVisualIDRegistry.getType(DurationConstraintLinkNameEditPart.VISUAL_ID));
+ durationConstraint_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location durationConstraint_NameLabel_Location = (Location) durationConstraint_NameLabel.getLayoutConstraint();
+ durationConstraint_NameLabel_Location.setX(1);
+ durationConstraint_NameLabel_Location.setY(-13);
+ Node durationConstraint_StereotypeLabel = createLabel(edge,
+ UMLVisualIDRegistry.getType(DurationConstraintLinkAppliedStereotypeEditPart.VISUAL_ID));
+ durationConstraint_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location durationConstraint_StereotypeLabel_Location = (Location) durationConstraint_StereotypeLabel
+ .getLayoutConstraint();
+ durationConstraint_StereotypeLabel_Location.setX(1);
+ durationConstraint_StereotypeLabel_Location.setY(-33);
+
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "DurationConstraint");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createDurationObservation_Edge(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(DurationObservationLinkEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DurationObservation");
+ // org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
+ // if (routing != null) {
+ // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ // }
+ Node durationObservation_NameLabel = createLabel(edge,
+ UMLVisualIDRegistry.getType(DurationObservationLinkNameEditPart.VISUAL_ID));
+ durationObservation_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location durationObservation_NameLabel_Location = (Location) durationObservation_NameLabel
+ .getLayoutConstraint();
+ durationObservation_NameLabel_Location.setX(1);
+ durationObservation_NameLabel_Location.setY(-13);
+ Node durationObservation_StereotypeLabel = createLabel(edge,
+ UMLVisualIDRegistry.getType(DurationObservationLinkAppliedStereotypeEditPart.VISUAL_ID));
+ durationObservation_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location durationObservation_StereotypeLabel_Location = (Location) durationObservation_StereotypeLabel
+ .getLayoutConstraint();
+ durationObservation_StereotypeLabel_Location.setX(1);
+ durationObservation_StereotypeLabel_Location.setY(-33);
+
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "DurationObservation");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
protected void stampShortcut(View containerView, Node target) {
if (!SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();

Back to the top