| /* |
| * Copyright (c) 2007, 2010 Borland Software Corporation and others |
| * |
| * 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'» |
| |
| «EXTENSION Util» |
| |
| «DEFINE newInstance(figureVarName : String) FOR gmfgraph::Figure»«EXPAND fqn» «figureVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR gmfgraph::Figure»new «EXPAND fqn»()«ENDDEFINE» |
| |
| «DEFINE newInstance(layoutVarName : String) FOR gmfgraph::Layout»«EXPAND fqn» «layoutVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR gmfgraph::Layout»new «EXPAND fqn»()«ENDDEFINE» |
| |
| «DEFINE newInstance(constraintVarName : String) FOR gmfgraph::LayoutData»«EXPAND fqn» «constraintVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR gmfgraph::LayoutData»new «EXPAND fqn»()«ENDDEFINE» |
| |
| «DEFINE newInstance(borderVarName : String) FOR gmfgraph::Border»«EXPAND fqn» «borderVarName» = «EXPAND newInstance»;«ENDDEFINE» |
| «DEFINE newInstance FOR gmfgraph::Border»new «EXPAND fqn»()«ENDDEFINE» |
| |
| |
| «DEFINE fqn FOR gmfgraph::Figure»«ERROR 'Abstract definition fqn(Figure)'»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Layout»«ERROR 'Abstract definition fqn(Layout)'»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::LayoutData»«ERROR 'Abstract definition fqn(LayoutData)'»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Border»«ERROR 'Abstract definition fqn(Border)'»«ENDDEFINE» |
| |
| //////////////////////// |
| «DEFINE fqn FOR gmfgraph::CustomLayout»«qualifiedClassName»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::CustomBorder»«qualifiedClassName»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::CustomFigure»«qualifiedClassName»«ENDDEFINE» |
| |
| //////////////////////// |
| «DEFINE fqn FOR gmfgraph::FlowLayout»«IF forceSingleLine»org.eclipse.draw2d.ToolbarLayout«ELSE»org.eclipse.draw2d.FlowLayout«ENDIF»«ENDDEFINE» |
| |
| «DEFINE fqn FOR gmfgraph::XYLayout»org.eclipse.draw2d.XYLayout«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::XYLayoutData»org.eclipse.draw2d.geometry.Rectangle«ENDDEFINE» |
| |
| «DEFINE fqn FOR gmfgraph::GridLayout»org.eclipse.draw2d.GridLayout«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::GridLayoutData»org.eclipse.draw2d.GridData«ENDDEFINE» |
| |
| «DEFINE fqn FOR gmfgraph::StackLayout»org.eclipse.draw2d.StackLayout«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::BorderLayout»org.eclipse.draw2d.BorderLayout«ENDDEFINE» |
| |
| «REM»CenterLayout requires dependency to tooling runtime if the stabdalone plugin is generated«ENDREM» |
| «DEFINE fqn FOR gmfgraph::CenterLayout»org.eclipse.gmf.tooling.runtime.draw2d.CenterLayout«ENDDEFINE» |
| |
| //////////////////////// |
| «DEFINE fqn FOR gmfgraph::FigureRef»«EXPAND fqn FOR figure»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Label»«IF isFullRuntime()»org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel«ELSE»org.eclipse.draw2d.Label«ENDIF»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::VerticalLabel»org.eclipse.gmf.tooling.runtime.draw2d.labels.VerticalLabel«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::LabeledContainer»org.eclipse.draw2d.LabeledContainer«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Rectangle»org.eclipse.draw2d.RectangleFigure«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::RoundedRectangle»org.eclipse.draw2d.RoundedRectangle«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::InvisibleRectangle»org.eclipse.draw2d.RectangleFigure«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Ellipse»org.eclipse.draw2d.Ellipse«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Polygon»org.eclipse.draw2d.PolygonShape«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::ScalablePolygon»org.eclipse.draw2d.ScalablePolygonShape«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::PolygonDecoration»org.eclipse.draw2d.PolygonDecoration«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::Polyline»org.eclipse.draw2d.PolylineShape«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::PolylineDecoration»org.eclipse.draw2d.PolylineDecoration«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::PolylineConnection»«IF isFullRuntime()»org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx«ELSE»org.eclipse.draw2d.PolylineConnection«ENDIF»«ENDDEFINE» |
| «DEFINE fqn FOR gmfgraph::SVGFigure»org.eclipse.gmf.runtime.lite.svg.SVGFigure«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» |