User: ara_e_w 
  Date: 02/06/08 05:56:50

  Modified:    core/src/xdoclet GenerationManager.java
  Log:
  plz do not throw away a code you don't know what it is for  :-) I use 
guessGenerationNeeded=false heavily in my own  templates to bypass GenerationManager.
  
  Revision  Changes    Path
  1.15      +33 -1     xdoclet/core/src/xdoclet/GenerationManager.java
  
  Index: GenerationManager.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/GenerationManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -w -r1.14 -r1.15
  --- GenerationManager.java    8 Jun 2002 12:37:25 -0000       1.14
  +++ GenerationManager.java    8 Jun 2002 12:56:50 -0000       1.15
  @@ -26,7 +26,7 @@
    *
    * @author    Vincent Harcq ([EMAIL PROTECTED])
    * @created   March 30, 2002
  - * @version   $Revision: 1.14 $
  + * @version   $Revision: 1.15 $
    */
   public class GenerationManager
   {
  @@ -36,6 +36,8 @@
   
       private final TemplateSubTask subTask;
   
  +    private boolean guessGenerationNeeded = true;
  +
       /**
        * Describe what the GenerationManager constructor does
        *
  @@ -87,6 +89,16 @@
       }
   
       /**
  +     * Gets the GuessGenerationNeeded attribute of the GenerationManager object
  +     *
  +     * @return   The GuessGenerationNeeded value
  +     */
  +    public boolean isGuessGenerationNeeded()
  +    {
  +        return guessGenerationNeeded;
  +    }
  +
  +    /**
        * Test if a Java source mmust be generated or not depending of timestamp of 
elements involved.
        *
        * @param clazz                 the Class from wich we generate
  @@ -105,6 +117,11 @@
               return true;
           }
   
  +        if (isGuessGenerationNeeded() == false) {
  +            log.debug("guessGenerationNeeded enabled");
  +            return true;
  +        }
  +
           // 1. Check whether a file on classpath is newer than the destination file
           if (isClasspathNewerThanFile(file))
               return true;
  @@ -141,6 +158,11 @@
               return true;
           }
   
  +        if (isGuessGenerationNeeded() == false) {
  +            log.debug("guessGenerationNeeded enabled");
  +            return true;
  +        }
  +
           // 1. Check on Jar timestamp
           if (isClasspathNewerThanFile(file) == true)
               return true;
  @@ -162,6 +184,16 @@
           }
   
           return false;
  +    }
  +
  +    /**
  +     * Sets the GuessGenerationNeeded attribute of the GenerationManager object.
  +     *
  +     * @param guessGenerationNeeded  The new GuessGenerationNeeded value
  +     */
  +    public void setGuessGenerationNeeded(boolean guessGenerationNeeded)
  +    {
  +        this.guessGenerationNeeded = guessGenerationNeeded;
       }
   
       private boolean isClassHierarchyNewerThanFile(XClass clazz, File file)
  
  
  

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

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

Reply via email to