User: ara_e_w 
  Date: 02/04/12 14:01:57

  Modified:    core/src/xdoclet/loader Bootstrapper.java XDocletModule.java
  Log:
  fork=false works fine :-)
  
  Revision  Changes    Path
  1.4       +43 -26    xdoclet/core/src/xdoclet/loader/Bootstrapper.java
  
  Index: Bootstrapper.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/loader/Bootstrapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- Bootstrapper.java 11 Apr 2002 20:53:00 -0000      1.3
  +++ Bootstrapper.java 12 Apr 2002 21:01:57 -0000      1.4
  @@ -4,17 +4,18 @@
    */
   package xdoclet.loader;
   
  -import java.util.List;
  -import java.util.Iterator;
  -import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
  -
   import xdoclet.template.TemplateEngine;
   import xdoclet.template.TemplateException;
  +import xdoclet.util.XmlValidator;
  +
  +import java.util.Iterator;
  +import java.util.List;
   
   /**
    * Bootstrapper for xdoclet. Defines xdoclet tasks and preproceses them with
  @@ -48,11 +49,23 @@
                }
        }
   
  +     /**
  +      * Sets the ClasspathRef attribute of the Bootstrapper object
  +      *
  +      * @param r  The new ClasspathRef value
  +      */
        public void setClasspathRef( Reference r )
        {
                createClasspath().setRefid( r );
        }
   
  +     /**
  +      * Describe what the method does
  +      *
  +      * @return         Describe the return value
  +      * @todo-javadoc   Write javadocs for method
  +      * @todo-javadoc   Write javadocs for return value
  +      */
        public Path createClasspath()
        {
                if( this.classpath == null )
  @@ -62,14 +75,19 @@
                return this.classpath.createPath();
        }
   
  +     /**
  +      * Describe what the method does
  +      *
  +      * @exception BuildException  Describe the exception
  +      * @todo-javadoc              Write javadocs for method
  +      * @todo-javadoc              Write javadocs for exception
  +      */
        public void execute() throws BuildException
        {
                try
                {
  -                     //BootstrapClassLoader cl = new BootstrapClassLoader();
                        BootstrapClassLoader bcl = new BootstrapClassLoader();
  -                     AntClassLoader cl = new AntClassLoader( bcl, project, 
this.classpath, true );
  -
  +                     AntClassLoader cl = new AntClassLoader( bcl, project, 
classpath, true );
                        ModuleFinder moduleFinder = new ModuleFinder();
                        List modules = moduleFinder.findModules();
                        Iterator i = modules.iterator();
  @@ -77,7 +95,6 @@
                        while( i.hasNext() )
                        {
                                XDocletModule module = ( XDocletModule ) i.next();
  -
                                // dynamically instrument parent tasks with create 
methods
                                List subTaskDefinitions = 
module.getSubTaskDefinitions();
                                Iterator j = subTaskDefinitions.iterator();
  @@ -90,22 +107,22 @@
                                }
   
                                // register tag handlers
  -                             /*
  -                              * List tagHandlerDefinitions = 
module.getTagHandlerDefinitions();
  -                              * Iterator k = tagHandlerDefinitions.iterator();
  -                              * while( k.hasNext() )
  -                              * {
  -                              * TagHandlerDefinition thd = ( TagHandlerDefinition ) 
k.next();
  -                              * try
  -                              * {
  -                              * 
TemplateEngine.getEngineInstance().setTagHandlerFor( thd.namespace, 
thd.getTagHandler() );
  -                              * }
  -                              * catch( TemplateException e )
  -                              * {
  -                              * throw new BuildException( "Couldn't register " + 
thd.getTagHandler().getClass().getName() + " to namespace " + thd.namespace + ":" + 
e.getMessage(), e );
  -                              * }
  -                              * }
  -                              */
  +                             List tagHandlerDefinitions = 
module.getTagHandlerDefinitions();
  +                             Iterator k = tagHandlerDefinitions.iterator();
  +
  +                             while( k.hasNext() )
  +                             {
  +                                     TagHandlerDefinition thd = ( 
TagHandlerDefinition ) k.next();
  +
  +                                     try
  +                                     {
  +                                             
TemplateEngine.getEngineInstance().setTagHandlerFor( thd.namespace, 
thd.getTagHandler() );
  +                                     }
  +                                     catch( TemplateException e )
  +                                     {
  +                                             throw new BuildException( "Couldn't 
register " + thd.getTagHandler().getClass().getName() + " to namespace " + 
thd.namespace + ":" + e.getMessage(), e );
  +                                     }
  +                             }
                        }
   
                        try
  @@ -114,7 +131,7 @@
   
                                project.addTaskDefinition( "ejbdoclet", ejbDocletClass 
);
                        }
  -                     catch( ClassNotFoundException e )
  +                     catch( Exception e )
                        {
                                throw new IllegalStateException( e.getMessage() );
                        }
  
  
  
  1.4       +8 -7      xdoclet/core/src/xdoclet/loader/XDocletModule.java
  
  Index: XDocletModule.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/loader/XDocletModule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- XDocletModule.java        11 Apr 2002 20:53:00 -0000      1.3
  +++ XDocletModule.java        12 Apr 2002 21:01:57 -0000      1.4
  @@ -15,21 +15,21 @@
    *
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Aslak Helles�y</a>
    * @created   7. april 2002
  - * @version   $Revision: 1.3 $
  + * @version   $Revision: 1.4 $
    */
   class XDocletModule
   {
  -//   private ArrayList  _tagHandlers = new ArrayList();
  +     private ArrayList  _tagHandlers = new ArrayList();
        private ArrayList  _subTasks = new ArrayList();
   
        public XDocletModule()
        {
        }
   
  -//   public List getTagHandlerDefinitions()
  -//   {
  -//           return _tagHandlers;
  -//   }
  +     public List getTagHandlerDefinitions()
  +     {
  +             return _tagHandlers;
  +     }
   
        public List getSubTaskDefinitions()
        {
  @@ -41,6 +41,7 @@
                try
                {
                        System.out.println("********************** addTagHandler("+ 
namespace +"," + clazz + ")");
  +
                        TemplateTagHandler handler = ( TemplateTagHandler ) 
Class.forName( clazz ).newInstance();
   
                        TemplateEngine.getEngineInstance().setTagHandlerFor( 
namespace, handler );
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to