You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jo...@apache.org on 2001/03/20 02:11:41 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/test/provider Child.java Person.java
jon 01/03/19 17:11:41
Modified: src/java/org/apache/velocity/runtime Runtime.java
RuntimeConstants.java VelocimacroFactory.java
VelocimacroManager.java
src/java/org/apache/velocity/runtime/compiler Compiler.java
src/java/org/apache/velocity/runtime/directive
Directive.java DirectiveConstants.java Foreach.java
Include.java Literal.java Macro.java Parse.java
ParseDirectiveException.java VelocimacroProxy.java
src/java/org/apache/velocity/runtime/resource
ResourceFactory.java
src/java/org/apache/velocity/runtime/visitor
BaseVisitor.java
src/java/org/apache/velocity/test BaseTestCase.java
src/java/org/apache/velocity/test/provider Child.java
Person.java
Log:
javadoc, linewrapping, license...
Revision Changes Path
1.102 +3 -3 jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
Index: Runtime.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- Runtime.java 2001/03/19 08:06:18 1.101
+++ Runtime.java 2001/03/20 01:11:13 1.102
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -139,7 +139,7 @@
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:jlb@houseofdistraction.com">Jeff Bowden</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magusson Jr.</a>
- * @version $Id: Runtime.java,v 1.101 2001/03/19 08:06:18 jon Exp $
+ * @version $Id: Runtime.java,v 1.102 2001/03/20 01:11:13 jon Exp $
*/
public class Runtime implements RuntimeConstants
{
1.22 +3 -3 jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeConstants.java
Index: RuntimeConstants.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeConstants.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- RuntimeConstants.java 2001/03/19 08:05:07 1.21
+++ RuntimeConstants.java 2001/03/20 01:11:14 1.22
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -62,7 +62,7 @@
* @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
- * @version $Id: RuntimeConstants.java,v 1.21 2001/03/19 08:05:07 jon Exp $
+ * @version $Id: RuntimeConstants.java,v 1.22 2001/03/20 01:11:14 jon Exp $
*/
public interface RuntimeConstants
{
1.12 +1 -2 jakarta-velocity/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
Index: VelocimacroFactory.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/VelocimacroFactory.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- VelocimacroFactory.java 2001/03/17 05:02:03 1.11
+++ VelocimacroFactory.java 2001/03/20 01:11:15 1.12
@@ -67,8 +67,7 @@
* manages the set of VMs in a running Velocity engine.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: VelocimacroFactory.java,v 1.11 2001/03/17 05:02:03 geirm Exp $
- *
+ * @version $Id: VelocimacroFactory.java,v 1.12 2001/03/20 01:11:15 jon Exp $
*/
public class VelocimacroFactory
{
1.9 +3 -3 jakarta-velocity/src/java/org/apache/velocity/runtime/VelocimacroManager.java
Index: VelocimacroManager.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/VelocimacroManager.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- VelocimacroManager.java 2001/03/05 11:45:13 1.8
+++ VelocimacroManager.java 2001/03/20 01:11:15 1.9
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -82,7 +82,7 @@
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @author <a href="mailto:JFernandez@viquity.com">Jose Alberto Fernandez</a>
- * @version $Id: VelocimacroManager.java,v 1.8 2001/03/05 11:45:13 jvanzyl Exp $
+ * @version $Id: VelocimacroManager.java,v 1.9 2001/03/20 01:11:15 jon Exp $
*/
public class VelocimacroManager
{
1.4 +6 -3 jakarta-velocity/src/java/org/apache/velocity/runtime/compiler/Compiler.java
Index: Compiler.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/compiler/Compiler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Compiler.java 2001/03/05 11:45:25 1.3
+++ Compiler.java 2001/03/20 01:11:19 1.4
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -58,7 +58,10 @@
import de.fub.bytecode.Constants;
/**
- * The start of a velocity template compiler.
+ * The start of a velocity template compiler. Incomplete.
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @version $Id: Compiler.java,v 1.4 2001/03/20 01:11:19 jon Exp $
*/
public class Compiler implements InstructionConstants
{
1.14 +7 -2 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Directive.java
Index: Directive.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Directive.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Directive.java 2001/03/19 17:12:57 1.13
+++ Directive.java 2001/03/20 01:11:21 1.14
@@ -65,6 +65,9 @@
/**
* Base class for all directives used in Velocity.
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @version $Id: Directive.java,v 1.14 2001/03/20 01:11:21 jon Exp $
*/
public abstract class Directive implements DirectiveConstants,Cloneable
{
@@ -99,7 +102,8 @@
/**
* How this directive is to be initialized.
*/
- public void init( InternalContextAdapter context, Node node) throws Exception
+ public void init( InternalContextAdapter context, Node node)
+ throws Exception
{
int i, k = node.jjtGetNumChildren();
@@ -110,6 +114,7 @@
/**
* How this directive is to be rendered
*/
- public abstract boolean render( InternalContextAdapter context, Writer writer, Node node)
+ public abstract boolean render( InternalContextAdapter context,
+ Writer writer, Node node )
throws IOException, MethodInvocationException;
}
1.4 +6 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/DirectiveConstants.java
Index: DirectiveConstants.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/DirectiveConstants.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DirectiveConstants.java 2001/03/05 11:45:39 1.3
+++ DirectiveConstants.java 2001/03/20 01:11:21 1.4
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,9 +54,11 @@
* <http://www.apache.org/>.
*/
-
/**
- * Base class for all directives used in Velocity.
+ * Base class for all directives used in Velocity.
+ *
+ * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
+ * @version $Id: DirectiveConstants.java,v 1.4 2001/03/20 01:11:21 jon Exp $
*/
public interface DirectiveConstants
{
1.35 +9 -5 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Foreach.java
Index: Foreach.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Foreach.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Foreach.java 2001/03/19 23:52:41 1.34
+++ Foreach.java 2001/03/20 01:11:22 1.35
@@ -84,7 +84,7 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: Foreach.java,v 1.34 2001/03/19 23:52:41 geirm Exp $
+ * @version $Id: Foreach.java,v 1.35 2001/03/20 01:11:22 jon Exp $
*/
public class Foreach extends Directive
{
@@ -193,7 +193,8 @@
return null;
/*
- * See if we already know what type this is. Use the introspection cache
+ * See if we already know what type this is.
+ * Use the introspection cache
*/
int type = UNKNOWN;
@@ -258,7 +259,8 @@
+ " is an Iterator in the #foreach() loop at ["
+ getLine() + "," + getColumn() + "]"
+ " in template " + context.getCurrentTemplateName()
- + ". If used in more than once, this may lead to unexpected results.");
+ + ". If used in more than once, this may lead to "
+ + "unexpected results.");
return ( (Iterator) listObject);
@@ -272,7 +274,8 @@
/* we have no clue what this is */
Runtime.warn ("Could not determine type of iterator in "
- + "#foreach loop for " + node.jjtGetChild(2).getFirstToken().image
+ + "#foreach loop for "
+ + node.jjtGetChild(2).getFirstToken().image
+ " at [" + getLine() + "," + getColumn() + "]"
+ " in template " + context.getCurrentTemplateName() );
@@ -283,7 +286,8 @@
/**
* renders the #foreach() block
*/
- public boolean render( InternalContextAdapter context, Writer writer, Node node)
+ public boolean render( InternalContextAdapter context,
+ Writer writer, Node node )
throws IOException, MethodInvocationException
{
/*
1.17 +15 -9 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Include.java
Index: Include.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Include.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Include.java 2001/03/19 17:12:59 1.16
+++ Include.java 2001/03/20 01:11:23 1.17
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -68,7 +68,8 @@
/**
* Pluggable directive that handles the #include() statement in VTL.
- * This #include() can take multiple arguments of either StringLiteral or Reference.
+ * This #include() can take multiple arguments of either
+ * StringLiteral or Reference.
*
* Notes:
* -----
@@ -97,7 +98,7 @@
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
- * @version $Id: Include.java,v 1.16 2001/03/19 17:12:59 geirm Exp $
+ * @version $Id: Include.java,v 1.17 2001/03/20 01:11:23 jon Exp $
*/
public class Include extends Directive
{
@@ -122,7 +123,8 @@
* argument that is appropriate. Any non appropriate
* arguments are logged, but render() continues.
*/
- public boolean render( InternalContextAdapter context, Writer writer, Node node)
+ public boolean render(InternalContextAdapter context,
+ Writer writer, Node node)
throws IOException, MethodInvocationException
{
/*
@@ -143,12 +145,15 @@
n.getType() == ParserTreeConstants.JJTREFERENCE )
{
if (!renderOutput( n, context, writer ))
- outputErrorToStream( writer, "error with arg " + i + " please see log.");
+ outputErrorToStream( writer, "error with arg " + i
+ + " please see log.");
}
else
{
- Runtime.error("#include() error : invalid argument type : " + n.toString());
- outputErrorToStream( writer, "error with arg " + i + " please see log.");
+ Runtime.error("#include() error : invalid argument type : "
+ + n.toString());
+ outputErrorToStream( writer, "error with arg " + i
+ + " please see log.");
}
}
@@ -163,7 +168,8 @@
* @param writer output Writer
* @return boolean success or failure. failures are logged
*/
- private boolean renderOutput( Node node, InternalContextAdapter context, Writer writer )
+ private boolean renderOutput( Node node, InternalContextAdapter context,
+ Writer writer )
throws IOException, MethodInvocationException
{
String arg = "";
1.4 +7 -5 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Literal.java
Index: Literal.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Literal.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Literal.java 2001/03/05 11:45:44 1.3
+++ Literal.java 2001/03/20 01:11:24 1.4
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -67,7 +67,7 @@
* that during render().
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
- * @version $Id: Literal.java,v 1.3 2001/03/05 11:45:44 jvanzyl Exp $
+ * @version $Id: Literal.java,v 1.4 2001/03/20 01:11:24 jon Exp $
*/
public class Literal extends Directive
{
@@ -93,7 +93,8 @@
* Store the literal rendition of a node using
* the Node.literal().
*/
- public void init( InternalContextAdapter context, Node node) throws Exception
+ public void init( InternalContextAdapter context, Node node)
+ throws Exception
{
literalText = node.jjtGetChild(0).literal();
}
@@ -102,7 +103,8 @@
* Throw the literal rendition of the block between
* #literal()/#end into the writer.
*/
- public boolean render( InternalContextAdapter context, Writer writer, Node node)
+ public boolean render( InternalContextAdapter context,
+ Writer writer, Node node)
throws IOException
{
writer.write(literalText);
1.12 +11 -7 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Macro.java
Index: Macro.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Macro.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Macro.java 2001/03/05 11:45:46 1.11
+++ Macro.java 2001/03/20 01:11:24 1.12
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -82,7 +82,7 @@
* macro. It is used inline in the parser when processing a directive.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: Macro.java,v 1.11 2001/03/05 11:45:46 jvanzyl Exp $
+ * @version $Id: Macro.java,v 1.12 2001/03/20 01:11:24 jon Exp $
*/
public class Macro extends Directive
{
@@ -108,7 +108,8 @@
* render() doesn't do anything in the final output rendering.
* There is no output from a #macro() directive.
*/
- public boolean render( InternalContextAdapter context, Writer writer, Node node)
+ public boolean render( InternalContextAdapter context,
+ Writer writer, Node node)
throws IOException
{
/*
@@ -178,7 +179,8 @@
* now, try and eat the code block. Pass the root.
*/
- String macroArray[] = getASTAsStringArray( node.jjtGetChild( numArgs - 1) );
+ String macroArray[] =
+ getASTAsStringArray( node.jjtGetChild( numArgs - 1) );
/*
* make a big string out of our macro
@@ -196,7 +198,8 @@
* so just give it a whack...
*/
- boolean bRet = Runtime.addVelocimacro( argArray[0], macroBody, argArray, sourceTemplate );
+ boolean bRet = Runtime.addVelocimacro( argArray[0], macroBody,
+ argArray, sourceTemplate );
return;
}
@@ -236,7 +239,8 @@
if ( i > 0)
{
if ( argArray[i].startsWith("$"))
- argArray[i] = argArray[i].substring(1, argArray[i].length());
+ argArray[i] = argArray[i]
+ .substring(1, argArray[i].length());
}
i++;
1.17 +9 -9 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Parse.java
Index: Parse.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Parse.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Parse.java 2001/03/19 17:13:00 1.16
+++ Parse.java 2001/03/20 01:11:25 1.17
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -86,7 +86,7 @@
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:Christoph.Reck@dlr.de">Christoph Reck</a>
- * @version $Id: Parse.java,v 1.16 2001/03/19 17:13:00 geirm Exp $
+ * @version $Id: Parse.java,v 1.17 2001/03/20 01:11:25 jon Exp $
*/
public class Parse extends Directive
{
@@ -113,7 +113,8 @@
* argument that is appropriate. Any non appropriate
* arguments are logged, but render() continues.
*/
- public boolean render( InternalContextAdapter context, Writer writer, Node node)
+ public boolean render( InternalContextAdapter context,
+ Writer writer, Node node)
throws IOException, MethodInvocationException
{
/*
@@ -128,7 +129,6 @@
/*
* does it have a value? If you have a null reference, then no.
*/
-
Object value = node.jjtGetChild(0).value( context );
if ( value == null)
@@ -149,7 +149,8 @@
Object[] templateStack = context.getTemplateNameStack();
- if ( templateStack.length >= Runtime.getInt(Runtime.PARSE_DIRECTIVE_MAXDEPTH, 20) )
+ if ( templateStack.length >=
+ Runtime.getInt(Runtime.PARSE_DIRECTIVE_MAXDEPTH, 20) )
{
StringBuffer path = new StringBuffer();
@@ -158,14 +159,14 @@
path.append( " > " + templateStack[i] );
}
- Runtime.error( "Max recursion depth reached (" + templateStack.length + ")" + " File stack:" + path );
+ Runtime.error( "Max recursion depth reached (" +
+ templateStack.length + ")" + " File stack:" + path );
return false;
}
/*
* now use the Runtime resource loader to get the template
*/
-
Template t = null;
try
@@ -181,7 +182,6 @@
/*
* and render it
*/
-
try
{
context.pushCurrentTemplateName(arg);
1.4 +17 -7 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/ParseDirectiveException.java
Index: ParseDirectiveException.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/ParseDirectiveException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ParseDirectiveException.java 2001/03/05 11:45:49 1.3
+++ ParseDirectiveException.java 2001/03/20 01:11:27 1.4
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -60,28 +60,35 @@
* Exception for #parse() problems
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ParseDirectiveException.java,v 1.3 2001/03/05 11:45:49 jvanzyl Exp $
+ * @version $Id: ParseDirectiveException.java,v 1.4 2001/03/20 01:11:27 jon Exp $
*/
-
public class ParseDirectiveException extends Exception
{
private Stack filenameStack = new Stack();
private String msg = "";
private int depthCount = 0;
- ParseDirectiveException( String m, int i )
+ /**
+ * Constructor
+ */
+ ParseDirectiveException( String m, int i )
{
msg = m;
depthCount = i;
}
+ /**
+ * Get a message.
+ */
public String getMessage()
{
- String returnStr = "#parse() exception : depth = " + depthCount + " -> " + msg;
+ String returnStr = "#parse() exception : depth = " +
+ depthCount + " -> " + msg;
returnStr += " File stack : ";
- try {
+ try
+ {
while( !filenameStack.empty())
{
returnStr += (String) filenameStack.pop();
@@ -95,6 +102,9 @@
return returnStr;
}
+ /**
+ * Add a file to the filename stack
+ */
public void addFile( String s )
{
filenameStack.push( s );
1.20 +3 -3 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
Index: VelocimacroProxy.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- VelocimacroProxy.java 2001/03/05 11:45:52 1.19
+++ VelocimacroProxy.java 2001/03/20 01:11:28 1.20
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -79,7 +79,7 @@
* a proxy Directive-derived object to fit with the current directive system
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: VelocimacroProxy.java,v 1.19 2001/03/05 11:45:52 jvanzyl Exp $
+ * @version $Id: VelocimacroProxy.java,v 1.20 2001/03/20 01:11:28 jon Exp $
*/
public class VelocimacroProxy extends Directive
{
1.3 +4 -0 jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceFactory.java
Index: ResourceFactory.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ResourceFactory.java 2001/03/05 11:46:46 1.2
+++ ResourceFactory.java 2001/03/20 01:11:33 1.3
@@ -59,6 +59,10 @@
/**
* Class responsible for instantiated a given resource type
* given the resource type.
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
+ * @version $Id: ResourceFactory.java,v 1.3 2001/03/20 01:11:33 jon Exp $
*/
public class ResourceFactory
{
1.9 +6 -2 jakarta-velocity/src/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
Index: BaseVisitor.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/visitor/BaseVisitor.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BaseVisitor.java 2001/03/05 11:47:17 1.8
+++ BaseVisitor.java 2001/03/20 01:11:34 1.9
@@ -3,7 +3,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -67,6 +67,10 @@
* This is the base class for all visitors.
* For each AST node, this class will provide
* a bare-bones method for traversal.
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
+ * @version $Id: BaseVisitor.java,v 1.9 2001/03/20 01:11:34 jon Exp $
*/
public abstract class BaseVisitor implements ParserVisitor
{
1.9 +1 -0 jakarta-velocity/src/java/org/apache/velocity/test/BaseTestCase.java
Index: BaseTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/BaseTestCase.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BaseTestCase.java 2001/03/19 22:39:17 1.8
+++ BaseTestCase.java 2001/03/20 01:11:36 1.9
@@ -80,6 +80,7 @@
* the rest of the tests.
*
* @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
+ * @version $Id: BaseTestCase.java,v 1.9 2001/03/20 01:11:36 jon Exp $
*/
public class BaseTestCase extends TestCase
{
1.4 +3 -0 jakarta-velocity/src/java/org/apache/velocity/test/provider/Child.java
Index: Child.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/provider/Child.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Child.java 2001/03/05 11:48:04 1.3
+++ Child.java 2001/03/20 01:11:39 1.4
@@ -58,6 +58,9 @@
* Rudimentary class used in the testbed to test
* introspection with subclasses of a particular
* class.
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @version $Id: Child.java,v 1.4 2001/03/20 01:11:39 jon Exp $
*/
public class Child extends Person
{
1.4 +3 -0 jakarta-velocity/src/java/org/apache/velocity/test/provider/Person.java
Index: Person.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/provider/Person.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Person.java 2001/03/05 11:48:05 1.3
+++ Person.java 2001/03/20 01:11:40 1.4
@@ -61,6 +61,9 @@
*
* This class need to be greatly extended to
* be useful :-)
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @version $Id: Person.java,v 1.4 2001/03/20 01:11:40 jon Exp $
*/
public class Person
{