Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-03-13 17:53:14 +0000
committeratikhomirov2006-03-13 17:53:14 +0000
commit2817409de45f43ad87eb1c260fa5bcea0b8f8d17 (patch)
treef73d0a003639e3fbc5dd86f9920de2b5869dd48f /plugins/org.eclipse.gmf.graphdef.codegen/templates
parentcc7f4191120cb57f4565fb0eb94f9bfb68d1efbe (diff)
downloadorg.eclipse.gmf-tooling-2817409de45f43ad87eb1c260fa5bcea0b8f8d17.tar.gz
org.eclipse.gmf-tooling-2817409de45f43ad87eb1c260fa5bcea0b8f8d17.tar.xz
org.eclipse.gmf-tooling-2817409de45f43ad87eb1c260fa5bcea0b8f8d17.zip
explicit method names for fqn switch to better reflect it's intention
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/layout/FlowLayout.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/CustomLayoutData.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/GridLayoutData.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/XYLayoutData.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Layout.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet4
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet8
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet8
9 files changed, 16 insertions, 16 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layout/FlowLayout.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layout/FlowLayout.javajet
index 4a479943e..f6de3b9b1 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layout/FlowLayout.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layout/FlowLayout.javajet
@@ -5,7 +5,7 @@ GraphDefDispatcher.LayoutArgs argsBundle = (GraphDefDispatcher.LayoutArgs) argum
final FlowLayout gmfLayout = (FlowLayout) argsBundle.getLayout();
final String layouterVarName = argsBundle.getManagerVariableName();
final GraphDefDispatcher dispatcher = argsBundle.getDispatcher();
-final String layouterClassName = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(gmfLayout));
+final String layouterClassName = dispatcher.getFQNSwitch().get(gmfLayout, dispatcher.getImportManager());
class AlignmentConverter {
private final String myBegin;
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/CustomLayoutData.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/CustomLayoutData.javajet
index 64a0f1997..8bba91d23 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/CustomLayoutData.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/CustomLayoutData.javajet
@@ -4,7 +4,7 @@
GraphDefDispatcher.LayoutArgs args = (GraphDefDispatcher.LayoutArgs) argument;
final CustomLayoutData layoutData = (CustomLayoutData) args.getData();
final GraphDefDispatcher dispatcher = args.getDispatcher();
-final String layoutImplClassName = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(layoutData));
+final String layoutImplClassName = dispatcher.getFQNSwitch().get(layoutData, dispatcher.getImportManager());
%>
<%=layoutImplClassName%> <%=args.getConstraintVariableName()%> = new <%=layoutImplClassName%>();
<%=dispatcher.dispatch("customAttributes", new Object[] {layoutData, dispatcher, args.getConstraintVariableName()})%>
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/GridLayoutData.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/GridLayoutData.javajet
index 79de453ba..66e27f267 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/GridLayoutData.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/GridLayoutData.javajet
@@ -9,7 +9,7 @@ final GraphDefDispatcher dispatcher = argsBundle.getDispatcher();
final String layoutConstraintVarName = argsBundle.getConstraintVariableName();
final String layoutManagerVarName = argsBundle.getManagerVariableName();
-final String layoutImplClassName = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(gmfLayoutData));
+final String layoutImplClassName = dispatcher.getFQNSwitch().get(gmfLayoutData, dispatcher.getImportManager());
%>
<%=layoutImplClassName%> <%=layoutConstraintVarName%> = new <%=layoutImplClassName%>();
<%=layoutConstraintVarName%>.verticalAlignment = <%=gmfLayoutData.getVerticalAlignment().getValue()%>;
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/XYLayoutData.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/XYLayoutData.javajet
index fa042a300..46e983dff 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/XYLayoutData.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/layoutData/XYLayoutData.javajet
@@ -9,7 +9,7 @@ final GraphDefDispatcher dispatcher = argsBundle.getDispatcher();
final String layoutConstraintVarName = argsBundle.getConstraintVariableName();
final String layoutManagerVarName = argsBundle.getManagerVariableName();
-final String layoutImplClassName = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(gmfLayoutData));
+final String layoutImplClassName = dispatcher.getFQNSwitch().get(gmfLayoutData, dispatcher.getImportManager());
%>
<%=layoutImplClassName%> <%=layoutConstraintVarName%> = new <%=layoutImplClassName%>();
<%
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet
index 493aeb620..8fdb00dfc 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet
@@ -5,7 +5,7 @@ GraphDefDispatcher.Args args = (GraphDefDispatcher.Args) argument;
final Figure figureInstance = args.getFigure();
final String figureVarName = args.getVariableName();
final GraphDefDispatcher dispatcher = args.getDispatcher();
-final String figureClassName = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(figureInstance));
+final String figureClassName = dispatcher.getFQNSwitch().get(figureInstance, dispatcher.getImportManager());
// PRODUCES instance AND (!) initializes attributes
%>
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Layout.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Layout.javajet
index e4c1b82b2..e298ae16c 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Layout.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Layout.javajet
@@ -11,7 +11,7 @@ final GraphDefDispatcher dispatcher = argsBundle.getDispatcher();
<%
Layout gmfLayout= figureMarker.getLayout();
if (gmfLayout != null){
- final String layouterImplClass = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(gmfLayout));
+ final String layouterImplClass = dispatcher.getFQNSwitch().get(gmfLayout, dispatcher.getImportManager());
%>
<%=layouterImplClass%> <%=layouterVarName%> = new <%=layouterImplClass%>();
<%=argsBundle.getDispatcher().dispatch(gmfLayout, argsBundle)%>
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet
index eadb9d469..c362d4848 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet
@@ -4,7 +4,7 @@
Object[] args = (Object[]) argument;
Figure figure = (Figure) args[0];
final ImportAssistant importManager = (ImportAssistant) args[1];
-final GMFGraphSwitch fqnSwitch = (GMFGraphSwitch) args[2];
+final FigureQualifiedNameSwitch fqnSwitch = (FigureQualifiedNameSwitch) args[2];
final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
@@ -13,7 +13,7 @@ final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
/**
* @generated
*/
-public class <%=figure.getName()%> extends <%=importManager.getImportedName((String) fqnSwitch.doSwitch(figure))%> {
+public class <%=figure.getName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet
index 2c6996263..ee087cb92 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet
@@ -4,7 +4,7 @@
Object[] args = (Object[]) argument;
PolylineConnection figure = (PolylineConnection) args[0];
final ImportAssistant importManager = (ImportAssistant) args[1];
-final GMFGraphSwitch fqnSwitch = (GMFGraphSwitch) args[2];
+final FigureQualifiedNameSwitch fqnSwitch = (FigureQualifiedNameSwitch) args[2];
final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
@@ -13,7 +13,7 @@ final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
/**
* @generated
*/
-public class <%=figure.getName()%> extends <%=importManager.getImportedName((String) fqnSwitch.doSwitch(figure))%> {
+public class <%=figure.getName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
/**
* @generated
@@ -29,7 +29,7 @@ if (figure.getTargetDecoration() != null) {%>
}
<%if (figure.getSourceDecoration() != null) {
- final String className = importManager.getImportedName((String) fqnSwitch.doSwitch(figure.getSourceDecoration()));%>
+ final String className = fqnSwitch.get(figure.getSourceDecoration(), importManager);%>
/**
* @generated
*/
@@ -40,7 +40,7 @@ if (figure.getTargetDecoration() != null) {%>
<%} /*if sourceDecoration != null */ %>
<%if (figure.getTargetDecoration() != null) {
- final String className = importManager.getImportedName((String) fqnSwitch.doSwitch(figure.getTargetDecoration()));%>
+ final String className = fqnSwitch.get(figure.getTargetDecoration(), importManager);%>
/**
* @generated
*/
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 d318a3234..18edffe3d 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
@@ -4,7 +4,7 @@
Object[] args = (Object[]) argument;
Shape figure = (Shape) args[0];
final ImportAssistant importManager = (ImportAssistant) args[1];
-final GMFGraphSwitch fqnSwitch = (GMFGraphSwitch) args[2];
+final FigureQualifiedNameSwitch fqnSwitch = (FigureQualifiedNameSwitch) args[2];
final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
@@ -13,7 +13,7 @@ final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
/**
* @generated
*/
-public class <%=figure.getName()%> extends <%=importManager.getImportedName((String) fqnSwitch.doSwitch(figure))%> {
+public class <%=figure.getName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
/**
* @generated
@@ -34,7 +34,7 @@ for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
Figure next = (Figure) it.next();
final String childVarName = "child" + next.getName();%>
- <%=importManager.getImportedName((String) fqnSwitch.doSwitch(next))%> <%=childVarName%> = createFigure<%=next.getName()%>();
+ <%=fqnSwitch.get(next, importManager)%> <%=childVarName%> = createFigure<%=next.getName()%>();
setFigure<%=next.getName()%>(<%=childVarName%>);
add(<%=childVarName%>);
<%=dispatcher.dispatch("createLayoutData", dispatcher.createLayoutArgs(next, childVarName, dispatcherArgs.getManagerVariableName(), "layoutData" + next.getName()))%>
@@ -45,7 +45,7 @@ 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();
- final String nextClassName = importManager.getImportedName((String) fqnSwitch.doSwitch(next));%>
+ final String nextClassName = fqnSwitch.get(next, importManager);%>
private <%=nextClassName%> f<%=next.getName()%>;

Back to the top