Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java3
13 files changed, 52 insertions, 39 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
index eff27a8d0ab..3a746d5d6ce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
@@ -19,6 +19,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomInteractionOperandCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -52,7 +53,7 @@ public class CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPo
}
// make compound command
CompoundCommand result = new CompoundCommand();
- Command cmd = getGEFWrapper(new CustomInteractionOperandCreateCommand(req));
+ Command cmd = getGEFWrapper(new CustomInteractionOperandCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
result.add(cmd);
// append a command which notifies
// Fixed bug: remove the notify dialog, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=402977
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
index a628bc7e83e..a8f4ecab65d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCombinedFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConsiderIgnoreFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintCreateCommand;
@@ -38,31 +39,31 @@ public class CustomInteractionInteractionCompartmentItemSemanticEditPolicy exten
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ConsiderIgnoreFragment_3007 == req.getElementType()) {
- return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3004 == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Lifeline_3001 == req.getElementType()) {
- return getGEFWrapper(new CustomLifelineCreateCommand(req));
+ return getGEFWrapper(new CustomLifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionUse_3002 == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionUseCreateCommand(req));
+ return getGEFWrapper(new CustomInteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3008 == req.getElementType()) {
- return getGEFWrapper(new CustomConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3009 == req.getElementType()) {
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_3020 == req.getElementType()) {
return getGEFWrapper(new CustomTimeObservationCreateCommand(req));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3021 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
index adf80307fd2..ed33cec95e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
@@ -68,10 +69,10 @@ public class CustomInteractionItemSemanticEditPolicy extends InteractionItemSema
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintInMessageCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintInMessageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
index 39a1c4547c5..45f52fbda6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
@@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCombinedFragmentCreateCommand;
@@ -80,16 +81,16 @@ public class CustomInteractionOperandItemSemanticEditPolicy extends InteractionO
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.InteractionUse_3002 == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionUseCreateCommand(req));
+ return getGEFWrapper(new CustomInteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConsiderIgnoreFragment_3007 == req.getElementType()) {
- return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3004 == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Continuation_3016 == req.getElementType()) {
- return getGEFWrapper(new CustomContinuationCreateCommand(req));
+ return getGEFWrapper(new CustomContinuationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
index 86f6ba5b09e..54c00bcf5d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
@@ -29,6 +29,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomActionExecutionSpecificationCreateCommand;
@@ -93,42 +94,42 @@ public class CustomLifelineItemSemanticEditPolicy extends LifelineItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ActionExecutionSpecification_3006 == req.getElementType()) {
- return getGEFWrapper(new CustomActionExecutionSpecificationCreateCommand(req));
+ return getGEFWrapper(new CustomActionExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.BehaviorExecutionSpecification_3003 == req.getElementType()) {
- return getGEFWrapper(new CustomBehaviorExecutionSpecificationCreateCommand(req));
+ return getGEFWrapper(new CustomBehaviorExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateInvariant_3017 == req.getElementType()) {
- return getGEFWrapper(new CustomStateInvariantCreateCommand(req));
+ return getGEFWrapper(new CustomStateInvariantCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3018 == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragment2CreateCommand(req));
+ return getGEFWrapper(new CustomCombinedFragment2CreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3019 == req.getElementType()) {
- return getGEFWrapper(new CustomTimeConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomTimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
//Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
// if(UMLElementTypes.TimeObservation_3020 == req.getElementType()) {
// return getGEFWrapper(new TimeObservationCreateCommand(req));
// }
if(UMLElementTypes.DurationConstraint_3021 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_3022 == req.getElementType()) {
- return getGEFWrapper(new CustomDestructionOccurrenceSpecificationCreateCommand(req));
+ return getGEFWrapper(new CustomDestructionOccurrenceSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
//add lifelines
if(UMLElementTypes.Lifeline_3001 == req.getElementType()) {
CustomLifelineEditPart lifelineEditPart = (CustomLifelineEditPart)getHost();
if(lifelineEditPart.isInlineCapability()) {
- CustomLifelineCreateCommand cmd = new CustomLifelineCreateCommand(req);
+ CustomLifelineCreateCommand cmd = new CustomLifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost()));
cmd.setAvailableProperties(lifelineEditPart.getAvailableProperties());
return getGEFWrapper(cmd);
}
}
//add DurationObservation/Constraint
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
// Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
// if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java
index d3a38ec96de..200487329aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage2ItemSemanticEditPolicy extends Message2ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java
index 64a5b8a7cce..8a0adca4859 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage3ItemSemanticEditPolicy extends Message3ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java
index 79af282f9df..b06f09f1b90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -71,10 +72,10 @@ public class CustomMessage4ItemSemanticEditPolicy extends Message4ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java
index be8f0da4b7d..1ff17e3e08f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage5ItemSemanticEditPolicy extends Message5ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java
index e2f3a907e1c..dff3856f165 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage6ItemSemanticEditPolicy extends Message6ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java
index 465e67f3f44..2e2b82ac8fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage7ItemSemanticEditPolicy extends Message7ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java
index 1bc40b19bfb..bf6d84a1486 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessageItemSemanticEditPolicy extends MessageItemSemanticEdit
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
index 3a2b208bbad..8fc2f65b830 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomInteractionCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -30,7 +31,7 @@ public class CustomPackageItemSemanticEditPolicy extends PackageItemSemanticEdit
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.Interaction_2001 == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionCreateCommand(req));
+ return getGEFWrapper(new CustomInteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}

Back to the top