Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-12-29 07:41:38 -0500
committerashatalin2008-12-29 07:41:38 -0500
commitfc1dfb3b462e159eec1b6031bb41ab79c762474b (patch)
tree66acb7873f68640147106dcd919a5041ecbc918b /plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
parent7f3bb1960b122d5d9c4edae8dc1c330032c9cf60 (diff)
downloadorg.eclipse.gmf-tooling-fc1dfb3b462e159eec1b6031bb41ab79c762474b.tar.gz
org.eclipse.gmf-tooling-fc1dfb3b462e159eec1b6031bb41ab79c762474b.tar.xz
org.eclipse.gmf-tooling-fc1dfb3b462e159eec1b6031bb41ab79c762474b.zip
QVTO-based xpand implementation was merged to HEAD
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/childContainerCreateCommand.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/childContainerCreateCommand.xpt33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/childContainerCreateCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
new file mode 100644
index 000000000..675eda752
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2007, 2008 Borland Software Corporation
+ *
+ * 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:
+ * Alexander Shatalin (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«EXTENSION xpt::GenModelUtils»
+
+«DEFINE childContainerCreateCommand FOR Sequence(gmfgen::GenNode)-»
+«IF not self->isEmpty()-»
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
+«FOREACH self AS n-»
+ «EXPAND childNodeCreateCommand(n) FOR n.modelFacet-»
+«ENDFOREACH-»
+ return super.getCreateCommand(req);
+ }
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE childNodeCreateCommand(node : gmfgen::GenNode) FOR gmfgen::TypeModelFacet-»
+if («EXPAND xpt::providers::ElementTypes::accessElementType FOR node» == req.getElementType()) {
+ return getGEFWrapper(new «node.getCreateCommandQualifiedClassName()»(req));
+}
+«ENDDEFINE» \ No newline at end of file

Back to the top