Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt98
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt32
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt44
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/MenuAction.qvto11
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/PredefinedAction.xpt22
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt156
6 files changed, 363 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt
new file mode 100644
index 000000000..3684ac32f
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2006, 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
+ * Artem Tikhomirov (Borland) - [174961] migration to Commands/Handlers
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«EXTENSION xpt::editor::Utils»
+«EXTENSION xpt::StringOperations»
+
+«DEFINE Main FOR gmfgen::CreateShortcutAction-»
+«EXPAND xpt::Common::copyright FOR owner.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedClassName.xpandSplit('\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND executeMethod»
+«EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE extendsList FOR gmfgen::CreateShortcutAction» extends org.eclipse.core.commands.AbstractHandler«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::CreateShortcutAction»«ENDDEFINE»
+
+«DEFINE executeMethod FOR gmfgen::CreateShortcutAction-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
+ org.eclipse.ui.IEditorPart diagramEditor = org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(event);
+ org.eclipse.swt.widgets.Shell shell = diagramEditor.getEditorSite().getShell();
+ «EXPAND xpt::Common::_assert('diagramEditor instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor')-»
+ org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = ((org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor) diagramEditor).getEditingDomain();
+ org.eclipse.jface.viewers.ISelection selection = org.eclipse.ui.handlers.HandlerUtil.getCurrentSelectionChecked(event);
+ «EXPAND xpt::Common::_assert('selection instanceof org.eclipse.jface.viewers.IStructuredSelection')-»
+ «EXPAND xpt::Common::_assert('((org.eclipse.jface.viewers.IStructuredSelection) selection).size() == 1')-»
+ «EXPAND xpt::Common::_assert('((org.eclipse.jface.viewers.IStructuredSelection) selection).getFirstElement() instanceof org.eclipse.gef.EditPart')-»
+ org.eclipse.gef.EditPart selectedDiagramPart = (org.eclipse.gef.EditPart) ((org.eclipse.jface.viewers.IStructuredSelection) selection).getFirstElement();
+ final org.eclipse.gmf.runtime.notation.View view = (org.eclipse.gmf.runtime.notation.View) selectedDiagramPart.getModel();
+«IF null = owner.editorGen.application-»
+ «owner.editorGen.diagram.getElementChooserQualifiedClassName()» elementChooser = new «owner.editorGen.diagram.getElementChooserQualifiedClassName()»(shell, view);
+ int result = elementChooser.open();
+ if (result != org.eclipse.jface.window.Window.OK) {
+ return null;
+ }
+ org.eclipse.emf.common.util.URI selectedModelElementURI = elementChooser.getSelectedModelElementURI();
+ final org.eclipse.emf.ecore.EObject selectedElement;
+ try {
+ selectedElement = editingDomain.getResourceSet().getEObject(selectedModelElementURI, true);
+ } catch (org.eclipse.emf.common.util.WrappedException e) {
+ «owner.editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Exception while loading object: " + selectedModelElementURI.toString(), e);«EXPAND xpt::Common::nonNLS»
+ return null;
+ }
+
+ if (selectedElement == null) {
+ return null;
+ }
+ org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor viewDescriptor = new org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor(new org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter(selectedElement), org.eclipse.gmf.runtime.notation.Node.class, null, «EXPAND xpt::plugin::Activator::preferenceHintAccess FOR owner.editorGen»);
+ org.eclipse.gmf.runtime.common.core.command.ICommand command = new org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand(editingDomain, viewDescriptor, view);
+ command = command.compose(new «owner.editorGen.diagram.getCreateShortcutDecorationsCommandQualifiedClassName()»(editingDomain, view, viewDescriptor));
+ try {
+ org.eclipse.core.commands.operations.OperationHistoryFactory.getOperationHistory().execute(command, new org.eclipse.core.runtime.NullProgressMonitor(), null);
+ } catch (org.eclipse.core.commands.ExecutionException e) {
+ «owner.editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Unable to create shortcut", e);«EXPAND xpt::Common::nonNLS»
+ }
+«ELSE-»
+ org.eclipse.emf.ecore.resource.Resource resource = «owner.editorGen.diagram.getDiagramEditorUtilQualifiedClassName()».openModel(shell, «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForCreateShortcutOpenModel())) FOR owner.editorGen», editingDomain);
+ if (resource == null || resource.getContents().isEmpty()) {
+ return null;
+ }
+ «EXPAND xpt::editor::ShortcutCreationWizard::qualifiedClassName FOR owner.editorGen.diagram» wizard = new «EXPAND xpt::editor::ShortcutCreationWizard::qualifiedClassName FOR owner.editorGen.diagram»((org.eclipse.emf.ecore.EObject) resource.getContents().get(0), view, editingDomain);
+ wizard.setWindowTitle(«EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForCreateShortcutWizard())) FOR owner.editorGen»);
+ «owner.editorGen.diagram.getDiagramEditorUtilQualifiedClassName()».runWizard(myShell, wizard, "CreateShortcut");«EXPAND xpt::Common::nonNLS»
+«ENDIF-»
+ return null;
+ }
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::CreateShortcutAction»«ENDDEFINE»
+
+«DEFINE i18nValues FOR gmfgen::GenDiagram-»
+«IF null <> editorGen.application-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForCreateShortcutOpenModel()), 'Select model to reference')-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForCreateShortcutWizard()), 'Create shortcut')-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
+«IF null <> editorGen.application-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForCreateShortcutOpenModel()))-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForCreateShortcutWizard()))-»
+«ENDIF-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt
new file mode 100644
index 000000000..b469170ab
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::StringOperations»
+
+«DEFINE Main FOR gmfgen::GenCustomAction-»
+«EXPAND xpt::Common::copyright FOR owner.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedClassName.xpandSplit('\.')->last()» extends org.eclipse.core.commands.AbstractHandler {
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
+ org.eclipse.ui.IEditorPart diagramEditor = org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(event);
+ org.eclipse.jface.viewers.ISelection selection = org.eclipse.ui.handlers.HandlerUtil.getCurrentSelectionChecked(event);
+ // FIXME implement required behavior
+ throw new UnsupportedOperationException();
+ }
+}
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt
new file mode 100644
index 000000000..260811374
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt
@@ -0,0 +1,44 @@
+/*
+ * 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
+ * Artem Tikhomirov (Borland) - [174961] migration to Commands/Handlers
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«EXTENSION xpt::StringOperations»
+
+«DEFINE Main FOR gmfgen::LoadResourceAction-»
+«EXPAND xpt::Common::copyright FOR owner.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedClassName.xpandSplit('\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND executeMethod»
+«EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE extendsList FOR gmfgen::LoadResourceAction» extends org.eclipse.core.commands.AbstractHandler«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::LoadResourceAction»«ENDDEFINE»
+
+«DEFINE executeMethod FOR gmfgen::LoadResourceAction-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
+ org.eclipse.ui.IEditorPart diagramEditor = org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(event);
+ org.eclipse.swt.widgets.Shell shell = diagramEditor.getEditorSite().getShell();
+ «EXPAND xpt::Common::_assert('diagramEditor instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor')-»
+ org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = ((org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor) diagramEditor).getEditingDomain();
+ org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog loadResourceDialog = new org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog(shell, editingDomain);
+ loadResourceDialog.open();
+ return null;
+ }
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::LoadResourceAction»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/MenuAction.qvto b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/MenuAction.qvto
new file mode 100644
index 000000000..ac0840e3b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/MenuAction.qvto
@@ -0,0 +1,11 @@
+modeltype genModel uses "http://www.eclipse.org/gmf/2008/GenModel";
+
+library MenuAction;
+
+helper hasCommandsToContribute(editorGen : genModel::GenEditorGenerator) : Boolean {
+ return not editorGen.contextMenus->isEmpty()
+}
+
+helper hasHandlersToContribute(editorGen : genModel::GenEditorGenerator) : Boolean {
+ return hasCommandsToContribute(editorGen)
+}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/PredefinedAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/PredefinedAction.xpt
new file mode 100644
index 000000000..c2f00496c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/PredefinedAction.xpt
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+
+«DEFINE Main FOR gmfgen::GenAction»«ERROR 'Asbtract template for ' + self.repr()»«ENDDEFINE»
+
+«DEFINE Main FOR gmfgen::LoadResourceAction»«EXPAND LoadResourceAction::Main»«ENDDEFINE»
+
+«DEFINE Main(editorGen : gmfgen::GenEditorGenerator) FOR gmfgen::InitDiagramAction»«EXPAND xpt::editor::InitDiagramFileAction::InitDiagramFileAction(editorGen)»«ENDDEFINE»
+
+«DEFINE Main FOR gmfgen::CreateShortcutAction»«EXPAND CreateShortcutAction::Main»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt
new file mode 100644
index 000000000..1f34cbd20
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+
+«EXTENSION impl::actions::MenuAction»
+«EXTENSION xpt::StringOperations»
+
+«DEFINE Main FOR gmfgen::GenEditorGenerator»
+ <extension point="org.eclipse.ui.menus" id="context-menus">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=«»">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=«»">
+ </menuContribution -->
+«EXPAND menuContribution FOREACH contextMenus-»
+ </extension>
+
+«IF hasCommandsToContribute(self)-»
+ <extension point="org.eclipse.ui.commands" id="menu-commands">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <category id="«editor.iD»" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+«EXPAND commandContribution FOREACH contextMenus-»
+ </extension>
+«ENDIF-»
+
+«IF hasHandlersToContribute(self)-»
+ <extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+«EXPAND handlerContribution FOREACH contextMenus-»
+ </extension>
+«ENDIF-»
+
+ <!-- optionally, specify keybindings -->
+«ENDDEFINE»
+
+«DEFINE menuContribution FOR gmfgen::GenContextMenu-»
+«EXPAND _menuContribution(self, 'popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu')-»
+«ENDDEFINE»
+
+«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenContributionManager»«ERROR 'Abstract menuContribution for ' + self.repr()»«ENDDEFINE»
+«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenMenuManager»«EXPAND _menuContribution(contextMenu, 'popup:' + iD)»«ENDDEFINE»
+«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenToolBarManager»«EXPAND _menuContribution(contextMenu, 'toolbar:' + iD)»«ENDDEFINE»
+
+«DEFINE _menuContribution(contextMenu : gmfgen::GenContextMenu, locationURI : String) FOR gmfgen::GenContributionManager-»
+ <menuContribution locationURI="«locationURI»">
+«EXPAND menuEntry(contextMenu) FOREACH items-»
+ </menuContribution>
+«EXPAND menuContribution(contextMenu) FOREACH (items)[gmfgen::GenContributionManager]-»
+«ENDDEFINE»
+
+
+«DEFINE commandContribution FOR gmfgen::GenContributionManager-»
+«EXPAND commandContribution FOREACH (items)[gmfgen::GenCustomAction]-»
+«EXPAND commandContribution FOREACH (items)[gmfgen::GenAction]-»
+«EXPAND commandContribution FOREACH (items)[gmfgen::GenContributionManager]-»
+«ENDDEFINE»
+
+«DEFINE handlerContribution FOR gmfgen::GenContributionManager-»
+«EXPAND handlerContribution FOREACH (items)[gmfgen::GenCustomAction]->select(a | a.generateBoilerplate)-»
+«EXPAND handlerContribution FOREACH (items)[gmfgen::GenContributionManager]-»
+«ENDDEFINE»
+
+«DEFINE commandContribution FOR gmfgen::GenCustomAction-»
+ <command id="«EXPAND commandIdentifier»"
+ name="«name»"
+ categoryId="«owner.editorGen.editor.iD»"
+ defaultHandler="«qualifiedClassName»"/>
+«ENDDEFINE»
+
+«DEFINE commandContribution FOR gmfgen::GenAction-»
+ <command id="«EXPAND commandIdentifier»"
+ name="«name/*FIXME: into i18n keys*/»"
+ categoryId="«owner.editorGen.editor.iD»"
+ defaultHandler="«qualifiedClassName»"/>
+«ENDDEFINE»
+
+«DEFINE handlerContribution FOR gmfgen::GenCustomAction-»
+ <handler
+ commandId="«EXPAND commandIdentifier»"
+ class="«qualifiedClassName»">
+ <enabledWhen>
+ <with variable="activePartId"><equals value="«owner.editorGen.editor.iD»"/></with>
+ </enabledWhen>
+ </handler>
+«ENDDEFINE»
+
+«DEFINE commandIdentifier FOR gmfgen::GenCustomAction»«owner.editorGen.plugin.iD».«qualifiedClassName.xpandSplit('\.')->last()»«ENDDEFINE»
+«DEFINE commandIdentifier FOR gmfgen::GenAction»«owner.editorGen.plugin.iD».«qualifiedClassName.xpandSplit('\.')->last()»«ENDDEFINE»
+
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenContributionItem»«REM»NO-OP XXX or ERROR?«ENDREM»«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenSeparator-»
+ <separator «IF groupName <> null»name="«groupName»" «ENDIF»visible="true"/>
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenGroupMarker-»
+ <separator name="«groupName»"/>
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenCommandAction-»
+ <command commandId="«commandIdentifier»">
+ <visibleWhen>
+«EXPAND menuCondition FOR contextMenu-»
+ </visibleWhen>
+ </command>
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenCustomAction-»
+ <command commandId="«EXPAND commandIdentifier»">
+ <visibleWhen>
+«EXPAND menuCondition FOR contextMenu-»
+ </visibleWhen>
+ </command>
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenAction-»
+ <command commandId="«EXPAND commandIdentifier»">
+ <visibleWhen>
+«EXPAND menuCondition FOR contextMenu-»
+ </visibleWhen>
+ </command>
+«ENDDEFINE»
+
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenMenuManager»
+ <menu id="«iD»" label="«name»">
+ <visibleWhen>
+«EXPAND menuCondition FOR contextMenu-»
+ </visibleWhen>
+ </menu>
+«ENDDEFINE»
+
+«DEFINE menuCondition FOR gmfgen::GenContextMenu-»
+ <and>
+ <with variable="activePartId"><equals value="«editorGen.editor.iD»"/></with>
+ <with variable="selection"><iterate«IF context->size() > 1» operator="or"«ENDIF» ifEmpty="false">
+«REM»XXX, perhaps, <adapt type="EditPart">?«ENDREM-»
+«FOREACH context->asSequence() AS de-»
+ <instanceof value="«de.getEditPartQualifiedClassName()»"/>
+«ENDFOREACH-»
+ </iterate></with>
+ </and>
+«ENDDEFINE»
+
+«DEFINE i18n FOR gmfgen::GenEditorGenerator-»
+«IF hasCommandsToContribute(self)-»
+# Commands and menu actions
+cmdcategory.name=«modelID» Editor Commands
+cmdcategory.desc=«modelID» Editor Commands
+«ENDIF»
+«ENDDEFINE» \ No newline at end of file

Back to the top