Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/edit/commands/DNodeListCreateCommand.java')
-rw-r--r--plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/edit/commands/DNodeListCreateCommand.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/edit/commands/DNodeListCreateCommand.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/edit/commands/DNodeListCreateCommand.java
new file mode 100644
index 0000000000..f804657f4a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/edit/commands/DNodeListCreateCommand.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 THALES GLOBAL SERVICES.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.diagram.internal.edit.commands;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+import org.eclipse.sirius.SiriusPackage;
+
+/**
+ * @was-generated
+ */
+public class DNodeListCreateCommand extends CreateElementCommand {
+
+ /**
+ * @was-generated
+ */
+ public DNodeListCreateCommand(CreateElementRequest req) {
+ super(req);
+ }
+
+ /**
+ * @was-generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @was-generated
+ */
+ protected EClass getEClassToEdit() {
+ return SiriusPackage.eINSTANCE.getDDiagram();
+ }
+}

Back to the top