diff options
author | Florian Noyrit | 2016-04-18 08:23:09 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-04-19 13:10:07 +0000 |
commit | 74277e4e464813a72120e2f3e1c320eca04a51f2 (patch) | |
tree | 3a71f39f7d7a1c0dad7d8de281f7cb9d7fd531f2 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication | |
parent | 4ea6b237f5db0dc206ce1f239c9bd93d38126aa5 (diff) | |
download | org.eclipse.papyrus-74277e4e464813a72120e2f3e1c320eca04a51f2.tar.gz org.eclipse.papyrus-74277e4e464813a72120e2f3e1c320eca04a51f2.tar.xz org.eclipse.papyrus-74277e4e464813a72120e2f3e1c320eca04a51f2.zip |
Bug 491883 - Remove the ExtendedTypes framework
Change-Id: Ic057d8fef473b82d91e40237ad8d70db8cf07897
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication')
10 files changed, 20 insertions, 355 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF index cbf9e02220a..c3af97d77fa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF @@ -30,7 +30,6 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide;bundle-v org.eclipse.uml2.uml.resources;bundle-version="[5.2.0,6.0.0)", org.eclipse.ui.navigator.resources;bundle-version="[3.5.0,4.0.0)", org.eclipse.ui.navigator;bundle-version="[3.6.0,4.0.0)";visibility:=reexport, - org.eclipse.papyrus.infra.extendedtypes;bundle-version="[2.0.0,3.0.0)", org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[1.2.0,2.0.0)", org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport, org.eclipse.papyrus.uml.service.types;bundle-version="[2.0.0,3.0.0)", diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java index c9350b1c2e8..1d849f14d55 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java @@ -26,8 +26,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -93,28 +91,14 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
+
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
+
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -133,35 +117,19 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
+
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
+
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
+
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java index a1f0bd44509..135243f9ede 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java @@ -26,8 +26,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
@@ -99,21 +97,8 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -121,9 +106,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP return null;
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -145,49 +127,24 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java index 4e22147e4f5..a2bf4f8a34d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java @@ -26,8 +26,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
@@ -99,21 +97,8 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -124,9 +109,6 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema return null;
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -145,49 +127,24 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java index fa5b3539543..3d6088b5035 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java @@ -33,8 +33,6 @@ import org.eclipse.gmf.runtime.notation.Edge; import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
@@ -276,21 +274,7 @@ public class InteractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -318,49 +302,23 @@ public class InteractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java index 81e16149101..fc64234b262 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java @@ -26,8 +26,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
@@ -99,21 +97,7 @@ public class LifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -141,49 +125,24 @@ public class LifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java index ee218fcac87..0c7527be15c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java @@ -24,8 +24,6 @@ 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.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
@@ -89,21 +87,8 @@ public class MessageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -131,49 +116,24 @@ public class MessageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java index d0440c54aad..f024e8a8c5d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java @@ -26,8 +26,6 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
@@ -99,21 +97,8 @@ public class TimeObservationItemSemanticEditPolicyCN extends UMLBaseItemSemantic return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -127,9 +112,6 @@ public class TimeObservationItemSemanticEditPolicyCN extends UMLBaseItemSemantic return null;
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
@@ -145,49 +127,24 @@ public class TimeObservationItemSemanticEditPolicyCN extends UMLBaseItemSemantic return null;
}
IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
+
if (UMLElementTypes.Path_Edge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new MessageCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.DurationObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
if (UMLElementTypes.TimeObservation_EventEdge == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req,
req.getSource(), req.getTarget()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java index f224e99f462..56a72b54515 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java @@ -244,47 +244,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return null; } - /** - * @generated - */ - protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IElementType requestElementType) { - IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer()); - if (provider == null) { - return UnexecutableCommand.INSTANCE; - } - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(request); - return getGEFWrapper(createGMFCommand); - } - - /** - * @generated - */ - protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, - IElementType requestElementType) { - IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType); - if (provider == null) { - return UnexecutableCommand.INSTANCE; - } - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(request); - return getGEFWrapper(createGMFCommand); - } - - /** - * @generated - */ - protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, - IElementType requestElementType) { - IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType); - if (provider == null) { - return UnexecutableCommand.INSTANCE; - } - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(request); - return getGEFWrapper(createGMFCommand); - } - // RS: End of add code for extended types /** * @generated diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java index c798f5929be..388ecbf033a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java @@ -51,8 +51,6 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; -import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils; import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper; import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils; import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter; @@ -226,18 +224,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { */ protected boolean provides(CreateEdgeViewOperation op) { IElementType elementType = getSemanticElementType(op.getSemanticAdapter()); - //RS: add code for extended types creation - if (elementType instanceof IExtendedHintedElementType) { - IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType); - if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) - || (!(closestNonExtendedType instanceof IHintedType))) { - return false; // foreign element type. - } - } else { - if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { - return false; // foreign element type - } + + if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) { + return false; // foreign element type } + //if (!org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) { // return false; // foreign element type //} |