Packaging taglets

Under javaDoc 1.3 I created a doclet that handled an extra 5 custom tags.If re-written as taglets for 1.4, is it possible to package them all together to keep the command line short?
[203 byte] By [geoffgibbs] at [2007-9-26 21:26:37]
# 1

No. Each taglet can handle only a single tag, so you would need 5 -taglet (or -tag) commands for 5 custom tags.

You can use @argfile to keep the command line short, but

There is a bug where -tag options cannot be included:

http://developer.java.sun.com/developer/bugParade/bugs/4651566.html

-Doug Kramer

Javadoc team

dkramer at 2007-7-3 21:17:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

I think I've got a nice solution for you. At least it worked for me.

I packed all the taglets into a single jar and added a main registration class like this:

public class TagRegr implements Taglet {

// ...

public static void register(Map tagletMap) {

Taglet[] taglet = new Taglet[N_TAGLETS];

taglet[0] = new FirstTaglet();

//..

taglet[N_TAGLETS-1] = new LastTaglet();

int i;

for(i=0; i<taglet.length; ++i){

Taglet t = (Taglet) tagletMap.get(taglet[i].getName());

if (t != null) {

tagletMap.remove(taglet[i].getName());

}

tagletMap.put(taglet[i].getName(), taglet[i]);

}

}

\\...

}

So I can write a comman line like:

javacod -taglet TagReg -tagletpath AllTaglets.jar ...

Perhaps the big array is not so nice, but it works.

Marco.>

MTO at 2007-7-3 21:17:15 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...