You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(97) |
Dec
(35) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(55) |
Mar
(21) |
Apr
(3) |
May
(7) |
Jun
(25) |
Jul
(108) |
Aug
(23) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2006 |
Jan
|
Feb
|
Mar
(6) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(13) |
Feb
|
Mar
(257) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(38) |
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(63) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dr...@us...> - 2002-11-27 04:19:01
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro In directory sc8-pr-cvs1:/tmp/cvs-serv7055/test/unit/org/webmacro Modified Files: TestVersion.java Log Message: preparing for WM1.1b2 release. - made following targets in build.xml usage print words to stdout this is now the default target dist-binary does not include sources, not even webmacro-src.jar dist-source does not include binaries, not even javadocs does include build.xml, examples, tutorial, test-suite can compile,test, and build another distro from this download release build both of the above, and .zip and .tgz 'em - do token replacement on @BUILD_DATE@ in source tree - include a manifest in webmacro.jar that allows you to do this: java -jar webmacro.jar it gives you the version and the build date - added more words to release notes - fixed a javadoc type-o in StaticClassWrapper - fixed html errors in org/webmacro/resource/package.html - documented our external dependencies in lib/readme.txt Index: TestVersion.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/TestVersion.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestVersion.java 6 Oct 2001 08:28:20 -0000 1.1 --- TestVersion.java 27 Nov 2002 04:18:58 -0000 1.2 *************** *** 27,29 **** --- 27,33 ---- assert (!WebMacro.VERSION.equals("@VERSION@")); } + + public void testBuildDate() throws Exception { + assert (!WebMacro.VERSION.equals("@BUILD_DATE")); + } } |
From: <dr...@us...> - 2002-11-27 04:19:00
|
Update of /cvsroot/webmacro/webmacro In directory sc8-pr-cvs1:/tmp/cvs-serv7055 Modified Files: build.xml Log Message: preparing for WM1.1b2 release. - made following targets in build.xml usage print words to stdout this is now the default target dist-binary does not include sources, not even webmacro-src.jar dist-source does not include binaries, not even javadocs does include build.xml, examples, tutorial, test-suite can compile,test, and build another distro from this download release build both of the above, and .zip and .tgz 'em - do token replacement on @BUILD_DATE@ in source tree - include a manifest in webmacro.jar that allows you to do this: java -jar webmacro.jar it gives you the version and the build date - added more words to release notes - fixed a javadoc type-o in StaticClassWrapper - fixed html errors in org/webmacro/resource/package.html - documented our external dependencies in lib/readme.txt Index: build.xml =================================================================== RCS file: /cvsroot/webmacro/webmacro/build.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** build.xml 17 Nov 2002 16:26:21 -0000 1.28 --- build.xml 27 Nov 2002 04:18:57 -0000 1.29 *************** *** 1,230 **** <!-- ! In order to compile WebMacro, you may need to set these environment variables ! JAVACC_HOME: your JavaCC installation --> ! <project name="WebMacro" default="compile" basedir="."> ! <property name="version" value="1.1b2" /> ! <property name="app.name" value="webmacro" /> ! <property name="tmpdir" value="tmp" /> ! <property name="classes" value="classes"/> ! <property name="macros" value="macros"/> ! <property name="dist" value="webmacro-${version}"/> ! <property name="javadoc" value="javadoc"/> ! <property name="examples" value="examples"/> ! <property name="jar" value="${app.name}.jar"/> ! <property name="src.jar" value="${app.name}-src.jar"/> ! <property environment="ENV" /> ! <property name="javacc.home" value="${ENV.JAVACC_HOME}" /> ! <taskdef name="javacc" ! classname="org.apache.tools.ant.taskdefs.optional.javacc.JavaCC" /> ! <path id="class.path"> ! <fileset dir="lib"> ! <include name="*.jar" /> <include name="*.zip" /> ! </fileset> ! <pathelement location="${classes}" /> ! <pathelement location="${macros}" /> ! <pathelement path="${java.class.path}" /> ! </path> ! <property name="classpath.resolved" refid="class.path"/> ! <target name="prepare"> ! <mkdir dir="${classes}"/> ! <mkdir dir="${javadoc}"/> ! <mkdir dir="${dist}"/> ! <mkdir dir="${examples}/WEB-INF"/> ! <mkdir dir="${examples}/WEB-INF/classes"/> ! <mkdir dir="${examples}/WEB-INF/lib"/> ! <mkdir dir="${dist}"/> ! <mkdir dir="${dist}"/> ! <available property="javacc.present" classname="COM.sun.labs.javacc.Main" ! classpath="${javacc.home}/JavaCC.zip" /> ! </target> ! <target name="clean" depends="test-clean"> ! <delete dir="${classes}"/> ! <delete dir="${javadoc}"/> ! <delete dir="${dist}"/> ! <delete file="${jar}"/> ! <delete file="${src.jar}"/> ! <delete dir="${tmpdir}"/> ! <delete dir="${examples}/WEB-INF"/> ! <delete dir="${tmpdir}"/> ! </target> ! <target name="precompile" depends="prepare" if="javacc.present"> ! <javacc target="src/org/webmacro/parser/WMParser_impl.jj" javacchome="${javacc.home}" /> ! </target> ! <target name="compile" depends="prepare, precompile"> ! <filter token="VERSION" value="${version}" /> ! <copy todir="${tmpdir}" filtering="true"> ! <fileset dir="src" /> ! </copy> ! <javac srcdir="${tmpdir}" destdir="${classes}" ! debug="on" optimize="off" deprecation="off"> ! <classpath refid="class.path" /> ! </javac> ! ! <copy todir="${classes}"> ! <fileset dir="${tmpdir}" includes="**/*.properties" /> ! <fileset dir="." includes="WebMacro.defaults"/> ! </copy> ! <touch file="${classes}/WM-VERSION-${version}" /> ! </target> ! <target name="compile-examples" depends="compile"> ! <filter token="VERSION" value="${version}" /> ! <javac srcdir="${examples}" destdir="${examples}/WEB-INF/classes" excludes="**/advanced/*.java" ! debug="on" optimize="off" deprecation="off"> ! <classpath refid="class.path" /> ! </javac> ! </target> - <target name="javadoc" depends="prepare"> - <javadoc sourcepath="src" destdir="${javadoc}" - packagenames="org.*" author="true" version="true" - use="true"> - <classpath refid="class.path" /> - </javadoc> - </target> ! <target name="jar" depends="prepare,compile"> ! <jar jarfile="${jar}" basedir="${classes}"/> ! <jar jarfile="${src.jar}" basedir="." ! includes="src/**,build.xml,test/**"/> ! </target> ! <target name="dist" depends="prepare,compile,compile-examples,jar,javadoc"> ! <mkdir dir="${dist}/tutorial" /> ! <copy todir="${dist}/tutorial"> ! <fileset dir="tutorial"/> ! </copy> ! <mkdir dir="${dist}/api" /> ! <copy todir="${dist}/api"> ! <fileset dir="${javadoc}"/> ! </copy> ! <copy todir="${dist}" file="${src.jar}"/> ! <copy todir="${dist}" file="${jar}"/> ! <copy todir="${dist}"> ! <fileset dir="distroot" /> ! </copy> ! <mkdir dir="${dist}/examples" /> ! <copy todir="${dist}/examples"> ! <fileset dir="examples" /> ! </copy> ! <mkdir dir="${dist}/macros" /> ! <copy todir="${dist}/macros"> ! <fileset dir="${macros}" /> ! </copy> ! <!-- don't put contrib in the distro anymore. ! <mkdir dir="${dist}/contrib" /> ! <copy todir="${dist}/contrib"> ! <fileset dir="contrib" /> </copy> ! --> ! <touch file="${dist}/WM-VERSION-${version}"/> ! </target> ! <!-- ! <target name="contrib" depends="compile" > ! <ant antfile="contrib/build.xml" target="all" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! --> ! <target name="test" depends="compile" > ! <ant antfile="test/build.xml" target="all" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-unit" depends="compile" > ! <ant antfile="test/build.xml" target="unit" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-validate" depends="compile" > ! <ant antfile="test/build.xml" target="validate" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-templates" depends="compile" > ! <ant antfile="test/build.xml" target="templates" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> - <target name="test-tst" depends="compile" > - <ant antfile="test/build.xml" target="TST" > - <property name="java.class.path" value="${classpath.resolved}"/> - </ant> - </target> ! <target name="test-macro" depends="compile" > ! <ant antfile="test/build.xml" target="macros" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-clean" > ! <ant antfile="test/build.xml" target="clean"> ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-compile" > ! <ant antfile="test/build.xml" target="unit-compile"> ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="all" depends="clean,prepare,compile,javadoc,dist,test-unit"/> ! <!-- ! Note: there are two tasks: ! (1) Parsing a template which checks the grammar syntax ! (2) Evaluating a template which evaluates a template using a context ! provided by the template or some bean ! ! MOTE: the tasks are independent. (1) and/or (2) can be run completely ! independent of the other! ! <taskdef name="wmtemplates" ! classname="org.webmacro.tools.WMTemplateAntTask" > ! <classpath refid="class.path" /> ! </taskdef> ! <taskdef name="wmevaltemplates" ! classname="org.webmacro.tools.TemplateEvalAntTask" > ! <classpath refid="class.path" /> ! </taskdef> ! <target name="templates"> ! <wmtemplates> ! <fileset dir="." includes="**/*.wm"/> ! <classpath refid="class.path" /> ! </wmtemplates> ! <wmevaltemplates> ! <fileset dir="templates" includes="**/*.wm"/> <classpath refid="class.path" /> ! </wmevaltemplates> ! ! </target> ! --> </project> --- 1,322 ---- <!-- ! In order to compile WebMacro, you may need to set these environment variables ! JAVACC_HOME: your JavaCC installation --> + <!-- + Note, you will need ANT 1.5.x, available from: + http://jakarta.apache.org/ant + --> + <project name="WebMacro" default="usage" basedir="."> ! <target name="usage"> ! <echo><![CDATA[ ! Usage: ! ant TARGET [-Dproperty1=value -DpropertyN=value] ! Common targets: ! clean ! Remove all temporary files created during build process ! compile ! Compile all source files ! jar ! Create "webmacro.jar" ! javadoc ! Generate javadocs ! test ! Execute entire test suite against current sources ! test -Dtest=TestSomething ! Execute a specific test. No need to specify full classname. ! Useful to quickly test a specific aspect of WebMacro ! all ! do it all, baby! ! Administrative targets: ! dist-binary ! Build a binary distro of WebMacro ! dist-source ! Build a source distro of WebMacro ! release ! Build both binary and source distros and .zip and .tgz 'em both ! ]]></echo> ! </target> ! <property name="version" value="1.1b2" /> ! <property name="app.name" value="webmacro" /> ! <property name="tmpdir" value="tmp" /> ! <property name="classes" value="classes"/> ! <property name="macros" value="macros"/> ! <property name="dist.binary" value="webmacro-bin-${version}"/> ! <property name="dist.source" value="webmacro-src-${version}"/> ! <property name="javadoc" value="javadoc"/> ! <property name="examples" value="examples"/> ! <property name="jar" value="${app.name}.jar"/> ! <property name="src.jar" value="${app.name}-src.jar"/> ! <property environment="ENV" /> ! <property name="javacc.home" value="${ENV.JAVACC_HOME}" /> ! <taskdef name="javacc" ! classname="org.apache.tools.ant.taskdefs.optional.javacc.JavaCC" /> + <path id="class.path"> + <fileset dir="lib"> + <include name="*.jar" /> + <include name="*.zip" /> + </fileset> + <pathelement location="${classes}" /> + <pathelement location="${macros}" /> + <pathelement path="${java.class.path}" /> + </path> + <property name="classpath.resolved" refid="class.path"/> ! <target name="prepare"> ! <tstamp /> ! <mkdir dir="${classes}"/> ! <mkdir dir="${javadoc}"/> ! <mkdir dir="${dist.binary}"/> ! <mkdir dir="${examples}/WEB-INF"/> ! <mkdir dir="${examples}/WEB-INF/classes"/> ! <mkdir dir="${examples}/WEB-INF/lib"/> ! <mkdir dir="${dist.binary}"/> ! <mkdir dir="${dist.source}"/> ! <available property="javacc.present" classname="COM.sun.labs.javacc.Main" ! classpath="${javacc.home}/JavaCC.zip" /> ! </target> ! <target name="clean" depends="test-clean"> ! <delete dir="${classes}"/> ! <delete dir="${javadoc}"/> ! <delete dir="${dist.binary}"/> ! <delete file="${dist.binary}.tgz"/> ! <delete file="${dist.binary}.zip"/> ! <delete dir="${dist.source}"/> ! <delete file="${dist.source}.tgz"/> ! <delete file="${dist.source}.zip"/> ! <delete file="${jar}"/> ! <delete file="${src.jar}"/> ! <delete dir="${tmpdir}"/> ! <delete dir="${examples}/WEB-INF"/> ! <delete dir="${tmpdir}"/> ! </target> ! ! ! <target name="precompile" depends="prepare" if="javacc.present"> ! <javacc target="src/org/webmacro/parser/WMParser_impl.jj" javacchome="${javacc.home}" /> ! </target> ! <target name="compile" depends="prepare, precompile"> ! <filter token="VERSION" value="${version}" /> ! <filter token="BUILD_DATE" value="${TODAY}" /> ! <copy todir="${tmpdir}" filtering="true"> ! <fileset dir="src" /> ! </copy> ! <javac srcdir="${tmpdir}" destdir="${classes}" ! debug="on" optimize="off" deprecation="off"> ! <classpath refid="class.path" /> ! </javac> ! <copy todir="${classes}"> ! <fileset dir="${tmpdir}" includes="**/*.properties" /> ! <fileset dir="." includes="WebMacro.defaults"/> ! </copy> ! <touch file="${classes}/WM-VERSION-${version}" /> ! </target> ! ! <target name="compile-examples" depends="compile"> ! <filter token="VERSION" value="${version}" /> ! <filter token="BUILD_DATE" value="${TODAY}" /> ! <javac srcdir="${examples}" destdir="${examples}/WEB-INF/classes" excludes="**/advanced/*.java" ! debug="on" optimize="off" deprecation="off"> ! <classpath refid="class.path" /> ! </javac> ! </target> + <target name="javadoc" depends="prepare"> + <javadoc sourcepath="src" destdir="${javadoc}" + packagenames="org.*" author="true" version="true" + use="true"> + <classpath refid="class.path" /> + </javadoc> + </target> + <target name="jar" depends="prepare,compile"> + <jar jarfile="${jar}" basedir="${classes}"> + <manifest> + <attribute name="Main-Class" value="org.webmacro.WM" /> + <attribute name="Build-Date" value="${TODAY}" /> + </manifest> + </jar> + </target> ! <target name="dist-binary" depends="prepare,compile,compile-examples,jar,javadoc"> ! <copy todir="${dist.binary}" file="${jar}"/> ! <copy todir="${dist.binary}"> ! <fileset dir="distroot" /> ! </copy> ! <mkdir dir="${dist.binary}/tutorial" /> ! <copy todir="${dist.binary}/tutorial"> ! <fileset dir="tutorial"/> </copy> ! <mkdir dir="${dist.binary}/api" /> ! <copy todir="${dist.binary}/api"> ! <fileset dir="${javadoc}"/> ! </copy> ! <mkdir dir="${dist.binary}/examples" /> ! <copy todir="${dist.binary}/examples"> ! <fileset dir="examples" /> ! </copy> ! <mkdir dir="${dist.binary}/macros" /> ! <copy todir="${dist.binary}/macros"> ! <fileset dir="${macros}" /> ! </copy> ! <touch file="${dist.binary}/WM-VERSION-${version}"/> ! </target> ! <target name="dist-source" depends="prepare"> ! <copy todir="${dist.source}"> ! <fileset dir="distroot" /> ! </copy> ! <copy file='WebMacro.defaults' todir='${dist.source}' /> ! <copy file='build.xml' todir='${dist.source}' /> ! <mkdir dir="${dist.source}/src" /> ! <copy todir="${dist.source}/src"> ! <fileset dir="src" /> ! </copy> ! <mkdir dir="${dist.source}/test" /> ! <copy todir="${dist.source}/test"> ! <fileset dir="test" /> ! </copy> ! <mkdir dir="${dist.source}/lib" /> ! <copy todir="${dist.source}/lib"> ! <fileset dir="lib" includes="**/*.txt" /> ! </copy> ! <mkdir dir="${dist.source}/tutorial" /> ! <copy todir="${dist.source}/tutorial"> ! <fileset dir="tutorial"/> ! </copy> ! <mkdir dir="${dist.source}/examples" /> ! <copy todir="${dist.source}/examples"> ! <fileset dir="examples" /> ! </copy> ! <mkdir dir="${dist.source}/macros" /> ! <copy todir="${dist.source}/macros"> ! <fileset dir="${macros}" /> ! </copy> ! <touch file="${dist.source}/WM-VERSION-${version}"/> ! </target> ! <target name='release' depends='clean,test,dist-binary,dist-source'> ! <zip destfile='${dist.binary}.zip' basedir='${dist.binary}' /> ! <zip destfile='${dist.source}.zip' basedir='${dist.source}' /> ! <tar destfile='${dist.binary}.tar' basedir='${dist.binary}' /> ! <gzip zipfile='${dist.binary}.tgz' src='${dist.binary}.tar' /> ! <delete file='${dist.binary}.tar' /> ! <tar destfile='${dist.source}.tar' basedir='${dist.source}' /> ! <gzip zipfile='${dist.source}.tgz' src='${dist.source}.tar' /> ! <delete file='${dist.source}.tar' /> ! </target> ! <!-- ! <target name="contrib" depends="compile" > ! <ant antfile="contrib/build.xml" target="all" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! --> ! <target name="test" depends="compile" > ! <ant antfile="test/build.xml" target="all" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-unit" depends="compile" > ! <ant antfile="test/build.xml" target="unit" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-validate" depends="compile" > ! <ant antfile="test/build.xml" target="validate" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-templates" depends="compile" > ! <ant antfile="test/build.xml" target="templates" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! <target name="test-tst" depends="compile" > ! <ant antfile="test/build.xml" target="TST" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! ! <target name="test-macro" depends="compile" > ! <ant antfile="test/build.xml" target="macros" > ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! ! <target name="test-clean" > ! <ant antfile="test/build.xml" target="clean"> ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! ! <target name="test-compile" > ! <ant antfile="test/build.xml" target="unit-compile"> ! <property name="java.class.path" value="${classpath.resolved}"/> ! </ant> ! </target> ! ! <target name="all" depends="clean,prepare,compile,javadoc,dist-source,dist-binary,test-unit"/> ! ! <!-- ! Note: there are two tasks: ! (1) Parsing a template which checks the grammar syntax ! (2) Evaluating a template which evaluates a template using a context ! provided by the template or some bean ! ! MOTE: the tasks are independent. (1) and/or (2) can be run completely ! independent of the other! ! ! <taskdef name="wmtemplates" ! classname="org.webmacro.tools.WMTemplateAntTask" > <classpath refid="class.path" /> ! </taskdef> ! ! <taskdef name="wmevaltemplates" ! classname="org.webmacro.tools.TemplateEvalAntTask" > ! <classpath refid="class.path" /> ! </taskdef> ! ! <target name="templates"> ! <wmtemplates> ! <fileset dir="." includes="**/*.wm"/> ! <classpath refid="class.path" /> ! </wmtemplates> ! ! <wmevaltemplates> ! <fileset dir="templates" includes="**/*.wm"/> ! <classpath refid="class.path" /> ! </wmevaltemplates> ! ! </target> ! --> </project> |
From: <dr...@us...> - 2002-11-27 04:19:00
|
Update of /cvsroot/webmacro/webmacro/distroot In directory sc8-pr-cvs1:/tmp/cvs-serv7055/distroot Modified Files: RELEASE-NOTES Log Message: preparing for WM1.1b2 release. - made following targets in build.xml usage print words to stdout this is now the default target dist-binary does not include sources, not even webmacro-src.jar dist-source does not include binaries, not even javadocs does include build.xml, examples, tutorial, test-suite can compile,test, and build another distro from this download release build both of the above, and .zip and .tgz 'em - do token replacement on @BUILD_DATE@ in source tree - include a manifest in webmacro.jar that allows you to do this: java -jar webmacro.jar it gives you the version and the build date - added more words to release notes - fixed a javadoc type-o in StaticClassWrapper - fixed html errors in org/webmacro/resource/package.html - documented our external dependencies in lib/readme.txt Index: RELEASE-NOTES =================================================================== RCS file: /cvsroot/webmacro/webmacro/distroot/RELEASE-NOTES,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RELEASE-NOTES 26 Nov 2002 07:05:59 -0000 1.15 --- RELEASE-NOTES 27 Nov 2002 04:18:57 -0000 1.16 *************** *** 37,42 **** whereas previously it did not. ! - fixed parser bug where a missing #end or } would not throw an exception, but would instead consider the ! end of the file as the end of the block. (eric) Changes Prior to this Release --- 37,45 ---- whereas previously it did not. ! - fixed parser bug where a missing #end or } would not throw an exception, but would instead ! consider the end of the file as the end of the block. (eric) ! ! - releases can now be downloaded in binary and/or source form. (eric) ! Changes Prior to this Release |
From: <dr...@us...> - 2002-11-27 04:19:00
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs1:/tmp/cvs-serv7055/src/org/webmacro/engine Modified Files: StaticClassWrapper.java Log Message: preparing for WM1.1b2 release. - made following targets in build.xml usage print words to stdout this is now the default target dist-binary does not include sources, not even webmacro-src.jar dist-source does not include binaries, not even javadocs does include build.xml, examples, tutorial, test-suite can compile,test, and build another distro from this download release build both of the above, and .zip and .tgz 'em - do token replacement on @BUILD_DATE@ in source tree - include a manifest in webmacro.jar that allows you to do this: java -jar webmacro.jar it gives you the version and the build date - added more words to release notes - fixed a javadoc type-o in StaticClassWrapper - fixed html errors in org/webmacro/resource/package.html - documented our external dependencies in lib/readme.txt Index: StaticClassWrapper.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/StaticClassWrapper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StaticClassWrapper.java 11 Nov 2002 19:22:37 -0000 1.3 --- StaticClassWrapper.java 27 Nov 2002 04:18:57 -0000 1.4 *************** *** 26,30 **** * static classes to be placed into the context. * @author keats_kirsch - * @version * @since June 1, 2001 */ --- 26,29 ---- |
From: <dr...@us...> - 2002-11-27 04:19:00
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro In directory sc8-pr-cvs1:/tmp/cvs-serv7055/src/org/webmacro Modified Files: WM.java WebMacro.java Log Message: preparing for WM1.1b2 release. - made following targets in build.xml usage print words to stdout this is now the default target dist-binary does not include sources, not even webmacro-src.jar dist-source does not include binaries, not even javadocs does include build.xml, examples, tutorial, test-suite can compile,test, and build another distro from this download release build both of the above, and .zip and .tgz 'em - do token replacement on @BUILD_DATE@ in source tree - include a manifest in webmacro.jar that allows you to do this: java -jar webmacro.jar it gives you the version and the build date - added more words to release notes - fixed a javadoc type-o in StaticClassWrapper - fixed html errors in org/webmacro/resource/package.html - documented our external dependencies in lib/readme.txt Index: WM.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/WM.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** WM.java 11 Jun 2002 17:43:20 -0000 1.38 --- WM.java 27 Nov 2002 04:18:57 -0000 1.39 *************** *** 366,368 **** --- 366,375 ---- fw.close(); } + + /** + * Print the version, and quit + */ + public static void main (String[] args) { + System.out.println ("WebMacro v" + WebMacro.VERSION + ". Built " + WebMacro.BUILD_DATE); + } } Index: WebMacro.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/WebMacro.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** WebMacro.java 11 Jun 2002 17:43:20 -0000 1.13 --- WebMacro.java 27 Nov 2002 04:18:57 -0000 1.14 *************** *** 45,48 **** --- 45,49 ---- */ public static final String VERSION = "@VERSION@"; + public static final String BUILD_DATE = "@BUILD_DATE@"; /** |
From: <lan...@us...> - 2002-11-26 15:20:18
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv3631 Added Files: ecomm.wm Log Message: test script --- NEW FILE: ecomm.wm --- #comment { ecomm.wm A template to excercise the standard eCommerce macros supplied with WM. } #include as macro "allmacros.wmm" ## set up some useful data for the transaction. ## see the paypalSetup macro for the property name specs. #bean $System = "java.lang.System" scope=static #bean $cust = "org.webmacro.util.SparseProperties" scope=page onNew { #set $cust.firstName = $System.getProperty("user.name") } ## set all the tran properties #bean $tran = "org.webmacro.util.SparseProperties" scope=page onNew { #set $tran.sellersEmailAccount = "su...@op..." #set $tran.itemName = "WebMacro Dues" #set $tran.itemNumber = "9092" #set $tran.amount = "25.00" #set $tran.specialInstructions = "Your Dues Help Support WebMacro Publicity!" } #bean $app = "org.webmacro.util.SparseProperties" scope=page onNew { #set $app.returnURL = "http://www.webmacro.org" #set $app.cancelURL = "http://www.webmacro.org/CancelDues" } ## now invoke the paypal macro with some supporting html so it can be viewed <html> <center> $cust.firstName: <p> Please Pay Your WebMacro Dues Today at PayPal. <br> $tran.amount is due and will keep your WebMacro subscritpion rolling. <p> #paypalSetup($cust, $tran, $app) <hr> #bean $bongoTran = "org.webmacro.util.SparseProperties" scope=page onNew { #set $bongoTran.sellersEmailAccount = "sa...@op..." #set $bongoTran.itemName = "Bongo Annual Subscription" #set $bongoTran.itemNumber = "9102" #set $bongoTran.amount = "72.00" #set $bongoTran.specialInstructions = "Your Dues Help Support WebMacro Publicity!" } #set $app.returnURL = "http://opendoors.com/bongo/paid" #set $app.cancelURL = "http://opendoors.com/bongo/cancel" <p> Also, please consider a one year subscription to bongo. <br> The most amazing graphical interface builder for java! Just $bongoTran.amount USD. #paypalSubscribe($cust, $bongoTran, $app); </center> </html> |
From: <dr...@us...> - 2002-11-26 07:06:01
|
Update of /cvsroot/webmacro/webmacro/distroot In directory sc8-pr-cvs1:/tmp/cvs-serv30801/distroot Modified Files: RELEASE-NOTES Log Message: just keeping up with what changed. Index: RELEASE-NOTES =================================================================== RCS file: /cvsroot/webmacro/webmacro/distroot/RELEASE-NOTES,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RELEASE-NOTES 25 Nov 2002 05:26:29 -0000 1.14 --- RELEASE-NOTES 26 Nov 2002 07:05:59 -0000 1.15 *************** *** 37,40 **** --- 37,43 ---- whereas previously it did not. + - fixed parser bug where a missing #end or } would not throw an exception, but would instead consider the + end of the file as the end of the block. (eric) + Changes Prior to this Release ----------------------------- |
From: <dr...@us...> - 2002-11-26 07:00:39
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv28557/test/unit/org/webmacro/template Modified Files: TestAbuse.java Added Files: nasty_endre.wm Log Message: adding Endre's sample template into the test framework, along with a case in TestAbuse. --- NEW FILE: nasty_endre.wm --- <span class="title-big">[R] Task - $task.Id</span><br /> <br /> <span class="title">Info</span> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td nowrap><span class="key"> Date for next Run </span></td> <td nowrap>#if ($task.Rescheduling) {<span class="value">$task.ImmediateScheduledDate - in $task.MillisToNextRun millis</span>} #else (<span class="novalue">n/a</span>} </td> </tr> <tr> </table> Index: TestAbuse.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestAbuse.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestAbuse.java 21 Aug 2001 09:46:08 -0000 1.5 --- TestAbuse.java 26 Nov 2002 07:00:36 -0000 1.6 *************** *** 134,137 **** --- 134,142 ---- assertStringTemplateEquals(assn + "$foo.substring(1);", "lah;"); } + + public void testNastyEndreTemplate() throws Exception { + String tmpl = templateFileToString("org/webmacro/template/nasty_endre.wm"); + assertStringTemplateThrows(tmpl, org.webmacro.engine.BuildException.class); + } } |
From: <dr...@us...> - 2002-11-26 06:54:48
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/parser In directory sc8-pr-cvs1:/tmp/cvs-serv22076/src/org/webmacro/parser Modified Files: WMParser_impl.java WMParser_impl.jj Log Message: fixing parser bug reported by Endre Stolsvik. A template with a missing #end does not throw during parsing. It does now. Added a few test cases in TestBlocks to check for this. Index: WMParser_impl.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/parser/WMParser_impl.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** WMParser_impl.java 11 Nov 2002 04:53:11 -0000 1.43 --- WMParser_impl.java 26 Nov 2002 06:54:44 -0000 1.44 *************** *** 1878,1881 **** --- 1878,1885 ---- WMContentNoDirective(block); break; + case 0: + jj_consume_token(0); + {if (true) throw new ParseException("Encountered EOF, expecting #end at " + token.beginLine + "." + token.beginColumn);} + break; case RBRACE: case LBRACE: *************** *** 2146,2150 **** } ! final private boolean jj_3R_58() { if (jj_scan_token(OP_GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2150,2154 ---- } ! final private boolean jj_3R_59() { if (jj_scan_token(OP_GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2158,2162 **** } ! final private boolean jj_3R_55() { if (jj_scan_token(OP_EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2162,2166 ---- } ! final private boolean jj_3R_56() { if (jj_scan_token(OP_EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2167,2172 **** Token xsp; xsp = jj_scanpos; - if (jj_3R_55()) { - jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; --- 2171,2174 ---- *************** *** 2179,2183 **** if (jj_3R_60()) { jj_scanpos = xsp; ! if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2181,2187 ---- if (jj_3R_60()) { jj_scanpos = xsp; ! if (jj_3R_61()) { ! jj_scanpos = xsp; ! if (jj_3R_62()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2259,2275 **** } ! final private boolean jj_3R_73() { ! if (jj_3R_77()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_72() { ! if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_71() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2263,2279 ---- } ! final private boolean jj_3R_74() { ! if (jj_3R_78()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_73() { ! if (jj_3R_77()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_72() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2283,2287 **** } ! final private boolean jj_3R_70() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2287,2291 ---- } ! final private boolean jj_3R_71() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2314,2318 **** } ! final private boolean jj_3R_69() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2318,2322 ---- } ! final private boolean jj_3R_70() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2326,2334 **** } ! final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; - if (jj_3R_69()) { - jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; --- 2330,2336 ---- } ! final private boolean jj_3R_63() { Token xsp; xsp = jj_scanpos; if (jj_3R_70()) { jj_scanpos = xsp; *************** *** 2337,2341 **** if (jj_3R_72()) { jj_scanpos = xsp; ! if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2339,2345 ---- if (jj_3R_72()) { jj_scanpos = xsp; ! if (jj_3R_73()) { ! jj_scanpos = xsp; ! if (jj_3R_74()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2352,2356 **** } ! final private boolean jj_3R_54() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2356,2360 ---- } ! final private boolean jj_3R_55() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2358,2362 **** } ! final private boolean jj_3R_53() { if (jj_scan_token(NUMBER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2362,2366 ---- } ! final private boolean jj_3R_54() { if (jj_scan_token(NUMBER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2364,2368 **** } ! final private boolean jj_3R_52() { if (jj_scan_token(OP_NOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2368,2372 ---- } ! final private boolean jj_3R_53() { if (jj_scan_token(OP_NOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2370,2374 **** } ! final private boolean jj_3R_51() { if (jj_scan_token(UNDEFINED)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2374,2378 ---- } ! final private boolean jj_3R_52() { if (jj_scan_token(UNDEFINED)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2376,2380 **** } ! final private boolean jj_3R_50() { if (jj_scan_token(FALSE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2380,2384 ---- } ! final private boolean jj_3R_51() { if (jj_scan_token(FALSE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2382,2386 **** } ! final private boolean jj_3R_49() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2386,2390 ---- } ! final private boolean jj_3R_50() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2388,2392 **** } ! final private boolean jj_3R_48() { if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2392,2396 ---- } ! final private boolean jj_3R_49() { if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2394,2405 **** } ! final private boolean jj_3R_47() { ! if (jj_3R_68()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_46() { ! if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; --- 2398,2409 ---- } ! final private boolean jj_3R_48() { ! if (jj_3R_69()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_47() { ! if (jj_3R_68()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; *************** *** 2421,2425 **** } ! final private boolean jj_3R_45() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2425,2429 ---- } ! final private boolean jj_3R_46() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2427,2437 **** } ! final private boolean jj_3R_44() { ! if (jj_3R_66()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_79() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2431,2441 ---- } ! final private boolean jj_3R_45() { ! if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_80() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2442,2447 **** Token xsp; xsp = jj_scanpos; - if (jj_3R_44()) { - jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; --- 2446,2449 ---- *************** *** 2462,2466 **** if (jj_3R_53()) { jj_scanpos = xsp; ! if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2464,2470 ---- if (jj_3R_53()) { jj_scanpos = xsp; ! if (jj_3R_54()) { ! jj_scanpos = xsp; ! if (jj_3R_55()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2477,2492 **** } ! final private boolean jj_3R_78() { ! if (jj_3R_66()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; ! if (jj_3R_78()) { jj_scanpos = xsp; ! if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2481,2496 ---- } ! final private boolean jj_3R_79() { ! if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_78() { Token xsp; xsp = jj_scanpos; ! if (jj_3R_79()) { jj_scanpos = xsp; ! if (jj_3R_80()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2500,2504 **** } ! final private boolean jj_3R_76() { if (jj_scan_token(POUNDPOUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2504,2508 ---- } ! final private boolean jj_3R_77() { if (jj_scan_token(POUNDPOUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2531,2535 **** } ! final private boolean jj_3R_68() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2535,2539 ---- } ! final private boolean jj_3R_69() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2537,2541 **** } ! final private boolean jj_3R_65() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2541,2545 ---- } ! final private boolean jj_3R_66() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2628,2632 **** } ! final private boolean jj_3R_75() { if (jj_scan_token(SQUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2632,2636 ---- } ! final private boolean jj_3R_76() { if (jj_scan_token(SQUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2640,2644 **** } ! final private boolean jj_3R_74() { if (jj_scan_token(QUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2644,2648 ---- } ! final private boolean jj_3R_75() { if (jj_scan_token(QUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2646,2655 **** } ! final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; ! if (jj_3R_74()) { jj_scanpos = xsp; ! if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2650,2659 ---- } ! final private boolean jj_3R_68() { Token xsp; xsp = jj_scanpos; ! if (jj_3R_75()) { jj_scanpos = xsp; ! if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2672,2676 **** } ! final private boolean jj_3R_61() { if (jj_scan_token(OP_LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2676,2680 ---- } ! final private boolean jj_3R_62() { if (jj_scan_token(OP_LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2678,2682 **** } ! final private boolean jj_3R_64() { if (jj_scan_token(RBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2682,2686 ---- } ! final private boolean jj_3R_65() { if (jj_scan_token(RBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2708,2712 **** } ! final private boolean jj_3R_60() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2712,2716 ---- } ! final private boolean jj_3R_61() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2714,2741 **** } ! final private boolean jj_3R_57() { ! if (jj_scan_token(OP_NE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_43() { ! if (jj_3R_65()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_63() { ! if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; ! if (jj_3R_63()) { jj_scanpos = xsp; ! if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2718,2745 ---- } ! final private boolean jj_3R_64() { ! if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_58() { ! if (jj_scan_token(OP_NE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_44() { ! if (jj_3R_66()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } ! final private boolean jj_3R_43() { Token xsp; xsp = jj_scanpos; ! if (jj_3R_64()) { jj_scanpos = xsp; ! if (jj_3R_65()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2743,2746 **** --- 2747,2756 ---- } + final private boolean jj_3R_42() { + if (jj_scan_token(0)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + final private boolean jj_3_21() { Token xsp; *************** *** 2750,2765 **** if (jj_3R_42()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; ! if (!jj_semLA || jj_3R_43()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } final private boolean jj_3R_41() { ! if (jj_3R_62()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; --- 2760,2778 ---- if (jj_3R_42()) { jj_scanpos = xsp; + if (jj_3R_43()) { + jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; ! if (!jj_semLA || jj_3R_44()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } final private boolean jj_3R_41() { ! if (jj_3R_63()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; *************** *** 2793,2797 **** } ! final private boolean jj_3R_59() { if (jj_scan_token(OP_GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2806,2810 ---- } ! final private boolean jj_3R_60() { if (jj_scan_token(OP_GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2813,2817 **** } ! final private boolean jj_3R_56() { if (jj_scan_token(OP_SET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2826,2830 ---- } ! final private boolean jj_3R_57() { if (jj_scan_token(OP_SET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2825,2829 **** } ! final private boolean jj_3R_66() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; --- 2838,2842 ---- } ! final private boolean jj_3R_67() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; *************** *** 2848,2852 **** private int jj_gen; final private int[] jj_la1 = new int[94]; ! final private int[] jj_la1_0 = {0x40000000,0xc0000000,0x40000000,0x80000000,0x40000000,0x80000000,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x0,0x100000,0x0,0x700000,0x600000,0x700000,0x600000,0x3000000,0x3100000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x7f100000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x40100000,0x0,0x0,0x40000000,0x40000000,0x40000000,0x3f100000,0x40000000,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000,0x100000,0xe20800,0x620800,0xd20800,0xf20800,0xf26800,0x6000,0xf26800,0x4000,0xf29800,0x9000,0xf29800,0xf2f800,0xf26800,0x6000,0xf26800,0x4000,0x9000,0x729800,0x2000,0xf2f800,0xf000,0xf2f800,}; final private int[] jj_la1_1 = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x1,0x0,0x200001,0x1000000,0x1000000,0x2000000,0x2000000,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x442005,0x0,0x0,0x80000,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x442005,0x0,0xc000,0x0,0x0,0x3000,0x0,0xfe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; final private JJCalls[] jj_2_rtns = new JJCalls[23]; --- 2861,2865 ---- private int jj_gen; final private int[] jj_la1 = new int[94]; ! final private int[] jj_la1_0 = {0x40000000,0xc0000000,0x40000000,0x80000000,0x40000000,0x80000000,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x0,0x100000,0x0,0x700000,0x600000,0x700000,0x600000,0x3000000,0x3100000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x7f100000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x40100000,0x0,0x0,0x40000000,0x40000000,0x40000000,0x3f100000,0x40000000,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000,0x100000,0xe20800,0x620800,0xd20800,0xf20800,0xf26800,0x6000,0xf26800,0x4000,0xf29800,0x9000,0xf29800,0xf2f800,0xf26800,0x6000,0xf26800,0x4000,0x9000,0x729801,0x2000,0xf2f800,0xf000,0xf2f800,}; final private int[] jj_la1_1 = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x1,0x0,0x200001,0x1000000,0x1000000,0x2000000,0x2000000,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x442005,0x0,0x0,0x80000,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x442005,0x0,0xc000,0x0,0x0,0x3000,0x0,0xfe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; final private JJCalls[] jj_2_rtns = new JJCalls[23]; Index: WMParser_impl.jj =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/parser/WMParser_impl.jj,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** WMParser_impl.jj 11 Nov 2002 04:53:12 -0000 1.42 --- WMParser_impl.jj 26 Nov 2002 06:54:45 -0000 1.43 *************** *** 727,737 **** // Used by VariableReference; shouldn't be used outside it Object ObjectRoot() : { ! Token t; ListBuilder argList; Object element; } { ! ( ! LOOKAHEAD(<WORD><LPAREN>) t=<WORD> <LPAREN> argList=ArgList() <RPAREN> { element = new FunctionCallBuilder((String) t.image, argList); } --- 727,737 ---- // Used by VariableReference; shouldn't be used outside it Object ObjectRoot() : { ! Token t; ListBuilder argList; Object element; } { ! ( ! LOOKAHEAD(<WORD><LPAREN>) t=<WORD> <LPAREN> argList=ArgList() <RPAREN> { element = new FunctionCallBuilder((String) t.image, argList); } *************** *** 1150,1153 **** --- 1150,1154 ---- | ( [ <BEGIN> EatWsNlOrSpace(block) ] ( WMContentNoDirective(block) + | (<EOF>) { throw new ParseException("Encountered EOF, expecting #end at " + token.beginLine + "." + token.beginColumn); } | (t=<LBRACE> | t=<RBRACE>) { block.addElement(t.image); } | LOOKAHEAD(<POUND>, { lookahead_not_breaking_subd() }) |
From: <dr...@us...> - 2002-11-26 06:54:48
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv22076/test/unit/org/webmacro/template Modified Files: TestBlocks.java Log Message: fixing parser bug reported by Endre Stolsvik. A template with a missing #end does not throw during parsing. It does now. Added a few test cases in TestBlocks to check for this. Index: TestBlocks.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestBlocks.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestBlocks.java 8 Jul 2001 00:36:35 -0000 1.6 --- TestBlocks.java 26 Nov 2002 06:54:45 -0000 1.7 *************** *** 26,30 **** } - public void testBraces () throws Exception { String tmpl = "#if (true) {pass} #else {fail}"; --- 26,29 ---- *************** *** 91,94 **** --- 90,106 ---- String output = executeStringTemplate (tmpl); assert (output.indexOf ("should not be here") == -1); + } + + public void testNoEND1 () throws Exception { + String tmpl = "#if(true) pass"; + assertStringTemplateThrows(tmpl, org.webmacro.engine.BuildException.class); + } + public void testNoEND2 () throws Exception { + String tmpl = "#if(true)#begin pass"; + assertStringTemplateThrows(tmpl, org.webmacro.engine.BuildException.class); + } + public void testNoLBRACE () throws Exception { + String tmpl = "#if(true){ pass"; + assertStringTemplateThrows(tmpl, org.webmacro.engine.BuildException.class); } } |
From: <lan...@us...> - 2002-11-25 23:55:28
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/macrosandbox In directory sc8-pr-cvs1:/tmp/cvs-serv18265/test/unit/org/webmacro/template/macrosandbox Added Files: all.wmm basics.wmm Log Message: placed macrosandbox/ underneath test folder allowing for a test model which follows the macros/ principals in the distribution. macrosandbox/ in the test tree is the place to test macros before placing them in the macro/ distribution. --- NEW FILE: all.wmm --- #comment { sandbox/all.wmm Includes all wm macros in the sandbox directory for testing purposes. add at will individual macro files beneath basics.wmm } #include as macro "org/webmacro/template/macrosandbox/basics.wmm" --- NEW FILE: basics.wmm --- #comment { sandbox/basics.wmm Some elementary macros. } ## hello(arg) A hello message #macro hello($who) { Hello, $who } ## setVar(arg1, arg2) make arg1 reference arg2 #macro setVar($a, $b) { #set $a = $b } ## showVar(arg) shows the argument if it is not null #macro showVar($a) { #if ($a) { $a} } |
From: <lan...@us...> - 2002-11-25 23:55:28
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv18265/test/unit/org/webmacro/template Modified Files: TestParseInclude.java Log Message: placed macrosandbox/ underneath test folder allowing for a test model which follows the macros/ principals in the distribution. macrosandbox/ in the test tree is the place to test macros before placing them in the macro/ distribution. Index: TestParseInclude.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestParseInclude.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestParseInclude.java 17 Nov 2002 16:26:22 -0000 1.6 --- TestParseInclude.java 25 Nov 2002 23:55:25 -0000 1.7 *************** *** 86,100 **** public void testBasicMacros() throws Exception { // now execute each one: ! assertStringTemplateMatches( "#include as macro \"allmacros.wmm\"\n" + "#hello(\"Brian Goetz & Eric Ridge\")", "Hello, Brian Goetz & Eric Ridge"); ! assertStringTemplateMatches( "#include as macro \"allmacros.wmm\"\n" + "#showVar($nullVar)", ""); ! assertStringTemplateMatches( "#include as macro \"allmacros.wmm\"\n" + "#setVar($foo, \"brian\")\n" + "#showVar($foo)", "brian"); } public void testEcommMacros() throws Exception { // execute the pay pal eCommerce test case and store the output --- 86,101 ---- public void testBasicMacros() throws Exception { // now execute each one: ! assertStringTemplateMatches( "#include as macro \"org/webmacro/template/macrosandbox/all.wmm\"\n" + "#hello(\"Brian Goetz & Eric Ridge\")", "Hello, Brian Goetz & Eric Ridge"); ! assertStringTemplateMatches( "#include as macro \"org/webmacro/template/macrosandbox/all.wmm\"\n" + "#showVar($nullVar)", ""); ! assertStringTemplateMatches( "#include as macro \"org/webmacro/template/macrosandbox/all.wmm\"\n" + "#setVar($foo, \"brian\")\n" + "#showVar($foo)", "brian"); } + /** executes out of the standard macro/ distribution. */ public void testEcommMacros() throws Exception { // execute the pay pal eCommerce test case and store the output |
From: <lan...@us...> - 2002-11-25 23:55:28
|
Update of /cvsroot/webmacro/webmacro/macros In directory sc8-pr-cvs1:/tmp/cvs-serv18265/macros Modified Files: allmacros.wmm Log Message: placed macrosandbox/ underneath test folder allowing for a test model which follows the macros/ principals in the distribution. macrosandbox/ in the test tree is the place to test macros before placing them in the macro/ distribution. Index: allmacros.wmm =================================================================== RCS file: /cvsroot/webmacro/webmacro/macros/allmacros.wmm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** allmacros.wmm 17 Nov 2002 16:26:21 -0000 1.1 --- allmacros.wmm 25 Nov 2002 23:55:25 -0000 1.2 *************** *** 3,6 **** Includes all wm macros in all subdirectories where all.wmm is defined. } - #include as macro "sandbox/all.wmm" #include as macro "ecomm/all.wmm" --- 3,5 ---- |
From: <lan...@us...> - 2002-11-25 23:52:37
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/macrosandbox In directory sc8-pr-cvs1:/tmp/cvs-serv17871/macrosandbox Log Message: Directory /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/macrosandbox added to the repository |
From: <lan...@us...> - 2002-11-25 23:23:09
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs1:/tmp/cvs-serv31907/src/org/webmacro/util Modified Files: WMEval.java Log Message: WMEval updated for better constructors and eliminate deprecated methods. Index: WMEval.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/WMEval.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WMEval.java 15 Nov 2002 00:24:13 -0000 1.10 --- WMEval.java 25 Nov 2002 23:23:06 -0000 1.11 *************** *** 25,29 **** import java.io.*; import javax.servlet.http.*; ! import javax.servlet.ServletException; import org.webmacro.*; import org.webmacro.engine.StreamTemplate; --- 25,29 ---- import java.io.*; import javax.servlet.http.*; ! import javax.servlet.*; import org.webmacro.*; import org.webmacro.engine.StreamTemplate; *************** *** 76,85 **** //-------constructor(s)----- /** ! * The constructor which creates the environment for evaluating a rule. */ ! public WMEval(HttpServlet servlet) { // Build a web macro environment for rule execution. try { ! wm = new WM(servlet); context = wm.getContext(); } --- 76,86 ---- //-------constructor(s)----- /** ! * The constructor for WebMacro decorator in a servlet context. */ ! public WMEval(Servlet servlet) { // Build a web macro environment for rule execution. try { ! if (servlet == null) wm = new WM(); ! else wm = new WM(servlet); context = wm.getContext(); } *************** *** 171,181 **** /** - * @deprecated - */ - public void assert() throws Exception { - eval(context, rule, out, "UTF8"); - } - - /** * Evaluates the context of this instance and the instance's * current template and current output stream using UTF8. --- 172,175 ---- *************** *** 186,195 **** } - /** - * @deprecated - */ - public void assert(Context context) throws Exception { - eval(context, rule, out, "UTF8"); - } /** --- 180,183 ---- *************** *** 202,216 **** /** - * @deprecated - */ - public void assert(Context context, Template rule, OutputStream out, String encoding) throws Exception { - FastWriter w; - w = context.getBroker().getFastWriter(out, encoding); - context.put("FastWriter", w); // allow template writers to access the output stream! - rule.write(w, context); - w.flush(); - } - - /** * Evaluate the supplied context and template to the provided output. * @ rule the template provided. --- 190,193 ---- *************** *** 244,247 **** --- 221,234 ---- /** + * Evaluates the string template against the current context + * and returns the value. + * @param templateName The name of the template. + * @return The output from the evaluated template + */ + public String eval(String templateName) throws Exception { + return eval(templateName, null); + } + + /** * Evaluates the string template against a new context and writes * it to the http Response output stream using the proper encoding. *************** *** 276,287 **** throw new ServletException(e.toString()); } - } - - /** - * Evaluate the supplied context and template and return the result as a - * as a string. - */ - public String assert(Context context, Template rule) throws Exception { - return rule.evaluate(context).toString(); } --- 263,266 ---- |
From: <dr...@us...> - 2002-11-25 05:26:32
|
Update of /cvsroot/webmacro/webmacro/distroot In directory sc8-pr-cvs1:/tmp/cvs-serv1091/distroot Modified Files: RELEASE-NOTES Log Message: update release notes to reflect changes to #if Index: RELEASE-NOTES =================================================================== RCS file: /cvsroot/webmacro/webmacro/distroot/RELEASE-NOTES,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RELEASE-NOTES 16 Nov 2002 20:07:43 -0000 1.13 --- RELEASE-NOTES 25 Nov 2002 05:26:29 -0000 1.14 *************** *** 27,35 **** - WMServlet.doGet() is no longer "final" (eric) ! - logging API now accepts "Throwable"s instead of "Exception"s. (eric) This one might require you to recompile your classes. - the syntax for #default has changed to: #default $x = 3 Changes Prior to this Release --- 27,39 ---- - WMServlet.doGet() is no longer "final" (eric) ! - logging API now accepts Throwable instead of Exception. (eric) This one might require you to recompile your classes. - the syntax for #default has changed to: #default $x = 3 + + - #if now honors the exception handling rules of the active EvaluationExceptionHandler. (eric) + For example, #if($foo.noSuchMethod()) now throws exceptions when using Default and CrankyEEH + whereas previously it did not. Changes Prior to this Release |
From: <dr...@us...> - 2002-11-25 05:21:36
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv29341/test/unit/org/webmacro/template Modified Files: TestIf.java Log Message: Fixing bug reported by Endre Stolsvik: CrankyEEH doesn't rethrow some exceptions during #if evaluation. #if, thanks to o.wm.e.Expression, was treating all evaluation exceptions as 'false'. This behavior has been around for a long time, and I assume long before EEH came to be. So now, when Expression encounters an exception, it's because the active EEH wants it rethrown. It no longer converts the exceptions into 'false' values. All existing tests pass. 2 new tests added to TestIf.java to make sure that #if($foo.NoSuchMethod()) really does throw now. Index: TestIf.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestIf.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestIf.java 4 Jun 2001 11:26:16 -0000 1.2 --- TestIf.java 25 Nov 2002 05:21:33 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- import org.webmacro.engine.StringTemplate; import org.webmacro.engine.DefaultEvaluationExceptionHandler; + import org.webmacro.engine.CrankyEvaluationExceptionHandler; import junit.framework.*; *************** *** 14,17 **** --- 15,19 ---- public TestIf (String name) { super (name); + System.setProperty("org.webmacro.LogLevel", "DEBUG"); } *************** *** 34,37 **** --- 36,47 ---- assertStringTemplateEquals("#if (!($a==$b)) #begin fail #end #else #begin pass #end", "pass"); assertStringTemplateEquals("#if ($a!=$b) #begin fail #end #else #begin pass #end", "pass"); + } + + public void test3() throws Exception { + _context.setEvaluationExceptionHandler(new CrankyEvaluationExceptionHandler(_context.getBroker())); + assertStringTemplateThrows("#if ($foo.size() == 1){fail}#else{pass}", PropertyException.NoSuchMethodException.class); + + _context.setEvaluationExceptionHandler(new DefaultEvaluationExceptionHandler(_context.getBroker())); + assertStringTemplateThrows("#if ($foo.size() == 1){fail}#else{pass}", PropertyException.NoSuchMethodException.class); } |
From: <dr...@us...> - 2002-11-25 05:21:35
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs1:/tmp/cvs-serv29341/src/org/webmacro/engine Modified Files: Expression.java Log Message: Fixing bug reported by Endre Stolsvik: CrankyEEH doesn't rethrow some exceptions during #if evaluation. #if, thanks to o.wm.e.Expression, was treating all evaluation exceptions as 'false'. This behavior has been around for a long time, and I assume long before EEH came to be. So now, when Expression encounters an exception, it's because the active EEH wants it rethrown. It no longer converts the exceptions into 'false' values. All existing tests pass. 2 new tests added to TestIf.java to make sure that #if($foo.NoSuchMethod()) really does throw now. Index: Expression.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/Expression.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Expression.java 11 Jun 2002 17:43:21 -0000 1.10 --- Expression.java 25 Nov 2002 05:21:33 -0000 1.11 *************** *** 90,105 **** Object l, r; ! try { ! l = (_l instanceof Macro) ? ((Macro) _l).evaluate(context) : _l; ! } ! catch (Exception e) { ! l = null; ! } ! try { ! r = (_r instanceof Macro) ? ((Macro) _r).evaluate(context) : _r; ! } ! catch (Exception e) { ! r = null; ! } return operate(l, r); --- 90,95 ---- Object l, r; ! l = (_l instanceof Macro) ? ((Macro) _l).evaluate(context) : _l; ! r = (_r instanceof Macro) ? ((Macro) _r).evaluate(context) : _r; return operate(l, r); *************** *** 150,167 **** Object l, r; ! try { ! l = (_l instanceof Macro) ? ((Macro) _l).evaluate(context) : _l; ! } ! catch (Exception e) { ! l = null; ! } if (!isTrue(l)) return FALSE; ! try { ! r = (_r instanceof Macro) ? ((Macro) _r).evaluate(context) : _r; ! } ! catch (Exception e) { ! r = null; ! } if (!isTrue(r)) return FALSE; --- 140,148 ---- Object l, r; ! l = (_l instanceof Macro) ? ((Macro) _l).evaluate(context) : _l; if (!isTrue(l)) return FALSE; ! ! r = (_r instanceof Macro) ? ((Macro) _r).evaluate(context) : _r; if (!isTrue(r)) return FALSE; *************** *** 188,205 **** Object l, r; ! try { ! l = (_l instanceof Macro) ? ((Macro) _l).evaluate(context) : _l; ! } ! catch (Exception e) { ! l = null; ! } if (isTrue(l)) return TRUE; ! try { ! r = (_r instanceof Macro) ? ((Macro) _r).evaluate(context) : _r; ! } ! catch (Exception e) { ! r = null; ! } if (isTrue(r)) return TRUE; --- 169,177 ---- Object l, r; ! l = (_l instanceof Macro) ? ((Macro) _l).evaluate(context) : _l; if (isTrue(l)) return TRUE; ! ! r = (_r instanceof Macro) ? ((Macro) _r).evaluate(context) : _r; if (isTrue(r)) return TRUE; |
From: <dr...@us...> - 2002-11-25 05:21:35
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/directive In directory sc8-pr-cvs1:/tmp/cvs-serv29341/src/org/webmacro/directive Modified Files: IfDirective.java Log Message: Fixing bug reported by Endre Stolsvik: CrankyEEH doesn't rethrow some exceptions during #if evaluation. #if, thanks to o.wm.e.Expression, was treating all evaluation exceptions as 'false'. This behavior has been around for a long time, and I assume long before EEH came to be. So now, when Expression encounters an exception, it's because the active EEH wants it rethrown. It no longer converts the exceptions into 'false' values. All existing tests pass. 2 new tests added to TestIf.java to make sure that #if($foo.NoSuchMethod()) really does throw now. Index: IfDirective.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/directive/IfDirective.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** IfDirective.java 11 Nov 2002 04:26:12 -0000 1.14 --- IfDirective.java 25 Nov 2002 05:21:32 -0000 1.15 *************** *** 188,198 **** boolean b = false; ! try { ! b = Expression.isTrue(conditions[i].evaluate(context)); ! } ! catch (Exception e) { ! String warning = "#if: Error evaluating condition: " + e; ! writeWarning(warning, context, out); ! } if (b) { blocks[i].write(out, context); --- 188,192 ---- boolean b = false; ! b = Expression.isTrue(conditions[i].evaluate(context)); if (b) { blocks[i].write(out, context); |
From: <dr...@us...> - 2002-11-25 05:12:36
|
Update of /cvsroot/webmacro/webmacro/test In directory sc8-pr-cvs1:/tmp/cvs-serv24856/test Modified Files: build.xml Log Message: fix a type-o Index: build.xml =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/build.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** build.xml 17 Nov 2002 16:26:22 -0000 1.6 --- build.xml 25 Nov 2002 05:12:32 -0000 1.7 *************** *** 44,48 **** <target name="unit" depends="unit-compile"> ! <!- <echo message="${java.class.path}"/> --> <junit printsummary="yes" haltonfailure="no" > <classpath refid="unit.class.path"/> --- 44,48 ---- <target name="unit" depends="unit-compile"> ! <!-- <echo message="${java.class.path}"/> --> <junit printsummary="yes" haltonfailure="no" > <classpath refid="unit.class.path"/> |
From: <dr...@us...> - 2002-11-22 05:37:27
|
Update of /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki In directory sc8-pr-cvs1:/tmp/cvs-serv19113/src/org/tcdi/opensource/wiki Modified Files: WikiUtil.java Log Message: bug fix for character encoding differences between Linux and (at least) OS X. Default to Latin 1 (linux on x86). Index: WikiUtil.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/WikiUtil.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** WikiUtil.java 30 Sep 2001 08:28:28 -0000 1.1.1.1 --- WikiUtil.java 22 Nov 2002 05:37:23 -0000 1.2 *************** *** 43,46 **** --- 43,47 ---- import java.security.*; import java.util.*; + import java.io.UnsupportedEncodingException; /** *************** *** 174,179 **** * that is safe to store as a cookie. */ ! private static char[] makeCookieSafe(byte[] bytes) { ! char[] chars = new String(bytes).toCharArray(); int BOT = 48; int TOP = 125; --- 175,180 ---- * that is safe to store as a cookie. */ ! private static char[] makeCookieSafe(byte[] bytes) throws UnsupportedEncodingException { ! char[] chars = new String(bytes, "ISO-8859-1").toCharArray(); int BOT = 48; int TOP = 125; |
From: <dr...@us...> - 2002-11-22 04:48:09
|
Update of /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/servlet In directory sc8-pr-cvs1:/tmp/cvs-serv7760/src/org/tcdi/opensource/wiki/servlet Modified Files: RecentChangesAction.java Log Message: a fix to the RecentChangesAction to skip over pages that exist, but really don't. This happened b/c I was a doofus and manually created a directory in the VLH-WikiPages store on www.webmacro.org to hold onto some pages I manually deleted... which broke RecentChanges For some reason, VLH seems to be picking that directory up as a serialized file. Should probably fix VLH instead. RecentChangesAction.java Index: RecentChangesAction.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/servlet/RecentChangesAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RecentChangesAction.java 5 Jan 2002 20:27:29 -0000 1.2 --- RecentChangesAction.java 22 Nov 2002 04:48:06 -0000 1.3 *************** *** 100,103 **** --- 100,111 ---- for (int x=0; x<pageNames.length; x++) { WikiPage p = wiki.getPage (pageNames[x]); + if (p == null) { + // HACK: This should never happen, but it does. + // it seems VLH thinks subdirectories inside its store directory + // are actually part of its hash. Probably need to fix VLH + wc.getLog("RecentChanges").error ("WikiPage for " + pageNames[x] + " not found in wiki system. Skipping"); + continue; + } + if (p.getDateLastModifiedAsLong() >= cutoff) pages.add (p); |
From: <lan...@us...> - 2002-11-17 16:26:26
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory usw-pr-cvs1:/tmp/cvs-serv32240/test/unit/org/webmacro/template Modified Files: TemplateTestCase.java TestParseInclude.java macros.wm Log Message: 1.1b2 updates, additions, documentation Index: TemplateTestCase.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TemplateTestCase.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TemplateTestCase.java 11 Nov 2002 04:55:33 -0000 1.10 --- TemplateTestCase.java 17 Nov 2002 16:26:22 -0000 1.11 *************** *** 107,110 **** --- 107,116 ---- return output; } + + public void store(String fileName, String value) throws Exception { + Writer out = new FileWriter(fileName); + out.write(value); + out.close(); + } Index: TestParseInclude.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestParseInclude.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestParseInclude.java 1 Apr 2002 04:31:41 -0000 1.5 --- TestParseInclude.java 17 Nov 2002 16:26:22 -0000 1.6 *************** *** 83,86 **** --- 83,107 ---- } + + public void testBasicMacros() throws Exception { + // now execute each one: + assertStringTemplateMatches( "#include as macro \"allmacros.wmm\"\n" + + "#hello(\"Brian Goetz & Eric Ridge\")", "Hello, Brian Goetz & Eric Ridge"); + + assertStringTemplateMatches( "#include as macro \"allmacros.wmm\"\n" + + "#showVar($nullVar)", ""); + + assertStringTemplateMatches( "#include as macro \"allmacros.wmm\"\n" + + "#setVar($foo, \"brian\")\n" + + "#showVar($foo)", "brian"); + } + + public void testEcommMacros() throws Exception { + // execute the pay pal eCommerce test case and store the output + String value = executeFileTemplate("org/webmacro/template/ecomm.wm"); + store(System.getProperty("user.dir") + "/" + "ecomm.html", value); + } + + public static void main (String[] args) throws Exception { Index: macros.wm =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/macros.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** macros.wm 29 Mar 2002 04:08:43 -0000 1.1 --- macros.wm 17 Nov 2002 16:26:22 -0000 1.2 *************** *** 1,4 **** ## This template contains #macro's used by the TestParseInclude test ! #macro foo1() { foo1 --- 1,4 ---- ## This template contains #macro's used by the TestParseInclude test ! ## it also includes the wm macro library #macro foo1() { foo1 |
From: <lan...@us...> - 2002-11-17 16:26:25
|
Update of /cvsroot/webmacro/webmacro/test In directory usw-pr-cvs1:/tmp/cvs-serv32240/test Modified Files: build.xml Log Message: 1.1b2 updates, additions, documentation Index: build.xml =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** build.xml 10 Nov 2002 21:11:27 -0000 1.5 --- build.xml 17 Nov 2002 16:26:22 -0000 1.6 *************** *** 44,47 **** --- 44,48 ---- <target name="unit" depends="unit-compile"> + <!- <echo message="${java.class.path}"/> --> <junit printsummary="yes" haltonfailure="no" > <classpath refid="unit.class.path"/> *************** *** 59,62 **** --- 60,73 ---- <batchtest fork="yes" todir="${unit.reports}"> <fileset dir="${unit.root}" includes="**/TestSyntheticTemplate.java" /> + </batchtest> + </junit> + </target> + + <target name="macros" depends="unit-compile"> + <junit printsummary="yes" haltonfailure="no" > + <classpath refid="unit.class.path"/> + <formatter type="plain" /> + <batchtest fork="yes" todir="${unit.reports}"> + <fileset dir="${unit.root}" includes="**/TestParseInclude.java" /> </batchtest> </junit> |
From: <lan...@us...> - 2002-11-17 16:26:24
|
Update of /cvsroot/webmacro/webmacro/macros/ecomm In directory usw-pr-cvs1:/tmp/cvs-serv32240/macros/ecomm Added Files: all.wmm paypal.wmm Log Message: 1.1b2 updates, additions, documentation --- NEW FILE: all.wmm --- #comment { ecomm/all.wmm Includes all wm macros in the ecomm directory. } #include as macro "ecomm/paypal.wmm" --- NEW FILE: paypal.wmm --- #comment { paypal.wmm Macros to support common web actions for a paypal payment action. } ## paypalSetup(arg1, arg2, arg3) where: ## arg1 corresponds to customer properties with names mapped below ## arg2 corresponds to transaction properties with names mapped below ## arg3 corresponds to application properties with names mapped below ## to the field elements required by pay pal. #macro paypalSetup($custProps, $tranProps, $appProps) { <FORM ACTION="https://www.paypal.com/cgi-bin/webscr" METHOD="POST"> <INPUT TYPE="hidden" NAME="cmd" VALUE="_ext-enter"> <INPUT TYPE="hidden" NAME="redirect_cmd" VALUE="_xclick"> <INPUT TYPE="hidden" NAME="business" VALUE="$tranProps.sellersEmailAccount"> <INPUT TYPE="hidden" NAME="item_name" VALUE="$tranProps.itemName"> <INPUT TYPE="hidden" NAME="item_number" VALUE="$tranProps.itemNumber"> <INPUT TYPE="hidden" NAME="amount" VALUE="$tranProps.amount"> <INPUT TYPE="hidden" NAME="shipping" VALUE="$custProps.shipping"> <INPUT TYPE="hidden" NAME="shipping2" VALUE="$custProps.shipping2"> <INPUT TYPE="hidden" NAME="first_name" VALUE="$custProps.firstName"> <INPUT TYPE="hidden" NAME="last_name" VALUE="$custProps.lastName"> <INPUT TYPE="hidden" NAME="address1" VALUE="$custProps.address1"> <INPUT TYPE="hidden" NAME="address2" VALUE="$custProps.address2"> <INPUT TYPE="hidden" NAME="city" VALUE="$custProps.city"> <INPUT TYPE="hidden" NAME="state" VALUE="$custProps.state"> <INPUT TYPE="hidden" NAME="zip" VALUE="$custProps.zip"> <INPUT TYPE="hidden" NAME="night_phone_a" VALUE="$custProps.nightPhoneA"> <INPUT TYPE="hidden" NAME="night_phone_b" VALUE="$custProps.nightPhoneB"> <INPUT TYPE="hidden" NAME="night_phone_c" VALUE="$custProps.nightPhoneB"> <INPUT TYPE="hidden" NAME="day_phone_a" VALUE="$custProps.dayPhoneA"> <INPUT TYPE="hidden" NAME="day_phone_b" VALUE="$custProps.dayPhoneB"> <INPUT TYPE="hidden" NAME="day_phone_c" VALUE="$custProps.dayPhoneB"> <input type="hidden" name="return" value="$appProps.returnURL"> <input type="hidden" name="cancel_return" value="$appProps.cancelURL"> <input type="hidden" name="cn" value="$tranProps.specialInstructions"> <input type="hidden" name="currency_code" value="USD"> <INPUT TYPE="image" SRC="http://images.paypal.com/images/x-click-but01.gif" BORDER="0" NAME="submit" ALT="Make payments with PayPal - it's fast, free and secure!"> } ## paypalSubscribe()(arg1, arg2, arg3) where: ## arg1 corresponds to customer properties with names mapped below ## arg2 corresponds to transaction properties with names mapped below ## arg3 corresponds to application properties with names mapped below ## to the field elements required by pay pal. #macro paypalSubscribe($custProps, $tranProps, $appProps) { <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <INPUT TYPE="hidden" NAME="business" VALUE="$tranProps.sellersEmailAccount"> <INPUT TYPE="hidden" NAME="item_name" VALUE="$tranProps.itemName"> <INPUT TYPE="hidden" NAME="item_number" VALUE="$tranProps.itemNumber"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypal.com/images/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> <input type="hidden" name="a1" value="0.00"> <input type="hidden" name="p1" value="1"> <input type="hidden" name="t1" value="M"> <input type="hidden" name="a3" value="$tranProps.amount"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="Y"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> <INPUT TYPE="hidden" NAME="shipping" VALUE="$custProps.shipping"> <INPUT TYPE="hidden" NAME="shipping2" VALUE="$custProps.shipping2"> <INPUT TYPE="hidden" NAME="first_name" VALUE="$custProps.firstName"> <INPUT TYPE="hidden" NAME="last_name" VALUE="$custProps.lastName"> <INPUT TYPE="hidden" NAME="address1" VALUE="$custProps.address1"> <INPUT TYPE="hidden" NAME="address2" VALUE="$custProps.address2"> <INPUT TYPE="hidden" NAME="city" VALUE="$custProps.city"> <INPUT TYPE="hidden" NAME="state" VALUE="$custProps.state"> <INPUT TYPE="hidden" NAME="zip" VALUE="$custProps.zip"> <INPUT TYPE="hidden" NAME="night_phone_a" VALUE="$custProps.nightPhoneA"> <INPUT TYPE="hidden" NAME="night_phone_b" VALUE="$custProps.nightPhoneB"> <INPUT TYPE="hidden" NAME="night_phone_c" VALUE="$custProps.nightPhoneB"> <INPUT TYPE="hidden" NAME="day_phone_a" VALUE="$custProps.dayPhoneA"> <INPUT TYPE="hidden" NAME="day_phone_b" VALUE="$custProps.dayPhoneB"> <INPUT TYPE="hidden" NAME="day_phone_c" VALUE="$custProps.dayPhoneB"> <input type="hidden" name="return" value="$appProps.returnURL"> <input type="hidden" name="cancel_return" value="$appProps.cancelURL"> <input type="hidden" name="cn" value="$tranProps.specialInstructions"> </form> } ## paypalSubscribe()(arg1, arg2, arg3) where: ## arg1 corresponds to customer properties with names mapped below ## arg2 corresponds to transaction properties with names mapped below ## arg3 corresponds to application properties with names mapped below ## to the field elements required by pay pal. #macro paypalSubscribeEmail($custProps, $tranProps, $appProps) { https://www.paypal.com/subscriptions/business=lane%40san.rr.com&item_name=Bongo+Annual+Subscription&item_number=9252-1&no_note=1¤cy_code=USD&a1=0.00&p1=1&t1=M&a3=1.00&p3=1&t3=Y&src=1&sra=1 } |