Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'incoming/org.eclipse.papyrus.diagram.deployment/src/org/eclipse/papyrus/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java')
-rw-r--r--incoming/org.eclipse.papyrus.diagram.deployment/src/org/eclipse/papyrus/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java104
1 files changed, 0 insertions, 104 deletions
diff --git a/incoming/org.eclipse.papyrus.diagram.deployment/src/org/eclipse/papyrus/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java b/incoming/org.eclipse.papyrus.diagram.deployment/src/org/eclipse/papyrus/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
deleted file mode 100644
index 23617147ad9..00000000000
--- a/incoming/org.eclipse.papyrus.diagram.deployment/src/org/eclipse/papyrus/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.papyrus.diagram.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-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.papyrus.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.service.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.service.edit.service.IElementEditService;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_2001);
- }
-
-
-
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.CommentAnnotatedElement_4008 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4009 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.CommentAnnotatedElement_4008 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4009 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}

Back to the top