| /* |
| * 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: |
| * 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» |
| |
| «DEFINE newInstance(String figureVarName) FOR Figure»«EXPAND fqn» «figureVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR Figure»new «EXPAND fqn»()«ENDDEFINE» |
| |
| «DEFINE newInstance(String layoutVarName) FOR Layout»«EXPAND fqn» «layoutVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR Layout»new «EXPAND fqn»()«ENDDEFINE» |
| |
| «DEFINE newInstance(String constraintVarName) FOR LayoutData»«EXPAND fqn» «constraintVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR LayoutData»new «EXPAND fqn»()«ENDDEFINE» |
| |
| «DEFINE newInstance(String borderVarName) FOR Border»«EXPAND fqn» «borderVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR Border»new «EXPAND fqn»()«ENDDEFINE» |
| |
| |
| «DEFINE fqn FOR Figure»«ERROR "Abstract definition fqn(Figure)"»«ENDDEFINE» |
| «DEFINE fqn FOR Layout»«ERROR "Abstract definition fqn(Layout)"»«ENDDEFINE» |
| «DEFINE fqn FOR LayoutData»«ERROR "Abstract definition fqn(LayoutData)"»«ENDDEFINE» |
| «DEFINE fqn FOR Border»«ERROR "Abstract definition fqn(Border)"»«ENDDEFINE» |
| |
| //////////////////////// |
| «DEFINE fqn FOR CustomLayout»«qualifiedClassName»«ENDDEFINE» |
| «DEFINE fqn FOR CustomBorder»«qualifiedClassName»«ENDDEFINE» |
| «DEFINE fqn FOR CustomFigure»«qualifiedClassName»«ENDDEFINE» |
| |
| //////////////////////// |
| «DEFINE fqn FOR FlowLayout»«IF forceSingleLine»org.eclipse.draw2d.ToolbarLayout«ELSE»org.eclipse.draw2d.FlowLayout«ENDIF»«ENDDEFINE» |
| |
| «DEFINE fqn FOR XYLayout»org.eclipse.draw2d.XYLayout«ENDDEFINE» |
| «DEFINE fqn FOR XYLayoutData»org.eclipse.draw2d.geometry.Rectangle«ENDDEFINE» |
| |
| «DEFINE fqn FOR GridLayout»org.eclipse.draw2d.GridLayout«ENDDEFINE» |
| «DEFINE fqn FOR GridLayoutData»org.eclipse.draw2d.GridData«ENDDEFINE» |
| |
| «DEFINE fqn FOR StackLayout»org.eclipse.draw2d.StackLayout«ENDDEFINE» |
| «DEFINE fqn FOR BorderLayout»org.eclipse.draw2d.BorderLayout«ENDDEFINE» |
| |
| //////////////////////// |
| «DEFINE fqn FOR FigureRef»«EXPAND fqn FOR figure»«ENDDEFINE» |
| «DEFINE fqn FOR Label»«IF isFullRuntime()»org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel«ELSE»org.eclipse.draw2d.Label«ENDIF»«ENDDEFINE» |
| «DEFINE fqn FOR LabeledContainer»org.eclipse.draw2d.LabeledContainer«ENDDEFINE» |
| «DEFINE fqn FOR Rectangle»org.eclipse.draw2d.RectangleFigure«ENDDEFINE» |
| «DEFINE fqn FOR RoundedRectangle»org.eclipse.draw2d.RoundedRectangle«ENDDEFINE» |
| «DEFINE fqn FOR Ellipse»org.eclipse.draw2d.Ellipse«ENDDEFINE» |
| «DEFINE fqn FOR Polygon»org.eclipse.draw2d.Polygon«ENDDEFINE» |
| «REM»FIXME«ENDREM»«DEFINE fqn FOR ScalablePolygon»org.eclipse.draw2d.Shape«ENDDEFINE» |
| «DEFINE fqn FOR PolygonDecoration»org.eclipse.draw2d.PolygonDecoration«ENDDEFINE» |
| «DEFINE fqn FOR Polyline»org.eclipse.draw2d.Polyline«ENDDEFINE» |
| «DEFINE fqn FOR PolylineDecoration»org.eclipse.draw2d.PolylineDecoration«ENDDEFINE» |
| «DEFINE fqn FOR PolylineConnection»«IF isFullRuntime()»org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx«ELSE»org.eclipse.draw2d.PolylineConnection«ENDIF»«ENDDEFINE» |
| |
| «REM» |
| to utilize around, need to fix XpandExecutionContextImpl to get aspects not only from relative aspects/ path, but from |
| template file as well. |
| // Full GMF Runtime |
| //////////////////////// |
| «AROUND fqn FOR PolylineConnection»«IF isFullRuntime()»org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx«ELSE»«targetDef.proceed()»«ENDIF»«ENDAROUND» |
| «AROUND fqn FOR Label»«IF isFullRuntime()»org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel«ELSE»«targetDef.proceed()»«ENDIF»«ENDAROUND» |
| «ENDREM» |