I don't follow you. Have you faced any problem with multiple <template/>
subtasks?

Btw, see addTemplate() of DocletTask. Everything happens there. Not
magical about a TemplateSubTask really. Btw, just a note here: every
subtask has subTaskName, for TemplateSubTask it's "template", for
EntityCmpSubTask its "entitycmp" (the xmlish element name is used,
that's the convention). So what happens if you have two <template/>
subtasks defined? Nothing wrong actually, but if you try to do a
getDocletContext().getSubTaskByName("template") you'll get the first one
only. This procedure also happens with <config-param/>, because config
params can be subtask-only and not global, they are prefixed by subtask
name. So in this case if you have two <template/>s both defining a
config param with the same name but with different values, even the
second template sees the values of config param of the first temaplte.
How can you tackle it? Easy, just set <template ....
subtaskname="generate-blabla-intf"/> and they are now correctly
resolved.

Ara.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-devel-
> [EMAIL PROTECTED]] On Behalf Of Philippe Caya
> Sent: Thursday, June 27, 2002 9:31 PM
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-devel] multiple sub-tasks
> 
> Does anybody know how xDoclet handles the Template subtask in order to
> allow
> it to have multiple instances of the template item under a
xDocletTask.
> 
> I looked at the closed Feature request 464783 but I could not find any
> information on the affected files or any implementation detail. I've
been
> playing in the source code for 2 days, but I can't find how templates
are
> allowed to be many while other subtasks are unique.
> 
> Philippe
> 
> 
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> Xdoclet-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-devel



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to