Hi all,

I'm writing a new xdoclet module for JCS, and everything feels easy before I
realized than xdoclet was unable to restitute the body of the methods of a
class.
The goal is to get a tagged class, to modify some tags and to rewrite it on
another path.

I look around xjavadoc, but I have not found any method than can give the body
of an XMethod. This is quite strange because if you save an XClass
[XClass.save()],
the methods are written with their bodies in the output file ... but as I have
not read
the xjavadoc documentation, I will not comment this, there is cetainly a good
reason.

My second solution was to modify the current class and save it inside a subtask.
For example :
clazz = getCurrentClass();
[do my modifications on class tags]
clazz.save(my_file_path);

But dammed ! ... xjavadoc is initialized with setUseNodeParser(false);
impossible to save a class :(

My last solution :( is to make a new instance of xjavadoc well initialized,
(always in my subtask context)
to parse the class, modify it as I was doing, and save the modified class.
The problem is now : how to get the absolute path of the current class, to
get this class parsed by my new instance of xjavadoc ?
I can get the relative path :
PackageTagsHandler.packageNameAsPathFor(clazz.getQualifiedName()) + ".java";
but how can I get the absolute path ?
The one my "jcsdoclet" main task has extract from the fileset.

Maybe I'm going wrong, and there might be a simplier solution, I'm opened
on any suggestion.

Thank you very much

Matthieu Peschaud


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to