Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'uml/org.eclipse.papyrus.diagram.clazz/src/org/eclipse/papyrus/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java')
-rw-r--r--uml/org.eclipse.papyrus.diagram.clazz/src/org/eclipse/papyrus/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/uml/org.eclipse.papyrus.diagram.clazz/src/org/eclipse/papyrus/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java b/uml/org.eclipse.papyrus.diagram.clazz/src/org/eclipse/papyrus/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 00000000000..70505aa27e1
--- /dev/null
+++ b/uml/org.eclipse.papyrus.diagram.clazz/src/org/eclipse/papyrus/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2008 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.clazz.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.diagram.clazz.edit.commands.Class3CreateCommand;
+import org.eclipse.papyrus.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class InterfaceNestedClassifierCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ if (UMLElementTypes.Class_3008 == req.getElementType()) {
+ if (req.getContainmentFeature() == null) {
+ req.setContainmentFeature(UMLPackage.eINSTANCE.getInterface_NestedClassifier());
+ }
+ return getGEFWrapper(new Class3CreateCommand(req));
+ }
+ return super.getCreateCommand(req);
+ }
+
+}

Back to the top