--- Aleksei Valikov <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> I'm completely new to xDoclet so please forgive me
> for a couple of lame questions.
> 
> I need to write an xDoclet module and have now two
> problems.
> 
> 1. I'm calling my proprietary template as follows:
> 
>    <target name="generate-property-editors">
>      <xdoclet destdir="res">
>        <template
>          templateFile="mytemplate.xdt"
>          destinationFile="{0}PropertyEditor.java"/>
>        <fileset dir="src">
>          <include name="**/*.java"/>
>        </fileset>
>      </xdoclet>
>    </target>
> 
> As a result, xDoclet generated one PropertyEditor
> per java class. However, I 
> only need property editors for specific classes,
> say, for those having 
> mytag.class class tag. How could I avoid generating
> files for other classes?
> I've tried examining Hibernate module, but decided
> to as for help.
> 
> 2. In the class I generate an array
> 
>    protected final Property properties = new
> Property[]
>    {
>      <XDtMethod:forAllMethods>"foo",
> </XDtMethod:forAllMethods>
>    };
> 
> (There's more complex processing instead of "foo",
> not plain string generation)
> 
> This results code like {"foo", ..., "foo", }. Last
> comma makes java code 
> syntactically incorrect. How could I correct this
> situation?
> Is there some kind of variables that soul allow
> doing something like:
> <XDtMethod:forAllMethods>
>    <if variable is set>, </if variable is set>
>    <set the variable/>
>    "foo"
> </XDtMethod:forAllMethods>
> 
> I would be grateful for your answers.

You have 2 options.

1. There are xdoclet modules generating beaninfo, 
property editors and such stuff. Maybe you problem is
already solved there. 
( and you can steal from  xdt ) 
And there is definitely tag producing valid parameter
lists. ( declaration and invocation ) 

2.  If you do something completely new, and you are
not bound to 1.2.x vesrion of xdoclet you shall try to
go for xdoclet 2 - templating is much better,
you can have vcelocity or jelly , tags check for their
syntax and it is faster. 

regards,


=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------


        
                
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to