A wise old hermit known only as Vincent Harcq 
<[EMAIL PROTECTED]> once said:

> > > What is the purpose of the putting the Date/Time after 
> > > @xdoclet-generated ?
> > 
> > See feature request #456468, though in fact it's not quite what I'd 
> > originally been thinking of.
...
> > I figured if there was a way to tell what version of 
> > xdoclet had done the generation, a newer one could know to regenerate 
> > them.
> 
> The problem is that javadoc decides which files to run by looking at
> timestamp only.
> He does not know which files will be generated and so can not go into
> these to find out if it have to re-generate it or not.
> So touching the original files is the only solution I guess.

Which is probably why the original idea isn't how it ended up working 
(that, and the person who did it misread what I was suggesting).  Once the 
entitybmp.j template settled down, it hasn't been so bad anyway.  I'm 
still a bit wary that a future version of xdoclet could have changes to 
e.g. the deployment descriptor template that need other things (the 
home/remote interfaces, say) to be regenerated in order to work properly, 
and it'll get things wrong until I touch all my EJB files.  But I guess 
it's not worth worrying about too much for now.

> > I'll see if I 
> > can add a parameter to make the timestamp optional while I'm 
> > at it, so it'll cater for us both.
> 
> Thank you but don't worry too much for me :)

I'm not worried, unless it involves much bigger changes.  What I'm 
currently thinking of is to use separate <XDtClass:classCommentText/> and 
<XDtClass:classCommentTags/> template tags.  That'll let me change e.g. 
home.j so instead of
    /**
     * Generated home interface for <XDtEjb:ejbName/>. Do not edit!
     */
    package <XDtPackage:packageOf><XDtEjbHome:homeInterface 
            type="remote"/></XDtPackage:packageOf>;
    
    <XDtClass:importedList/>
    
    <XDtClass:classComment indent="0"/>
    public interface ...
it can use
    package <XDtPackage:packageOf><XDtEjbHome:homeInterface
            type="remote"/></XDtPackage:packageOf>;
    
    <XDtClass:importedList/>
    
    /**
     * Generated home interface for <XDtEjb:ejbName/>. Do not edit!
    <XDtClass:classCommentTags indent="0"/>
     */
    public interface ...
and instead of a surplus comment at the top that doesn't get used, you get 
a more meaningful description in your javadocs.  I had thought I might 
make the classCommentTags tag omit the @xdoclet-generated line, and have a 
separate template tag for that; then, you could omit it altogether by 
specifying your own copy of the template that doesn't include it.  
However, I seem to recall someone saying a while back that the 
@xdoclet-generated might also be used as a check to stop xdoclet from 
processing the generated files (e.g. if you've just specified the packages 
parameter in the task, instead of using a fileset that only includes the 
files to process, like <include name="**/*EJB.java"/>).  If so, it may not 
be a good idea to leave it out completely, and if there's a switch added 
somewhere for whether or not @xdoclet-generated should include the 
date/time, it doesn't really matter if it's in its own template tag, or 
still part of <XDtClass:classCommentTags/>  So, I guess I might as well 
leave it in there for now and we can worry about the switch later?


Andrew.

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

Reply via email to