carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.lite.templates/xpt/diagram/policies/Common.xpt
author cawthron
Fri, 04 Dec 2009 11:06:59 -0600
changeset 422 033392511bf7
permissions -rw-r--r--
add files for RCL_2_2

/*
 * Copyright (c) 2007 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:
 *    bblajer (Borland) - initial API and implementation
 */

«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
«IMPORT "http://www.eclipse.org/emf/2002/GenModel"»

«DEFINE getViewCode FOR gmfgen::GenCommonBase»«ERROR "Unexpected type"»«ENDDEFINE»

«DEFINE getViewCode FOR gmfgen::GenDiagram»(org.eclipse.gmf.runtime.notation.Diagram) getHost().getModel()«ENDDEFINE»

«DEFINE getViewCode FOR gmfgen::GenChildContainer»(org.eclipse.gmf.runtime.notation.Node) getHost().getModel()«ENDDEFINE»

«DEFINE getViewCode FOR gmfgen::GenLink»(org.eclipse.gmf.runtime.notation.Edge) getHost().getModel()«ENDDEFINE»

«DEFINE getDiagramCode FOR gmfgen::GenCommonBase»«ERROR "Unexpected type"»«ENDDEFINE»

«DEFINE getDiagramCode FOR gmfgen::GenDiagram»«EXPAND getViewCode»«ENDDEFINE»

«DEFINE getDiagramCode FOR gmfgen::GenChildContainer»(«EXPAND getViewCode»).getDiagram()«ENDDEFINE»

«DEFINE getDiagramCode FOR gmfgen::GenLink»(«EXPAND getViewCode»).getDiagram()«ENDDEFINE»

«DEFINE getDiagramElementCode FOR gmfgen::GenCommonBase»«EXPAND getDiagramCode».getElement()«ENDDEFINE»

«DEFINE getDiagramElementCode FOR gmfgen::GenDiagram»(«EXPAND getDiagramCode»).getElement()«ENDDEFINE»

«DEFINE getCastToEditPart FOR gmfgen::GenChildContainer»(«getEditPartQualifiedClassName()») getHost()«ENDDEFINE»