User: pathoss 
  Date: 02/05/13 01:50:10

  Modified:    core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
                        DocletContext.java DocletTask.java
  Log:
  Added support for verbose="true".
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.3  +16 -2     xdoclet/core/src/xdoclet/DocletContext.java
  
  Index: DocletContext.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletContext.java,v
  retrieving revision 1.15.2.2
  retrieving revision 1.15.2.3
  diff -u -w -r1.15.2.2 -r1.15.2.3
  --- DocletContext.java        12 May 2002 11:58:00 -0000      1.15.2.2
  +++ DocletContext.java        13 May 2002 08:50:10 -0000      1.15.2.3
  @@ -12,7 +12,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   June 19, 2001
  - * @version   $Revision: 1.15.2.2 $
  + * @version   $Revision: 1.15.2.3 $
    */
   public class DocletContext implements java.io.Serializable
   {
  @@ -24,6 +24,7 @@
       private Hashtable properties;
       private HashMap configs;
       private boolean force;
  +    private boolean verbose;
       private String  addedTags;
       private Map     unmodifiableProperties;
       private SubTask activeSubTask;
  @@ -39,6 +40,7 @@
        * @param configs       Describe what the parameter does
        * @param force         Describe what the parameter does
        * @param addedTags
  +     * @param verbose
        */
       public DocletContext(
           String destDir,
  @@ -48,6 +50,7 @@
           Hashtable properties,
           HashMap configs,
           boolean force,
  +        boolean verbose,
           String addedTags
           )
       {
  @@ -58,6 +61,7 @@
           this.properties = properties;
           this.configs = configs;
           this.force = force;
  +        this.verbose = verbose;
           this.addedTags = addedTags;
       }
   
  @@ -112,13 +116,23 @@
       }
   
       /**
  -     * Gets the Force attribute of the DocletContext object
  +     * Gets the Force attribute of the DocletContext object.
        *
        * @return   The Force value
        */
       public boolean isForce()
       {
           return force;
  +    }
  +
  +    /**
  +     * Gets the Verbose attribute of the DocletContext object.
  +     *
  +     * @return   The Verbose value
  +     */
  +    public boolean isVerbose()
  +    {
  +        return verbose;
       }
   
       public String getAddedTags()
  
  
  
  1.39.2.10 +40 -44    xdoclet/core/src/xdoclet/DocletTask.java
  
  Index: DocletTask.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletTask.java,v
  retrieving revision 1.39.2.9
  retrieving revision 1.39.2.10
  diff -u -w -r1.39.2.9 -r1.39.2.10
  --- DocletTask.java   12 May 2002 21:36:19 -0000      1.39.2.9
  +++ DocletTask.java   13 May 2002 08:50:10 -0000      1.39.2.10
  @@ -44,9 +44,9 @@
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Aslak Helles�y</a>
    * @created   June 19, 2001
  - * @version   $Revision: 1.39.2.9 $
  - * @todo      we're defined via a taskdef that specidfies a classpath(ref) we need 
to get the classloader and find out what classes are on our classpath. this
  - *      is needed for module inspection!! This can be done by getting 
((AntClassLoader)getClass().getClassLoader()).getClasspath(). (Aslak)
  + * @version   $Revision: 1.39.2.10 $
  + * @todo      we're defined via a taskdef that specifies a classpath(ref) we need 
to get the classloader and find out what classes are on our classpath. This is
  + *      needed for module inspection!! This can be done by getting 
((AntClassLoader)getClass().getClassLoader()).getClasspath(). (Aslak)
    */
   public class DocletTask extends XJavadocTask implements DynamicConfigurator
   {
  @@ -54,11 +54,6 @@
       public final static String XDOCLET_VERSION = "@VERSION@";
       private final static Map subtaskMap = new HashMap();
   
  -//   private final static String _fileName = "xdoclet." + System.getProperty( 
"user.name" ) + ".ser";
  -//   private final static File DEFAULT_TMP_FILE = new File( System.getProperty( 
"java.io.tmpdir" ), _fileName );
  -
  -//   private static File _tmpFile = DEFAULT_TMP_FILE;
  -
       private static boolean modulesRegistered = false;
       protected transient DocletContext context = null;
       private List    modules = null;
  @@ -66,6 +61,7 @@
       private File    mergeDir;
       private String  excludedTags = null;
       private boolean force = false;
  +    private boolean verbose = false;
       private String  addedTags;
       private List    subTasks = new ArrayList();
       private List    configParams = new ArrayList();
  @@ -77,7 +73,7 @@
           System.setProperty("xdoclet.class.path", classpath);
       }
   
  -    private final static void registerModules(List modules) throws BuildException
  +    private static void registerModules(List modules) throws BuildException
       {
           Log log = LogUtil.getLog(DocletTask.class, "registerModules");
   
  @@ -104,7 +100,7 @@
                       
TemplateEngine.getEngineInstance().setTagHandlerFor(thd.namespace, handler);
                   }
                   catch (TemplateException e) {
  -                    throw new BuildException("Couldn't register " + thd.className + 
" to namespace " + thd.namespace + ":" + e.getMessage(), e);
  +                    throw new BuildException("Couldn't register " + thd.className + 
" to namespace " + thd.namespace + ':' + e.getMessage(), e);
                   }
                   catch (Exception e) {
                       throw new BuildException("Couldn't instantiate " + 
thd.className + " taghandler " + e.getMessage(), e);
  @@ -165,7 +161,7 @@
       }
   
       /**
  -     * Gets the Force attribute of the DocletTask object
  +     * Gets the Force attribute of the DocletTask object.
        *
        * @return   The Force value
        */
  @@ -174,6 +170,16 @@
           return force;
       }
   
  +    /**
  +     * Gets the Verbose attribute of the DocletTask object.
  +     *
  +     * @return   The Verbose value
  +     */
  +    public boolean isVerbose()
  +    {
  +        return verbose;
  +    }
  +
       public String getAddedTags()
       {
           return addedTags;
  @@ -184,11 +190,6 @@
           // do nothing
       }
   
  -//   public void setXdoclettempfile( File tmpFile )
  -//   {
  -//           _tmpFile = tmpFile;
  -//   }
  -
       /**
        * Sets the PackageNames attribute of the DocletTask object
        *
  @@ -240,7 +241,7 @@
       }
   
       /**
  -     * Sets the Force attribute of the DocletTask object
  +     * Sets the Force attribute of the DocletTask object.
        *
        * @param force  The new Force value
        */
  @@ -249,6 +250,16 @@
           this.force = force;
       }
   
  +    /**
  +     * Sets the Verbose attribute of the DocletTask object.
  +     *
  +     * @param verbose  The new Verbose value
  +     */
  +    public void setVerbose(boolean verbose)
  +    {
  +        this.verbose = verbose;
  +    }
  +
       public void setAddedTags(String addedTags)
       {
           this.addedTags = addedTags;
  @@ -257,7 +268,7 @@
       public Object createDynamicElement(String name) throws BuildException
       {
           if (!modulesRegistered) {
  -            List modules = ModuleFinder.findModules();
  +            List modules = ModuleFinder.findModules(verbose);
   
               registerModules(modules);
               modulesRegistered = true;
  @@ -282,13 +293,13 @@
               return subTask;
           }
           catch (ClassNotFoundException e) {
  -            throw new BuildException("Couldn't find class ", e);
  +            throw new BuildException("Couldn't find class: " + e.getMessage(), e);
           }
           catch (InstantiationException e) {
  -            throw new BuildException("Couldn't instantiate class ", e);
  +            throw new BuildException("Couldn't instantiate class: " + 
e.getMessage(), e);
           }
           catch (IllegalAccessException e) {
  -            throw new BuildException("Couldn't invoke constructor ", e);
  +            throw new BuildException("Couldn't invoke constructor: " + 
e.getMessage(), e);
           }
           catch (ClassCastException e) {
               throw new BuildException("Couldn't cast to " + SubTask.class.getName(), 
e);
  @@ -317,13 +328,13 @@
                   subTasks.add(subtask);
               }
               catch (ClassNotFoundException e) {
  -                throw new BuildException("Couldn't find class ", e);
  +                throw new BuildException("Couldn't find class: " + e.getMessage(), 
e);
               }
               catch (InstantiationException e) {
  -                throw new BuildException("Couldn't instantiate class ", e);
  +                throw new BuildException("Couldn't instantiate class: " + 
e.getMessage(), e);
               }
               catch (IllegalAccessException e) {
  -                throw new BuildException("Couldn't invoke constructor ", e);
  +                throw new BuildException("Couldn't invoke constructor: " + 
e.getMessage(), e);
               }
           }
       }
  @@ -341,11 +352,11 @@
       /**
        * Describe the method
        *
  -     * @param config_param  Describe the method parameter
  +     * @param configParam  Describe the method parameter
        */
  -    public void addConfigParam(ConfigParameter config_param)
  +    public void addConfigParam(ConfigParameter configParam)
       {
  -        configParams.add(config_param);
  +        configParams.add(configParam);
       }
   
       /**
  @@ -389,22 +400,6 @@
           return configs;
       }
   
  -//   public void execute() throws BuildException
  -//   {
  -//           try
  -//           {
  -//                   // save the context and pass its filename as an arg to the main
  -//                   save( getContext(), _tmpFile );
  -//                   createArg().setValue( _tmpFile.getAbsolutePath() );
  -//                   super.execute();
  -//           }
  -//           catch( IOException e )
  -//           {
  -//                   e.printStackTrace();
  -//                   throw new BuildException( e );
  -//           }
  -//   }
  -
       protected void start()
       {
           try {
  @@ -475,6 +470,7 @@
               project.getProperties(),
               configs,
               force,
  +            verbose,
               addedTags
               );
   
  
  
  

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to