Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 3ee0477b8f31926990ff57f97c91fe470f10ba74 (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
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="TopConnectionGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.gmfgraph.util.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher"%>
<%
Object[] args = (Object[]) argument;
PolylineConnection figure = (PolylineConnection) args[0];
final ImportAssistant importManager = (ImportAssistant) args[1];
final FigureQualifiedNameSwitch fqnSwitch = (FigureQualifiedNameSwitch) args[2];
final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
<%importManager.emitPackageStatement(stringBuffer);%>

<%importManager.markImportLocation(stringBuffer);%>

/**
 * @generated
 */
public class <%=importManager.getCompilationUnitName()%> extends <%=fqnSwitch.get(figure, importManager)%> {

	/**
	 * @generated
	 */
	public <%=figure.getName()%>() {
<%=dispatcher.dispatch("Shape", dispatcher.create(figure, "this"))%>
<%if (figure.getSourceDecoration() != null) {%>
		setSourceDecoration(createSourceDecoration());
<%}
if (figure.getTargetDecoration() != null) {%>
		setTargetDecoration(createTargetDecoration());
<%}%>
	}

<%if (figure.getSourceDecoration() != null) {
	final String className = fqnSwitch.get(figure.getSourceDecoration(), importManager);%>
	/**
	 * @generated
	 */
	private <%=className%> createSourceDecoration() {
<%=dispatcher.dispatch("instantiate", dispatcher.create(figure.getSourceDecoration(), "df"))%>
		return df;
	}
<%} /*if sourceDecoration != null */ %>

<%if (figure.getTargetDecoration() != null) {
	final String className = fqnSwitch.get(figure.getTargetDecoration(), importManager);%>
	/**
	 * @generated
	 */
	private <%=className%> createTargetDecoration() {
<%=dispatcher.dispatch("instantiate", dispatcher.create(figure.getTargetDecoration(), "df"))%>
		return df;
	}
<%}%>
}<%importManager.emitSortedImports();%>

Back to the top