Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-03-13 17:25:22 +0000
committeratikhomirov2006-03-13 17:25:22 +0000
commit2461461defc8cd5fe74d0732cb377e342a743eab (patch)
tree96d2bf5ce02444afd1eae6ff9a2e55417086fd72 /plugins/org.eclipse.gmf.graphdef.codegen/templates
parent104679478ade72fb2d72441742cb0e1921e37264 (diff)
downloadorg.eclipse.gmf-tooling-2461461defc8cd5fe74d0732cb377e342a743eab.tar.gz
org.eclipse.gmf-tooling-2461461defc8cd5fe74d0732cb377e342a743eab.tar.xz
org.eclipse.gmf-tooling-2461461defc8cd5fe74d0732cb377e342a743eab.zip
#131550 typed accessor to child figures
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
index 2e571029c..d318a3234 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
@@ -9,10 +9,6 @@ final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
<%importManager.markImportLocation(stringBuffer);%>
-<%
-importManager.addImport("org.eclipse.draw2d.IFigure");
-final String draw2d_IFigure = importManager.getImportedName("org.eclipse.draw2d.IFigure");
-%>
/**
* @generated
@@ -38,7 +34,7 @@ for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
Figure next = (Figure) it.next();
final String childVarName = "child" + next.getName();%>
- <%=draw2d_IFigure%> <%=childVarName%> = createFigure<%=next.getName()%>();
+ <%=importManager.getImportedName((String) fqnSwitch.doSwitch(next))%> <%=childVarName%> = createFigure<%=next.getName()%>();
setFigure<%=next.getName()%>(<%=childVarName%>);
add(<%=childVarName%>);
<%=dispatcher.dispatch("createLayoutData", dispatcher.createLayoutArgs(next, childVarName, dispatcherArgs.getManagerVariableName(), "layoutData" + next.getName()))%>
@@ -48,28 +44,29 @@ for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
<%
int fc = 0;
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext(); fc++) {
- Figure next = (Figure) it.next();%>
+ Figure next = (Figure) it.next();
+ final String nextClassName = importManager.getImportedName((String) fqnSwitch.doSwitch(next));%>
- private <%=draw2d_IFigure%> f<%=next.getName()%>;
+ private <%=nextClassName%> f<%=next.getName()%>;
/**
* @generated
*/
- public <%=draw2d_IFigure%> getFigure<%=next.getName()%>() {
+ public <%=nextClassName%> getFigure<%=next.getName()%>() {
return f<%=next.getName()%>;
}
/**
* @generated
*/
- protected void setFigure<%=next.getName()%>(<%=draw2d_IFigure%> figure) {
+ protected void setFigure<%=next.getName()%>(<%=nextClassName%> figure) {
f<%=next.getName()%> = figure;
}
/**
* @generated
*/
- private <%=draw2d_IFigure%> createFigure<%=next.getName()%>() {
+ private <%=nextClassName%> createFigure<%=next.getName()%>() {
<%=dispatcher.dispatch("instantiate", dispatcher.create(next, "rv"))%>
<%=dispatcher.dispatch("Children", new Object[] {next.getChildren(), dispatcher, "rv"})%>
return rv;

Back to the top