Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/BaseEditHelper.xpt99
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelper.xpt25
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelperAdvice.xpt25
3 files changed, 149 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/BaseEditHelper.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/BaseEditHelper.xpt
new file mode 100644
index 000000000..71eeb0382
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/BaseEditHelper.xpt
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2006 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:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+
+«DEFINE BaseEditHelper FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editHelpersPackageName»;
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «baseEditHelperClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper {
+
+ «EXPAND attributes-»
+
+ «EXPAND getEditHelperAdvice-»
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.common.core.command.ICommand getInsteadCommand(
+ org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
+ org.eclipse.gmf.runtime.common.core.command.ICommand epCommand =
+ (org.eclipse.gmf.runtime.common.core.command.ICommand) req.getParameter(«EXPAND editPolicyCommand»);
+ req.setParameter(«EXPAND editPolicyCommand», null);
+ org.eclipse.gmf.runtime.common.core.command.ICommand ehCommand = super.getInsteadCommand(req);
+ if (epCommand == null) {
+ return ehCommand;
+ }
+ if (ehCommand == null) {
+ return epCommand;
+ }
+ org.eclipse.gmf.runtime.common.core.command.CompositeCommand command =
+ new org.eclipse.gmf.runtime.common.core.command.CompositeCommand(null);
+ command.add(epCommand);
+ command.add(ehCommand);
+ return command;
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateCommand(
+ org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
+ return null;
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateRelationshipCommand(
+ org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
+ return null;
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyElementCommand(
+ org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
+ return null;
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyReferenceCommand(
+ org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req) {
+ return null;
+ }
+ «EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE attributes FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final String «EXPAND editPolicyCommand» = "edit policy command"; //$NON-NLS-1$
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final String «EXPAND contextElementType» = "context element type"; //$NON-NLS-1$
+«ENDDEFINE»
+
+«DEFINE editPolicyCommand FOR gmfgen::GenDiagram»EDIT_POLICY_COMMAND«ENDDEFINE»
+
+«DEFINE contextElementType FOR gmfgen::GenDiagram»CONTEXT_ELEMENT_TYPE«ENDDEFINE»
+
+«DEFINE editPolicyCommandConstant FOR gmfgen::GenDiagram»«getBaseEditHelperQualifiedClassName()».«EXPAND editPolicyCommand»«ENDDEFINE»
+
+«DEFINE contextElementTypeConstant FOR gmfgen::GenDiagram»«getBaseEditHelperQualifiedClassName()».«EXPAND contextElementType»«ENDDEFINE»
+
+«DEFINE getEditHelperAdvice FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice[] getEditHelperAdvice(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
+ if (req.getParameter(«EXPAND contextElementType») instanceof org.eclipse.gmf.runtime.emf.type.core.IElementType) {
+ return org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry.getInstance().getEditHelperAdvice((org.eclipse.gmf.runtime.emf.type.core.IElementType) req.getParameter(«EXPAND contextElementType»));
+ }
+ return super.getEditHelperAdvice(req);
+ }
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelper.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelper.xpt
new file mode 100644
index 000000000..f5e436dfb
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelper.xpt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2006 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:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+
+«DEFINE EditHelper FOR gmfgen::MetamodelType-»
+«EXPAND xpt::Common::copyright FOR diagramElement.getDiagram().editorGen-»
+package «diagramElement.getDiagram().editHelpersPackageName»;
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «editHelperClassName» extends «diagramElement.getDiagram().getBaseEditHelperQualifiedClassName()» {
+ «EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::MetamodelType»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelperAdvice.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelperAdvice.xpt
new file mode 100644
index 000000000..8709546c3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/edithelpers/EditHelperAdvice.xpt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2006 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:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+
+«DEFINE EditHelperAdvice FOR gmfgen::SpecializationType-»
+«EXPAND xpt::Common::copyright FOR diagramElement.getDiagram().editorGen-»
+package «diagramElement.getDiagram().editHelpersPackageName»;
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «editHelperAdviceClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice {
+ «EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::SpecializationType»«ENDDEFINE»

Back to the top