blob: 8d8cfd05ce464784d15528f4b926abad588c3ad9 [file] [log] [blame]
/*
* Copyright (c) 2006, 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:
* Artem Tikhomirov (Borland) - initial API and implementation
*/
«IMPORT 'http://www.eclipse.org/gmf/2006/GraphicalDefinition'»
«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
«EXTENSION Util»
«REM»Instantiate and define attributes for DecorationFigures«ENDREM»
«DEFINE Instantiate(figureVarName : String) FOR gmfgraph::DecorationFigure
«EXPAND Runtime::newInstance(figureVarName
«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(figureVarName : String) FOR gmfgraph::PolylineDecoration
«EXPAND Runtime::newInstance(figureVarName
«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(figureVarName : String) FOR gmfgraph::PolygonDecoration-»
«EXPAND Runtime::newInstance(figureVarName)»
«EXPAND attr::Decoration::polylineAttrs(figureVarName)-»
«ENDDEFINE»