Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cc17acc7b75dbb253b5df7f1c0914fdc9bccb0b9 (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
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="ConnectionGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.gmfgraph.util.* java.util.*"%>

<%
PolylineConnection figure = (PolylineConnection) argument;
final GMFGraphSwitch fqnSwitch = new FigureQualifiedNameSwitch();
%>

/**
 * @generated
 */
public class <%=figure.getName()%> extends <%=fqnSwitch.doSwitch(figure)%> {

	/**
	 * @generated
	 */
	public <%=figure.getName()%>() {
<%Shape shapeFigure = figure;
String shapeVarName = "this";%>
<%@ include file="ShapeAttrs.jetinc" %>
<%if (figure.getSourceDecoration() != null) {%>
		setSourceDecoration(createSourceDecoration());
<%}
if (figure.getTargetDecoration() != null) {%>
		setTargetDecoration(createTargetDecoration());
<%}%>
	}

<%String decFigVarName = "df";
if (figure.getSourceDecoration() != null) {
DecorationFigure df = figure.getSourceDecoration();%>
	/**
	 * @generated
	 */
	private <%=fqnSwitch.doSwitch(df)%> createSourceDecoration() {
<%@ include file="decoration.jetinc" %>
		return <%=decFigVarName%>;
	}
<%} /*if sourceDecoration != null */ %>

<%if (figure.getTargetDecoration() != null) {
DecorationFigure df = figure.getTargetDecoration();%>
	/**
	 * @generated
	 */
	private <%=fqnSwitch.doSwitch(df)%> createTargetDecoration() {
<%@ include file="decoration.jetinc" %>
		return <%=decFigVarName%>;
	}
<%}%>
}

Back to the top