Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2008-10-15 14:15:59 -0400
committeratikhomirov2008-10-15 14:15:59 -0400
commitfd10f1c2ffaf56913f2679a743def55335a0231c (patch)
tree81c9b04938aa3f25cdbf755800e6bb3f48570a21
parent61f034b54ba73e96f78ffd331e67c984487043af (diff)
downloadorg.eclipse.gmf-tooling-fd10f1c2ffaf56913f2679a743def55335a0231c.tar.gz
org.eclipse.gmf-tooling-fd10f1c2ffaf56913f2679a743def55335a0231c.tar.xz
org.eclipse.gmf-tooling-fd10f1c2ffaf56913f2679a743def55335a0231c.zip
refactoring: redirected cast through MetaModel.xptv20081015-1925
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt
index a73e37dfa..0a7476f40 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt
@@ -208,7 +208,7 @@ public class «diagramEditorUtilClassName» {
diagramResource.getContents().add(diagram);
diagram.setName(diagramName);
«IF domainDiagramElement != null-»
- diagram.setElement(«IF domainDiagramElement.isExternalInterface()»(org.eclipse.emf.ecore.EObject) «ENDIF»model);
+ diagram.setElement(«EXPAND MetaModel::DowncastToEObject("model") FOR domainDiagramElement»);
«ENDIF-»
}
@@ -245,7 +245,7 @@ public class «diagramEditorUtilClassName» {
«DEFINE attachModelMethod FOR gmfgen::GenDiagram»
«EXPAND xpt::Common::generatedMemberComment("Store model element in the resource.\n<!-- begin-user-doc -->\n<!-- end-user-doc -->")»
private static void attachModelToResource(«EXPAND MetaModel::QualifiedClassName FOR domainDiagramElement» model, org.eclipse.emf.ecore.resource.Resource resource) {
- resource.getContents().add(«IF hasDocumentRoot()»createDocumentRoot(model)«ELSE»«IF domainDiagramElement.isExternalInterface()»(org.eclipse.emf.ecore.EObject) «ENDIF»model«ENDIF»);
+ resource.getContents().add(«IF hasDocumentRoot()»createDocumentRoot(model)«ELSE»«EXPAND MetaModel::DowncastToEObject("model") FOR domainDiagramElement»«ENDIF»);
}
«ENDDEFINE»

Back to the top