> > I mean you give your existing code to this new tool, it puts xdoclet
> > comments right there in your code. To do so you need a parser or
> > something like that to find methods in source code and put
@ejb:blabla
> > comments in code. The trick is neatly find method/class javadocs and
put
> 
> We should consider JavaCC/ANTLR for this. I have worked a little with
> JavaCC. It kicks ass.

I don't know why but jrefactory and its PrettyPrint comes to my mind.
PrettyPrint is what we used in <pretty/> beautifier task (anyway it's
now part of jrefactory). I assume PrettyPrint will give a more
high-level API that a low level parser API. If you find time please
investigate JavaCC/ANTLR for our use. What we really want is nothing
more than something like this:
getSource().getMethod("ejbCreate").getJavadocComments().appendComment("@
ejb:bean");
getSource().save();

We need such a high level API.

> I know EJBGen has this. Could be worth to take a look at how it does
it
> for
> inspiration.

It's almost useless. It generates a new file, so you get a new file and
you can derive from your old files to use your code. And that part is
what you should do manually!

Obviously the correct way is to give it the source files and the
ejb-jar.xml, then the tool should put @ejb tags in your existing source
based on values extracted from ejb-jar.xml.
 
> > I'm also thinking about a GUI for xdoclet. Both standalone and IDE
> > integration. Any ideas? Volunteers?
> 
> Middlegen is a GUI for XDoclet. At least for entity beans. It reads
> databsase metadata and generates XDoclet annotated source code. Maybe
a
> more
> general purpose XDoclet GUI could build on Middlegen? Do you have any
> particular functionality in mind? The reverse engeneering feature
would be
> a
> must!

Well let's say you used middlegen to generate ejbs with Xdoclet tags in
it. Now you want to change a security or permission setting for a
method. You do this by hand now, but if there was a GUI you could simply
select the setting from a nice combo box. And here again the trick is
the parsing part because you have to later user's code to add or modify
Xdoclet tags there.

It's a damn interesting subproject if we find a neat and simple way to
handle the API I talked about above.

PS: I haven't found time to look at middlegen! I'm more than busy these
days :o)

Ara.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Reply via email to