summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2007-07-11 16:13:53 (EDT)
committerpelder2007-07-11 16:13:53 (EDT)
commit97ec7abe0666d3cdb4e759244c2ca7c6cc5a167b (patch)
treed45bf2fb18ac0945be6152973faf8700c418136f
parent9ece6d95230c3d1f52b799a4e9706f5eb42d3fa6 (diff)
downloadorg.eclipse.jet-97ec7abe0666d3cdb4e759244c2ca7c6cc5a167b.zip
org.eclipse.jet-97ec7abe0666d3cdb4e759244c2ca7c6cc5a167b.tar.gz
org.eclipse.jet-97ec7abe0666d3cdb4e759244c2ca7c6cc5a167b.tar.bz2
recompile JET templates
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java28
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2TransformGenerator.java6
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JETTemplateMapGenerator.java6
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/TagDataDeclGenerator.java10
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteJavaExpressionTemplate.java2
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteTextElementTemplate.java6
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLEndGenerator.java10
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLStartGenerator.java14
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/v2/JET2JavaGeneratorNew.java74
9 files changed, 78 insertions, 78 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java
index 98d4ebb..1175ab1 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java
@@ -16,7 +16,7 @@ import java.util.Iterator;
public class JET2JavaGenerator implements JET2Template {
private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
-
+
private XMLElement[] getAllXMLTags(JET2CompilationUnit cu) {
final List result = new ArrayList();
cu.accept(new DefaultJET2ASTVisitor() {
@@ -58,7 +58,7 @@ public class JET2JavaGenerator implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
JET2CompilationUnit cu = (JET2CompilationUnit)context.getVariable("cu"); //$NON-NLS-1$
final JET2Declaration[] allMemberDeclarations = getAllJavaDeclarations(cu);
@@ -80,39 +80,39 @@ public class JET2JavaGenerator implements JET2Template {
out.write(NL);
out.write("import org.eclipse.jet.JET2Writer;"); //$NON-NLS-1$
out.write(NL);
- if( allXMLElements.length > 0) {
+ if( allXMLElements.length > 0) {
out.write("import org.eclipse.jet.taglib.RuntimeTagElement;"); //$NON-NLS-1$
out.write(NL);
out.write("import org.eclipse.jet.taglib.TagInfo;"); //$NON-NLS-1$
out.write(NL);
- }
- for(Iterator i=cu.getImports().iterator();i.hasNext();) {
+ }
+ for(Iterator i=cu.getImports().iterator();i.hasNext();) {
String importName = (String)i.next();
out.write("import "); //$NON-NLS-1$
out.write(importName);
out.write(";"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(NL);
out.write("public class "); //$NON-NLS-1$
out.write( cu.getOutputJavaClassName() );
out.write(" implements JET2Template {"); //$NON-NLS-1$
out.write(NL);
- if( allXMLElements.length > 0) {
- for(int i = 0; i < tlRefs.length; i++ ) {
+ if( allXMLElements.length > 0) {
+ for(int i = 0; i < tlRefs.length; i++ ) {
out.write(" public static final String _jetns_"); //$NON-NLS-1$
out.write( tlRefs[i].getPrefix() );
out.write(" = \""); //$NON-NLS-1$
out.write( tlRefs[i].getTagLibraryId() );
out.write("\"; //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
- }
- for(int i = 0; i < allMemberDeclarations.length; i++) {
+ }
+ }
+ for(int i = 0; i < allMemberDeclarations.length; i++) {
out.write(NL);
out.write( allMemberDeclarations[i].getJavaContent() );
out.write(NL);
- }
+ }
out.write(NL);
out.write("\tpublic "); //$NON-NLS-1$
out.write( cu.getOutputJavaClassName() );
@@ -125,7 +125,7 @@ public class JET2JavaGenerator implements JET2Template {
out.write(NL);
out.write("\tpublic void generate(final JET2Context context, JET2Writer out) {"); //$NON-NLS-1$
out.write(NL);
- for(int i = 0; i < allXMLElements.length; i++) {
+ for(int i = 0; i < allXMLElements.length; i++) {
context.setVariable("element", allXMLElements[i]); //$NON-NLS-1$
RuntimeTagElement _jettag_c_include_80_4 = context.getTagFactory().createRuntimeTag(_jetns_c, "include", "c:include", _td_c_include_80_4); //$NON-NLS-1$ //$NON-NLS-2$
@@ -133,7 +133,7 @@ public class JET2JavaGenerator implements JET2Template {
_jettag_c_include_80_4.setTagInfo(_td_c_include_80_4);
_jettag_c_include_80_4.doStart(context, out);
_jettag_c_include_80_4.doEnd();
- }
+ }
out.write( generatedBody.getBuffer() );
out.write(NL);
out.write("\t}"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2TransformGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2TransformGenerator.java
index 00a974b..8905115 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2TransformGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2TransformGenerator.java
@@ -20,7 +20,7 @@ public class JET2TransformGenerator implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
LoaderGenerationParameters parms = (LoaderGenerationParameters)context.getVariable("args"); //$NON-NLS-1$
Map templateMap = (Map) parms.getTemplateMap();;
@@ -160,7 +160,7 @@ Map templateMap = (Map) parms.getTemplateMap();;
out.write( templateMap.size() );
out.write(");"); //$NON-NLS-1$
out.write(NL);
-
+
List templatePaths = new ArrayList(templateMap.keySet());
Collections.sort(templatePaths);
for(Iterator i = templatePaths.iterator(); i.hasNext();){
@@ -173,7 +173,7 @@ Map templateMap = (Map) parms.getTemplateMap();;
out.write( value );
out.write("\" ); //$NON-NLS-1$ //$NON-NLS-2$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" }"); //$NON-NLS-1$
out.write(NL);
out.write(NL);
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JETTemplateMapGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JETTemplateMapGenerator.java
index 5ed127f..ff2d0bf 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JETTemplateMapGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JETTemplateMapGenerator.java
@@ -20,12 +20,12 @@ public class JETTemplateMapGenerator implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
Map templateMap = (Map)context.getVariable("args"); //$NON-NLS-1$
List templatePaths = new ArrayList(templateMap.keySet());
Collections.sort(templatePaths);
-
+
for(Iterator i = templatePaths.iterator(); i.hasNext();){
String key = (String)i.next();
String value = (String)templateMap.get(key);
@@ -34,6 +34,6 @@ Collections.sort(templatePaths);
out.write(" = "); //$NON-NLS-1$
out.write( PreferenceValueUtil.encode(value) );
out.write(NL);
- }
+ }
}
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/TagDataDeclGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/TagDataDeclGenerator.java
index e4bb17a..0369afb 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/TagDataDeclGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/TagDataDeclGenerator.java
@@ -19,7 +19,7 @@ public class TagDataDeclGenerator implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
XMLElement element;
try {
element = (XMLElement)context.getVariable("element"); //$NON-NLS-1$
@@ -44,24 +44,24 @@ public class TagDataDeclGenerator implements JET2Template {
out.write(NL);
out.write(" new String[] {"); //$NON-NLS-1$
out.write(NL);
- for (Iterator i = element.getAttributes().keySet().iterator(); i.hasNext();) {
+ for (Iterator i = element.getAttributes().keySet().iterator(); i.hasNext();) {
String attrName = (String) i.next();
out.write(" \""); //$NON-NLS-1$
out.write( attrName );
out.write("\", //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" },"); //$NON-NLS-1$
out.write(NL);
out.write(" new String[] {"); //$NON-NLS-1$
out.write(NL);
- for (Iterator i = element.getAttributes().values().iterator(); i.hasNext();) {
+ for (Iterator i = element.getAttributes().values().iterator(); i.hasNext();) {
String attrValue = (String) i.next();
out.write(" \""); //$NON-NLS-1$
out.write( JavaUtil.escapeJavaString(attrValue.toCharArray()) );
out.write("\", //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" } );"); //$NON-NLS-1$
out.write(NL);
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteJavaExpressionTemplate.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteJavaExpressionTemplate.java
index a533b3d..27a3634 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteJavaExpressionTemplate.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteJavaExpressionTemplate.java
@@ -15,7 +15,7 @@ public class WriteJavaExpressionTemplate implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
final String indent = (String)context.getVariable("indent"); //$NON-NLS-1$
final JET2Expression expr = (JET2Expression)context.getVariable("element"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteTextElementTemplate.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteTextElementTemplate.java
index bedbc27..cdce88e 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteTextElementTemplate.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/WriteTextElementTemplate.java
@@ -16,16 +16,16 @@ public class WriteTextElementTemplate implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
final String indent = (String)context.getVariable("indent"); //$NON-NLS-1$
final TextElement text = (TextElement)context.getVariable("element"); //$NON-NLS-1$
- if(text.getText().length > 0) {
+ if(text.getText().length > 0) {
out.write( indent );
out.write("out.write( "); //$NON-NLS-1$
out.write( JavaUtil.asJavaQuotedString(text.getText()) );
out.write(" ); //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
}
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLEndGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLEndGenerator.java
index 5640e9f..730e713 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLEndGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLEndGenerator.java
@@ -51,10 +51,10 @@ public class XMLEndGenerator implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
GenXMLElement element = (GenXMLElement) context.getVariable("element"); //$NON-NLS-1$
- if(element.hasBody()) {
+ if(element.hasBody()) {
RuntimeTagElement _jettag_c_get_7_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_7_1); //$NON-NLS-1$ //$NON-NLS-2$
_jettag_c_get_7_1.setRuntimeParent(null);
_jettag_c_get_7_1.setTagInfo(_td_c_get_7_1);
@@ -71,7 +71,7 @@ public class XMLEndGenerator implements JET2Template {
_jettag_c_get_8_1.doEnd();
out.write("}"); //$NON-NLS-1$
out.write(NL);
- if(element.requiresNewWriter()) {
+ if(element.requiresNewWriter()) {
RuntimeTagElement _jettag_c_get_10_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_1); //$NON-NLS-1$ //$NON-NLS-2$
_jettag_c_get_10_1.setRuntimeParent(null);
_jettag_c_get_10_1.setTagInfo(_td_c_get_10_1);
@@ -81,8 +81,8 @@ public class XMLEndGenerator implements JET2Template {
out.write( element.getTagVariable() );
out.write("_saved_out;"); //$NON-NLS-1$
out.write(NL);
- }
- }
+ }
+ }
RuntimeTagElement _jettag_c_get_13_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_13_1); //$NON-NLS-1$ //$NON-NLS-2$
_jettag_c_get_13_1.setRuntimeParent(null);
_jettag_c_get_13_1.setTagInfo(_td_c_get_13_1);
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLStartGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLStartGenerator.java
index 672f462..ddd9b9e 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLStartGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/XMLStartGenerator.java
@@ -75,7 +75,7 @@ public class XMLStartGenerator implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
GenXMLElement element = (GenXMLElement) context.getVariable("element"); //$NON-NLS-1$
RuntimeTagElement _jettag_c_get_6_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_1); //$NON-NLS-1$ //$NON-NLS-2$
@@ -123,8 +123,8 @@ public class XMLStartGenerator implements JET2Template {
out.write( element.getTagVariable() );
out.write(".doStart(context, out);"); //$NON-NLS-1$
out.write(NL);
- if(element.hasBody()) {
- if(element.requiresNewWriter()) {
+ if(element.hasBody()) {
+ if(element.requiresNewWriter()) {
RuntimeTagElement _jettag_c_get_12_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_12_1); //$NON-NLS-1$ //$NON-NLS-2$
_jettag_c_get_12_1.setRuntimeParent(null);
_jettag_c_get_12_1.setTagInfo(_td_c_get_12_1);
@@ -134,7 +134,7 @@ public class XMLStartGenerator implements JET2Template {
out.write( element.getTagVariable() );
out.write("_saved_out = out;"); //$NON-NLS-1$
out.write(NL);
- }
+ }
RuntimeTagElement _jettag_c_get_14_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_14_1); //$NON-NLS-1$ //$NON-NLS-2$
_jettag_c_get_14_1.setRuntimeParent(null);
_jettag_c_get_14_1.setTagInfo(_td_c_get_14_1);
@@ -144,7 +144,7 @@ public class XMLStartGenerator implements JET2Template {
out.write( element.getTagVariable() );
out.write(".okToProcessBody()) {"); //$NON-NLS-1$
out.write(NL);
- if(element.requiresNewWriter()) {
+ if(element.requiresNewWriter()) {
RuntimeTagElement _jettag_c_get_16_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_16_1); //$NON-NLS-1$ //$NON-NLS-2$
_jettag_c_get_16_1.setRuntimeParent(null);
_jettag_c_get_16_1.setTagInfo(_td_c_get_16_1);
@@ -152,7 +152,7 @@ public class XMLStartGenerator implements JET2Template {
_jettag_c_get_16_1.doEnd();
out.write(" out = out.newNestedContentWriter();"); //$NON-NLS-1$
out.write(NL);
- }
- }
+ }
+ }
}
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/v2/JET2JavaGeneratorNew.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/v2/JET2JavaGeneratorNew.java
index 121723c..4973975 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/v2/JET2JavaGeneratorNew.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/v2/JET2JavaGeneratorNew.java
@@ -23,7 +23,7 @@ public class JET2JavaGeneratorNew implements JET2Template {
public void generate(final JET2Context context, final JET2Writer __out) {
JET2Writer out = __out;
-
+
JETCompilationUnit cu = (JETCompilationUnit)context.getVariable("cu"); //$NON-NLS-1$
TagUsageVisitor tuv = new TagUsageVisitor();
cu.accept(tuv);
@@ -46,38 +46,38 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write(NL);
out.write("import org.eclipse.jet.JET2Writer;"); //$NON-NLS-1$
out.write(NL);
- if(tuv.hasTags()) {
+ if(tuv.hasTags()) {
out.write("import org.eclipse.jet.taglib.RuntimeTagElement;"); //$NON-NLS-1$
out.write(NL);
out.write("import org.eclipse.jet.taglib.TagInfo;"); //$NON-NLS-1$
out.write(NL);
- }
- for(Iterator i=cu.getImports().iterator();i.hasNext();) {
+ }
+ for(Iterator i=cu.getImports().iterator();i.hasNext();) {
out.write("import "); //$NON-NLS-1$
out.write( (String)i.next() );
out.write(";"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(NL);
out.write("public class "); //$NON-NLS-1$
out.write( cu.getOutputJavaClassName() );
out.write(" implements JET2Template {"); //$NON-NLS-1$
out.write(NL);
- for(int i = 0; i < tlrefs.length; i++ ) {
+ for(int i = 0; i < tlrefs.length; i++ ) {
out.write(" private static final String _jetns_"); //$NON-NLS-1$
out.write( tlrefs[i].getPrefix() );
out.write(" = \""); //$NON-NLS-1$
out.write( tlrefs[i].getTagLibraryId() );
out.write("\"; //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(NL);
- cu.accept(new V2CodeGenVisitor(context,out) {
+ cu.accept(new V2CodeGenVisitor(context,out) {
public boolean visit(JavaDeclaration decl) {
- writeAndRecord(decl);
+ writeAndRecord(decl);
out.write(NL);
-
+
return true;
}
});
@@ -90,17 +90,17 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write(NL);
out.write(" }"); //$NON-NLS-1$
out.write(NL);
- if(HasNewlinesUtil.test(cu)) {
+ if(HasNewlinesUtil.test(cu)) {
out.write(NL);
out.write(" private static final String "); //$NON-NLS-1$
out.write(nlConstantName);
out.write(" = System.getProperty(\"line.separator\"); //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
- if(tuv.hasTags()) {
+ }
+ if(tuv.hasTags()) {
out.write(" "); //$NON-NLS-1$
out.write(NL);
- cu.accept(new V2CodeGenVisitor(context,out, " ") { //$NON-NLS-1$
+ cu.accept(new V2CodeGenVisitor(context,out, " ") { //$NON-NLS-1$
public boolean visit(XMLBodyElement e) {
doElementVisit(e);
return true;
@@ -125,34 +125,34 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write(NL);
out.write(" new String[] {"); //$NON-NLS-1$
out.write(NL);
- for (Iterator i = e.getAttributes().keySet().iterator(); i.hasNext();) {
+ for (Iterator i = e.getAttributes().keySet().iterator(); i.hasNext();) {
out.write(" \""); //$NON-NLS-1$
out.write( (String) i.next() );
out.write("\", //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" },"); //$NON-NLS-1$
out.write(NL);
out.write(" new String[] {"); //$NON-NLS-1$
out.write(NL);
- for (Iterator i = e.getAttributes().values().iterator(); i.hasNext();) {
+ for (Iterator i = e.getAttributes().values().iterator(); i.hasNext();) {
String attrValue = (String) i.next();
out.write(" \""); //$NON-NLS-1$
out.write( JavaUtil.escapeJavaString(attrValue.toCharArray()) );
out.write("\", //$NON-NLS-1$"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" } );"); //$NON-NLS-1$
out.write(NL);
- }
+ }
});
- }
+ }
out.write(NL);
out.write(" public void generate(final JET2Context context, final JET2Writer __out) {"); //$NON-NLS-1$
out.write(NL);
out.write(" JET2Writer out = __out;"); //$NON-NLS-1$
out.write(NL);
- cu.accept(new V2CodeGenVisitor(context,out, " ") { //$NON-NLS-1$
+ cu.accept(new V2CodeGenVisitor(context,out, " ") { //$NON-NLS-1$
public boolean visit(TextElement text) {
if(text.getText().length > 0) {
String[] strings = textConstants(text, nlConstantName);
@@ -161,30 +161,30 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write(" out.write("); //$NON-NLS-1$
out.write(strings[i]);
out.write("); "); //$NON-NLS-1$
- if(strings[i].startsWith("\"")) { //$NON-NLS-1$
+ if(strings[i].startsWith("\"")) { //$NON-NLS-1$
out.write(" //$NON-NLS-1$"); //$NON-NLS-1$
- }
+}
out.write(" "); //$NON-NLS-1$
out.write(NL);
-
+
}
}
return true;
}
public boolean visit(JavaScriptlet scriptlet) {
- writeAndRecord(scriptlet);
+ writeAndRecord(scriptlet);
out.write(NL);
-
+
return true;
}
public boolean visit(JavaExpression expr) {
out.write(" out.write("); //$NON-NLS-1$
- writeAndRecord(expr);
+ writeAndRecord(expr);
out.write(");"); //$NON-NLS-1$
out.write(NL);
-
+
return true;
}
public boolean visit(XMLBodyElement e) {
@@ -217,21 +217,21 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write( tagVar(e) );
out.write(".doStart(context, out);"); //$NON-NLS-1$
out.write(NL);
- if(requiresOwnWriter(e)) {
+ if(requiresOwnWriter(e)) {
out.write(" JET2Writer "); //$NON-NLS-1$
out.write( tagVar(e) );
out.write("_saved_out = out;"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" while ("); //$NON-NLS-1$
out.write( tagVar(e) );
out.write(".okToProcessBody()) {"); //$NON-NLS-1$
out.write(NL);
- if(requiresOwnWriter(e)) {
+ if(requiresOwnWriter(e)) {
out.write(" out = out.newNestedContentWriter();"); //$NON-NLS-1$
out.write(NL);
- }
-
+ }
+
in();
return true;
}
@@ -244,17 +244,17 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write(NL);
out.write(" }"); //$NON-NLS-1$
out.write(NL);
- if(requiresOwnWriter(e)) {
+ if(requiresOwnWriter(e)) {
out.write(" out = "); //$NON-NLS-1$
out.write( tagVar(e) );
out.write("_saved_out;"); //$NON-NLS-1$
out.write(NL);
- }
+ }
out.write(" "); //$NON-NLS-1$
out.write( tagVar(e) );
out.write(".doEnd();"); //$NON-NLS-1$
out.write(NL);
-
+
}
public boolean visit(XMLEmptyElement e) {
@@ -291,7 +291,7 @@ public class JET2JavaGeneratorNew implements JET2Template {
out.write( tagVar(e) );
out.write(".doEnd();"); //$NON-NLS-1$
out.write(NL);
-
+
return true;
}
});