diff options
Creating directory structure
Diffstat (limited to 'plugins/uml/org.eclipse.papyrus.diagram.usecase/src/org/eclipse/papyrus/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicy.java')
-rw-r--r-- | plugins/uml/org.eclipse.papyrus.diagram.usecase/src/org/eclipse/papyrus/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicy.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.usecase/src/org/eclipse/papyrus/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.usecase/src/org/eclipse/papyrus/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicy.java new file mode 100644 index 00000000000..70191756e90 --- /dev/null +++ b/plugins/uml/org.eclipse.papyrus.diagram.usecase/src/org/eclipse/papyrus/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicy.java @@ -0,0 +1,40 @@ +/*****************************************************************************
+ * Copyright (c) 2008 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.usecase.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.diagram.usecase.edit.commands.ExtensionPointCreateCommand;
+import org.eclipse.papyrus.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class UseCasePointsItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ if (UMLElementTypes.ExtensionPoint_3002 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(UMLPackage.eINSTANCE.getUseCase_ExtensionPoint());
+ }
+ return getGEFWrapper(new ExtensionPointCreateCommand(req));
+ }
+ return super.getCreateCommand(req);
+ }
+
+}
|