Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: ab19dd4471569b50e76c950e591d667253a71b3e (plain) (tree)

































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

«IMPORT "http://www.eclipse.org/gmf/2005/GraphicalDefinition"»
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
«EXTENSION Util»

«REM»Instantiate and define attributes for DecorationFigures«ENDREM»

«DEFINE Instantiate(EString figureVarName) FOR gmfgraph::DecorationFigure-»
«qualifiedClassNameGEF()» «figureVarName» = new «qualifiedClassNameGEF()»();
«EXPAND Attrs::Init(figureVarName)»
«ENDDEFINE»

«REM»Guess, can't delegate to attrs through Attrs::Init because there's already Init for Polyline«ENDREM»
«DEFINE Instantiate(EString figureVarName) FOR gmfgraph::PolylineDecoration-»
«qualifiedClassNameGEF()» «figureVarName» = new «qualifiedClassNameGEF()»();
«EXPAND attr::Decoration::polylineAttrs(figureVarName)-»
«ENDDEFINE»

«REM»Copy of above template for PolylineDecoration, just because PolygonDecoration doesn't extend PolylineDecoration in draw2d and gmfgraph«ENDREM»
«DEFINE Instantiate(EString figureVarName) FOR gmfgraph::PolygonDecoration-»
«qualifiedClassNameGEF()» «figureVarName» = new «qualifiedClassNameGEF()»();
«EXPAND attr::Decoration::polylineAttrs(figureVarName)-»
«ENDDEFINE»

Back to the top