Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/extensions.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/extensions.xpt181
1 files changed, 181 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/extensions.xpt
new file mode 100644
index 000000000..04f1a4165
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/extensions.xpt
@@ -0,0 +1,181 @@
+/*
+ * 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:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::diagram::Utils»
+
+«DEFINE extensions FOR gmfgen::GenDiagram-»
+
+ <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <viewProvider class="«getNotationViewProviderQualifiedClassName()»">
+ <Priority name="«notationViewProviderPriority»"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="«editorGen.modelID»"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="«FOREACH getAllNodes()->asSequence() /*XXX can further improve selection using containerViews attribute, however, when top-node is created, provider is activated and this xml is not consulted any longer (same applies to compartments)*/ AS n SEPARATOR ','»«n.visualID»«ENDFOREACH»"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="«FOREACH links->asSequence() AS l SEPARATOR ','»«l.visualID»«ENDFOREACH»"/>
+ </viewProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <editpartProvider class="«getEditPartProviderQualifiedClassName()»">
+ <Priority name="«editPartProviderPriority»"/>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="«FOREACH getAllNodes()->asSequence() AS n SEPARATOR ','»«n.visualID»«ENDFOREACH»"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="«FOREACH links->asSequence() AS l SEPARATOR ','»«l.visualID»«ENDFOREACH»"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="«FOREACH getAllNodes().labels AS lb SEPARATOR ','»«lb.visualID»«ENDFOREACH»"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="«FOREACH compartments->asSequence() AS c SEPARATOR ','»«c.visualID»«ENDFOREACH»"/>
+ </object>
+ <context views="generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders" id="modelassist-provider">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <modelingAssistantProvider class="«getModelingAssistantProviderQualifiedClassName()»">
+ <Priority name="«modelingAssistantProviderPriority»"/>
+«FOREACH topLevelNodes->asSequence() AS n-»
+ <object class="«n.getEditPartQualifiedClassName()»" id="«n.getUniqueIdentifier()»"/>
+«ENDFOREACH-»
+ <context elements="«FOREACH topLevelNodes->asSequence() AS n SEPARATOR ','»«n.getUniqueIdentifier()»«ENDFOREACH»"/>
+ </modelingAssistantProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <IconProvider class="«getIconProviderQualifiedClassName()»">
+ <Priority name="«iconProviderPriority»"/>
+ </IconProvider>
+ </extension>
+«IF editorGen.labelParsers <> null and editorGen.labelParsers.extensibleViaService»
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <ParserProvider class="«editorGen.labelParsers.getQualifiedClassName()»">
+ <Priority name="«editorGen.labelParsers.providerPriority»"/>
+ </ParserProvider>
+ </extension>
+«ENDIF-»
+«IF generateShortcutIcon()»
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders" id="decorator-provider">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <decoratorProvider class="«getShortcutsDecoratorProviderQualifiedClassName()»">
+ <Priority name="«shortcutsDecoratorProviderPriority»"/>
+ <object class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)" id="generated-top-nodes">
+ <method name="getType()" value="«FOREACH topLevelNodes->asSequence() /*generated code supports shortcuts only to top-level nodes*/ AS n SEPARATOR ','»«n.visualID»«ENDFOREACH»"/>
+ </object>
+ <context decoratorTargets="generated-top-nodes"/>
+ </decoratorProvider>
+ </extension>
+«ENDIF-»
+
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+«FOREACH getElements(self) AS e-»
+«EXPAND elementTypeSafe FOR e.elementType-»
+«ENDFOREACH-»
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <clientContext id="«editorGen.plugin.iD».TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="«editingDomainID»"/>
+ </enablement>
+ </clientContext>
+ <binding context="«editorGen.plugin.iD».TypeContext">
+«FOREACH getElements(self) AS e-»
+ <elementType ref="«e.elementType.uniqueIdentifier»"/>
+«ENDFOREACH-»
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
+«ENDDEFINE»
+
+«DEFINE elementTypeSafe FOR gmfgen::ElementType-»
+«IF not definedExternally-»
+«EXPAND elementType-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE elementType FOR gmfgen::ElementType»
+«ERROR 'Unknown element type: ' + self.repr()»
+«ENDDEFINE»
+
+«DEFINE elementType FOR gmfgen::MetamodelType-»
+ <metamodel nsURI="«getMetaClass().genPackage.ecorePackage.nsURI»">
+ <metamodelType
+ id="«uniqueIdentifier»"
+«IF null <> displayName-»
+ name="%metatype.name.«diagramElement.getUniqueIdentifier()»"
+«ENDIF-»
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="«getMetaClass().ecoreClass.name»"
+ edithelper="«getEditHelperQualifiedClassName()»">
+ <param name="semanticHint" value="«diagramElement.visualID»"/>
+ </metamodelType>
+ </metamodel>
+«ENDDEFINE»
+
+«DEFINE elementType FOR gmfgen::SpecializationType-»
+«IF null = getMetamodelClass()-»
+«EXPAND specializationType-»
+«ELSE-»
+ <metamodel nsURI="«getMetamodelClass().genPackage.ecorePackage.nsURI»">
+«EXPAND specializationType-»
+ </metamodel>
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE specializationType FOR gmfgen::SpecializationType-»
+ <specializationType
+ id="«uniqueIdentifier»"
+«IF null <> displayName-»
+ name="%metatype.name.«diagramElement.getUniqueIdentifier()»"
+«ENDIF-»
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"«IF editHelperAdviceClassName <> null»
+ edithelperadvice="«getEditHelperAdviceQualifiedClassName()»"«ENDIF»>
+ <specializes id="«(if null = metamodelType then 'org.eclipse.gmf.runtime.emf.type.core.null' else metamodelType.uniqueIdentifier endif)»"/>
+ <param name="semanticHint" value="«diagramElement.visualID»"/>
+ </specializationType>
+«ENDDEFINE»
+
+«DEFINE elementType FOR gmfgen::NotationType-»
+ <specializationType
+ id="«uniqueIdentifier»"
+«IF null <> displayName-»
+ name="%metatype.name.«diagramElement.getUniqueIdentifier()»"
+«ENDIF-»
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="«diagramElement.visualID»"/>
+ </specializationType>
+«ENDDEFINE»
+
+«DEFINE i18n FOR gmfgen::GenDiagram-»
+
+# Providers
+«EXPAND internal_i18n FOREACH getElements(self).elementType»
+«ENDDEFINE»
+
+«DEFINE internal_i18n FOR gmfgen::ElementType-»
+«IF null <> displayName and not definedExternally»metatype.name.«diagramElement.getUniqueIdentifier()»=«displayName»«ENDIF»
+«ENDDEFINE»

Back to the top