Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 238c638a1659b73d7b488e11f7920b53bfffe8e7 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
 * 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";

EString compilationUnitName(gmfgraph::Figure figure) :
	figure.name.toFirstUpper()
;

String qualifiedClassNameGEF(gmfgraph::Figure figure) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

String qualifiedClassNameGEF(gmfgraph::ScalablePolygon figure) :
	"org.eclipse.draw2d.Shape"
;

String qualifiedClassNameGEF(gmfgraph::Layout layout) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

String qualifiedClassNameGEF(gmfgraph::LayoutData layout) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

String qualifiedClassNameGEF(gmfgraph::Border border) :
JAVA [FigureQualifiedNameSwitch] org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch.get(org.eclipse.emf.ecore.EObject)
;

Boolean hasSourceDecoration(gmfgraph::PolylineConnection figure) :
	null != figure.sourceDecoration
;

String packageStatement() :
GLOBALVAR packageStatement
;

String additionalMethods() :
GLOBALVAR outputAdditionalMethods
;

String additionalStaticFields() :
GLOBALVAR outputStaticFields
;

String methodName(gmfgraph::CustomBorder customBorder, String figureVarName) :
	"createBorder" + figureVarName
;

EBoolean hasTargetDecoration(gmfgraph::PolylineConnection figure) :
	null != figure.targetDecoration
;


//nonNull(ecore::EObject obj) :
//	{obj}.select(e | null != e)
//;

figureVariableName(gmfgraph::Figure figure, EInt count) :
	figure.name.toFirstLower() + count
;

figureFieldName(gmfgraph::Figure figure) :
	"f" + figure.name
;
figureFieldGetter(gmfgraph::Figure figure) :
	"getFigure" + figure.name
;
figureFieldSetter(gmfgraph::Figure figure) :
	"setFigure" + figure.name
;

String borderLayoutConstant(gmfgraph::BorderLayoutData layoutData) :
	switch (layoutData.alignment) {
		case Alignment::BEGINNING : ( layoutData.vertical ? "TOP" : "LEFT" )
		case Alignment::END : ( layoutData.vertical ? "BOTTOM" : "RIGHT" )
		default : "CENTER" 
	}
;

EString messageFormat(EString pattern, List[Object] argument) :
	JAVA java.text.MessageFormat.format(java.lang.String, java.lang.Object.List)
;

Back to the top