Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2012-05-01 22:34:38 +0000
committermgolubev2012-05-01 22:34:38 +0000
commit814b227b73c1f144c5625f1e4a0677987017c846 (patch)
treebb7e40398fe246f5e27aa35a21bda0965305c9d9
parent7caf594835abb720099695c8b721b767624cc416 (diff)
downloadorg.eclipse.gmf-tooling-814b227b73c1f144c5625f1e4a0677987017c846.tar.gz
org.eclipse.gmf-tooling-814b227b73c1f144c5625f1e4a0677987017c846.tar.xz
org.eclipse.gmf-tooling-814b227b73c1f144c5625f1e4a0677987017c846.zip
[372479] - minor refactoring: common templates structure for calling
typed API instances via explicit EXPAND
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt
index 73087fba3..d3c8a8963 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt
@@ -484,12 +484,15 @@ private static «EXPAND CodeStyle::G('java.util.Collection', getDiagram().editor
«ERROR 'Incorrect LinkModelFacet: ' + self.repr()»
«ENDDEFINE»
+«DEFINE runtimeTypedInstanceName FOR gmfgen::GenDiagramUpdater»TYPED_INSTANCE«ENDDEFINE»
+«DEFINE runtimeTypedInstanceCall FOR gmfgen::GenDiagramUpdater»«getDiagramUpdaterQualifiedClassName()».«EXPAND runtimeTypedInstanceName»«ENDDEFINE»
+
«DEFINE runtimeTypedInstance FOR gmfgen::GenDiagramUpdater-»
«IF self.editorGen.jdkComplianceLevel() > 4-»
«LET self.getNodeDescriptorQualifiedClassName() AS nodeDescriptorFQN-»
«LET self.getLinkDescriptorQualifiedClassName() AS linkDescriptorFQN-»
«EXPAND xpt::Common::generatedClassComment»
- public static final org.eclipse.gmf.tooling.runtime.update.DiagramUpdater TYPED_INSTANCE = new org.eclipse.gmf.tooling.runtime.update.DiagramUpdater() {
+ public static final org.eclipse.gmf.tooling.runtime.update.DiagramUpdater «EXPAND runtimeTypedInstanceName» = new org.eclipse.gmf.tooling.runtime.update.DiagramUpdater() {
«REM»Doesn't make sense to use CodeStyle::G -- interface requires generics anyway, so we checked above for the whole field«ENDREM»«-»
«EXPAND xpt::Common::generatedMemberComment»
«EXPAND CodeStyle::override FOR editorGen.diagram»

Back to the top