Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt63
1 files changed, 63 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
new file mode 100644
index 000000000..687c1ff54
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2006,2007 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'»
+
+«DEFINE DiagramItemSemanticEditPolicy FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «editPoliciesPackageName»;
+
+ «EXPAND xpt::Common::generatedClassComment»
+public class «itemSemanticEditPolicyClassName» extends «getBaseItemSemanticEditPolicyQualifiedClassName()» {
+
+ «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
+
+ «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR topLevelNodes->asSequence()-»
+
+ «EXPAND getDuplicateCommand-»
+
+ «EXPAND DuplicateAnythingCommand-»
+
+ «EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE getDuplicateCommand FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+protected org.eclipse.gef.commands.Command getDuplicateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req) {
+ org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = ((org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) getHost()).getEditingDomain();
+ return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
+}
+«ENDDEFINE»
+
+«DEFINE DuplicateAnythingCommand FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedClassComment»
+private static class DuplicateAnythingCommand extends org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand {
+
+ «EXPAND DAC_constructor-»
+
+ «EXPAND DAC_additions-»
+}
+«ENDDEFINE»
+
+«DEFINE DAC_constructor FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public DuplicateAnythingCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain, org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req) {
+ super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap());
+}
+«ENDDEFINE»
+
+«DEFINE DAC_additions FOR gmfgen::GenDiagram-»
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenDiagram-»
+«ENDDEFINE» \ No newline at end of file

Back to the top