Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2013-01-13 20:52:31 +0000
committermgolubev2013-01-13 21:54:42 +0000
commitd192a9a08256553fe78d9ee81ab26690e20a0746 (patch)
tree5660ea980378445e952db560ea0dab0f91e429f0
parentfe8e5bcafc5af229bbe3a0e084387e480ca91bc1 (diff)
downloadorg.eclipse.gmf-tooling-d192a9a08256553fe78d9ee81ab26690e20a0746.tar.gz
org.eclipse.gmf-tooling-d192a9a08256553fe78d9ee81ab26690e20a0746.tar.xz
org.eclipse.gmf-tooling-d192a9a08256553fe78d9ee81ab26690e20a0746.zip
[398035] - default label text from GMF Graph model is ignored for links
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
index 79e06a7e6..fe6793d5d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
@@ -10,6 +10,7 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«IMPORT 'http://www.eclipse.org/gmf/2006/GraphicalDefinition'»
@@ -97,10 +98,18 @@
«ENDDEFINE»
«DEFINE labelFigurePrim FOR gmfgen::ModeledViewmap-»
- return new «EXPAND impl::diagram::editparts::viewmaps::modeledViewmapProducer::viewmapFigureFQN FOR self»();
+ return new «EXPAND impl::diagram::editparts::viewmaps::modeledViewmapProducer::viewmapFigureFQN FOR self»(«EXPAND labelTextDefaultValue_ FOR self.figureModel»);
}
«ENDDEFINE»
+«DEFINE labelTextDefaultValue_ FOR ecore::EObject»«ENDDEFINE»
+
+«DEFINE labelTextDefaultValue_ FOR gmfgraph::DiagramLabel-»
+«IF not self.figure.actualFigure.oclAsType(gmfgraph::Label).text.oclIsUndefined()-»
+"«self.figure.actualFigure.oclAsType(gmfgraph::Label).text»"«-»
+«ENDIF-»
+«ENDDEFINE»
+
«DEFINE labelFigurePrim FOR gmfgen::Viewmap-»
«ERROR 'Unknown viewmap: ' + self.repr()-»
}

Back to the top