Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 8615e6fd6de850ad9cbfad9307856df5c863e638 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * 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»

////////////////////////
«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::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::Ellipse»org.eclipse.draw2d.Ellipse«ENDDEFINE»
«DEFINE fqn FOR gmfgraph::Polygon»org.eclipse.draw2d.Polygon«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.Polyline«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»

Back to the top