User: rinkrank
Date: 02/03/16 10:22:16
Modified: core/src/xdoclet/template Tag: XJAVADOC_REFACTORING
TemplateEngine.java TemplateParser.java
TemplateTagHandler.java
Log:
xjavadoc refactoring. doesn't work yet, but it compiles
Revision Changes Path
No revision
No revision
1.19.2.1 +5 -15 xdoclet/core/src/xdoclet/template/TemplateEngine.java
Index: TemplateEngine.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/template/TemplateEngine.java,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -w -r1.19 -r1.19.2.1
--- TemplateEngine.java 9 Mar 2002 23:39:32 -0000 1.19
+++ TemplateEngine.java 16 Mar 2002 18:22:16 -0000 1.19.2.1
@@ -31,7 +31,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @author Dmitri Colebatch ([EMAIL PROTECTED])
* @created July 14, 2001
- * @version $Revision: 1.19 $
+ * @version $Revision: 1.19.2.1 $
* @see #generate(java.lang.String)
*/
public class TemplateEngine
@@ -59,8 +59,6 @@
*/
private transient URL templateURL = null;
- private transient TemplateContext context = null;
-
/**
* Where we are in the template file. Used for reporting errors.
*/
@@ -85,25 +83,18 @@
/**
* Initialize the Template Engine. Reads the XDoclet properties file, and loads
- * any Tag handler classes specified.
+ * any XTag handler classes specified.
*
- * @param context The context for the build.
* @exception TemplateException Description of Exception
*/
- public TemplateEngine( TemplateContext context ) throws TemplateException
+ public TemplateEngine( ) throws TemplateException
{
Category cat = Log.getCategory( TemplateEngine.class, "TemplateEngine"
);
-
try
{
- this.context = context;
-
Properties tag_handler_mappings = new Properties();
-
tag_handler_mappings.load( getClass().getResourceAsStream(
TAG_MAPPINGS_FILE ) );
-
Iterator tag_handler_mapping_names =
tag_handler_mappings.keySet().iterator();
-
while( tag_handler_mapping_names.hasNext() )
{
String prefix = ( String )
tag_handler_mapping_names.next();
@@ -116,7 +107,7 @@
tag_handler.setEngine( this );
if( this instanceof TemplateParser )
tag_handler.setParser( (
TemplateParser ) this );
- tag_handler.setContext( context );
+ //tag_handler.setContext( context );
tagMappings.put( prefix, tag_handler );
}
@@ -283,7 +274,6 @@
tag_handler.setEngine( this );
if( this instanceof TemplateParser )
tag_handler.setParser( ( TemplateParser ) this );
- tag_handler.setContext( context );
tagMappings.put( prefix, tag_handler );
}
@@ -302,7 +292,7 @@
* the second Properties object, which will be filled either by nothing or by
* all the given attributes. Content tag implementation methods have no
* parameter but should return a String containing the result that should be
- * printed to the generated file. Tag implementation methods should define and
+ * printed to the generated file. XTag implementation methods should define and
* throw org.apache.tools.ant.TemplateException if any serious error occurs.
*
* @param template Description of Parameter
1.4.2.1 +4 -5 xdoclet/core/src/xdoclet/template/TemplateParser.java
Index: TemplateParser.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/template/TemplateParser.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -w -r1.4 -r1.4.2.1
--- TemplateParser.java 22 Feb 2002 16:28:21 -0000 1.4
+++ TemplateParser.java 16 Mar 2002 18:22:16 -0000 1.4.2.1
@@ -21,7 +21,7 @@
*
* @author Vincent Harcq ([EMAIL PROTECTED])
* @created December 27, 2001
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.4.2.1 $
*/
public class TemplateParser
extends TemplateEngine
@@ -30,14 +30,13 @@
/**
* Initialize the Template Engine. Reads the XDoclet properties file, and loads
- * any Tag handler classes specified.
+ * any XTag handler classes specified.
*
- * @param context The context for the build.
* @exception TemplateException Description of Exception
*/
- public TemplateParser( TemplateContext context ) throws TemplateException
+ public TemplateParser( ) throws TemplateException
{
- super( context );
+ super( );
mergeFiles = new ArrayList();
output = null;
}
1.4.2.1 +1 -16 xdoclet/core/src/xdoclet/template/TemplateTagHandler.java
Index: TemplateTagHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/template/TemplateTagHandler.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -w -r1.4 -r1.4.2.1
--- TemplateTagHandler.java 7 Feb 2002 19:11:21 -0000 1.4
+++ TemplateTagHandler.java 16 Mar 2002 18:22:16 -0000 1.4.2.1
@@ -8,7 +8,7 @@
/**
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 14, 2001
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.4.2.1 $
*/
public class TemplateTagHandler
{
@@ -22,11 +22,6 @@
*/
private TemplateParser parser;
- /**
- * The current context.
- */
- private TemplateContext context;
-
public TemplateEngine getEngine()
{
return engine;
@@ -37,11 +32,6 @@
return parser;
}
- public TemplateContext getContext()
- {
- return context;
- }
-
public void setEngine( TemplateEngine engine )
{
this.engine = engine;
@@ -50,11 +40,6 @@
public void setParser( TemplateParser parser )
{
this.parser = parser;
- }
-
- public void setContext( TemplateContext context )
- {
- this.context = context;
}
/**
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel