You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Bertrand Delacretaz <bd...@codeconsult.ch> on 2002/11/22 11:35:37 UTC

JavaDocGenerator, ideas?

(cc to cocoon-docs for info, please discuss on forrest-dev)

Hi Forresters,

On cocoon-docs [1] we recently agreed (I think - no vote yet) to generate 
parts of the soon-to-be Cocoon Users Reference Docs from custom javadoc tags 
embedded in java source code.

For this we need a JavaDocGenerator that would parse java sources and output 
an XML representation of (at least) the javadoc tags and their content. I 
think such a generator could be very useful for other projects.

I assume this component would be added to the Cocoon code base, but the most 
immediate need that I can see is in Forrest, which prompts me to bring the discussion here.

Any suggestions on how to best implement this? 
I see it has been discussed lately but did not find concrete conclusions.

I gave a quick look at qdox [2], looks like it would be fairly easy to base 
the JavaDocGenerator on this library.

Thoughts?

-- 
 Bertrand Delacrétaz (codeconsult.ch, jfor.org)

 buzzwords: XML, java, XSLT, Cocoon, FOP, mentoring/teaching/coding.
 blogspace http://www.codeconsult.ch/bertrand

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-docs&m=103788336715888&w=2
[2] http://qdox.sourceforge.net/model.html

Re: JavaDocGenerator, ideas?

Posted by Peter Donald <pe...@apache.org>.
On Fri, 22 Nov 2002 21:56, Nicola Ken Barozzi wrote:
> Steven Noels wrote:
> > Nicola Ken Barozzi wrote:
> >> IMHO this is more appropriate for a project like Alexandria, and there
> >> is also a Javadoc XML doclet there.
> >> But this would need static pre-generation of the javadocs...
> >
> > Yep. But I think having it as a Cocoon Generator still would offer us a
> > lot of flexibility, at increased runtime cost. I would personally favor
> > the Generator.
>
> Hmmm, do you guys know why "javadoc" builds the docs in memory?
> It naively seems that it's not really necessary to scann all files.

qdox is much more efficient. It can parse only the files you specify and does 
not require oodles of memory.

-- 
Cheers,

Peter Donald
---------------------------------------------------
"It is easy to dodge our responsibilities, but we 
cannot dodge the consequences of dodging our 
responsibilities." -Josiah Stamp 
--------------------------------------------------- 



Re: JavaDocGenerator, ideas?

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Steven Noels wrote:
> Nicola Ken Barozzi wrote:
> 
>> IMHO this is more appropriate for a project like Alexandria, and there 
>> is also a Javadoc XML doclet there.
>> But this would need static pre-generation of the javadocs...
> 
> Yep. But I think having it as a Cocoon Generator still would offer us a 
> lot of flexibility, at increased runtime cost. I would personally favor 
> the Generator.

Hmmm, do you guys know why "javadoc" builds the docs in memory?
It naively seems that it's not really necessary to scann all files.

IMHO we can easily make that generator using Chaperon, by making a 
grammer for it, no?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: JavaDocGenerator, ideas?

Posted by Steven Noels <st...@outerthought.org>.
Nicola Ken Barozzi wrote:

> IMHO this is more appropriate for a project like Alexandria, and there 
> is also a Javadoc XML doclet there.
> But this would need static pre-generation of the javadocs...

Yep. But I think having it as a Cocoon Generator still would offer us a 
lot of flexibility, at increased runtime cost. I would personally favor 
the Generator.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0103539/
stevenn at outerthought.org                stevenn at apache.org


Re: JavaDocGenerator, ideas?

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Bertrand Delacretaz wrote:
> (cc to cocoon-docs for info, please discuss on forrest-dev)
> 
> Hi Forresters,
> 
> On cocoon-docs [1] we recently agreed (I think - no vote yet) to generate 
> parts of the soon-to-be Cocoon Users Reference Docs from custom javadoc tags 
> embedded in java source code.
> 
> For this we need a JavaDocGenerator that would parse java sources and output 
> an XML representation of (at least) the javadoc tags and their content. I 
> think such a generator could be very useful for other projects.
> 
> I assume this component would be added to the Cocoon code base, but the most 
> immediate need that I can see is in Forrest, which prompts me to bring the discussion here.
> 
> Any suggestions on how to best implement this? 
> I see it has been discussed lately but did not find concrete conclusions.
> 
> I gave a quick look at qdox [2], looks like it would be fairly easy to base 
> the JavaDocGenerator on this library.

IMHO this is more appropriate for a project like Alexandria, and there 
is also a Javadoc XML doclet there.
But this would need static pre-generation of the javadocs...

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: JavaDocGenerator, ideas?

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Friday 22 November 2002 11:58, Peter Donald wrote:
>. . .
> I am just learning Cocoon so haven't really done much more than play but it
> would be great to have an AbstractQDoxGenerator that I could reuse ;)
>. . .

If you need help in writing a JavaDocGenerator based on qdox I'd be happy to 
help. Just let me know. 

-Bertrand

Re: JavaDocGenerator, ideas?

Posted by Steven Noels <st...@outerthought.org>.
Peter Donald wrote:

> I am just learning Cocoon so haven't really done much more than play but it 
> would be great to have an AbstractQDoxGenerator that I could reuse ;)

Go off, learn the little there is to know for a real Avaloneer about 
Cocoon and create one yourself, I'll be happy to commit that patch, and 
feel honoured that Peter - who is one real contributor to what Avalon is 
right now - is contributing to Forrest.

<seriously>No, there isn't the slightest tone of sarcasm in my mail. 
Don't read between the lines.</seriously>

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0103539/
stevenn at outerthought.org                stevenn at apache.org


Re: JavaDocGenerator, ideas?

Posted by Peter Donald <pe...@apache.org>.
On Fri, 22 Nov 2002 21:35, Bertrand Delacretaz wrote:
> (cc to cocoon-docs for info, please discuss on forrest-dev)
>
> Hi Forresters,
>
> On cocoon-docs [1] we recently agreed (I think - no vote yet) to generate
> parts of the soon-to-be Cocoon Users Reference Docs from custom javadoc
> tags embedded in java source code.
>
> For this we need a JavaDocGenerator that would parse java sources and
> output an XML representation of (at least) the javadoc tags and their
> content. I think such a generator could be very useful for other projects.
>
> I assume this component would be added to the Cocoon code base, but the
> most immediate need that I can see is in Forrest, which prompts me to bring
> the discussion here.
>
> Any suggestions on how to best implement this?
> I see it has been discussed lately but did not find concrete conclusions.
>
> I gave a quick look at qdox [2], looks like it would be fairly easy to base
> the JavaDocGenerator on this library.

I use QDox and think it rocks (fast and flexible). I believe it is also slated 
for inclusion in XDoclet2 so it should be much more widely used in the 
future.

I am just learning Cocoon so haven't really done much more than play but it 
would be great to have an AbstractQDoxGenerator that I could reuse ;)

-- 
Cheers,

Peter Donald
---------------------------------------------------------
Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".
---------------------------------------------------------


Re: JavaDocGenerator, ideas?

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 22, 2002 at 11:35:37AM +0100, Bertrand Delacretaz wrote:
> (cc to cocoon-docs for info, please discuss on forrest-dev)
> 
> Hi Forresters,
> 
> On cocoon-docs [1] we recently agreed (I think - no vote yet) to generate 
> parts of the soon-to-be Cocoon Users Reference Docs from custom javadoc tags 
> embedded in java source code.
> 
> For this we need a JavaDocGenerator that would parse java sources and output 
> an XML representation of (at least) the javadoc tags and their content. I 
> think such a generator could be very useful for other projects.

Yes, I would find that useful for documenting Ant tasks.

I propose sucking up to Peter Donald:

  "Essentially what I want to do is be able to point at a java source
  file that gets processed by qdox.sourceforge.net and outputs some
  custom xml. The code is already written but only works from command
  line. What I would like to do is get it working inside forrest so that
  everytime I rebuild the descriptions of components are regenerated and
  crosslinked."
   <20...@apache.org>


--Jeff

> I assume this component would be added to the Cocoon code base, but the most 
> immediate need that I can see is in Forrest, which prompts me to bring the discussion here.
> 
> Any suggestions on how to best implement this? 
> I see it has been discussed lately but did not find concrete conclusions.
> 
> I gave a quick look at qdox [2], looks like it would be fairly easy to base 
> the JavaDocGenerator on this library.
> 
> Thoughts?
> 
> -- 
>  Bertrand Delacrétaz (codeconsult.ch, jfor.org)
> 
>  buzzwords: XML, java, XSLT, Cocoon, FOP, mentoring/teaching/coding.
>  blogspace http://www.codeconsult.ch/bertrand
> 
> [1] http://marc.theaimsgroup.com/?l=xml-cocoon-docs&m=103788336715888&w=2
> [2] http://qdox.sourceforge.net/model.html

Re: JavaDocGenerator, ideas?

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 22, 2002 at 11:35:37AM +0100, Bertrand Delacretaz wrote:
> (cc to cocoon-docs for info, please discuss on forrest-dev)
> 
> Hi Forresters,
> 
> On cocoon-docs [1] we recently agreed (I think - no vote yet) to generate 
> parts of the soon-to-be Cocoon Users Reference Docs from custom javadoc tags 
> embedded in java source code.
> 
> For this we need a JavaDocGenerator that would parse java sources and output 
> an XML representation of (at least) the javadoc tags and their content. I 
> think such a generator could be very useful for other projects.

Yes, I would find that useful for documenting Ant tasks.

I propose sucking up to Peter Donald:

  "Essentially what I want to do is be able to point at a java source
  file that gets processed by qdox.sourceforge.net and outputs some
  custom xml. The code is already written but only works from command
  line. What I would like to do is get it working inside forrest so that
  everytime I rebuild the descriptions of components are regenerated and
  crosslinked."
   <20...@apache.org>


--Jeff

> I assume this component would be added to the Cocoon code base, but the most 
> immediate need that I can see is in Forrest, which prompts me to bring the discussion here.
> 
> Any suggestions on how to best implement this? 
> I see it has been discussed lately but did not find concrete conclusions.
> 
> I gave a quick look at qdox [2], looks like it would be fairly easy to base 
> the JavaDocGenerator on this library.
> 
> Thoughts?
> 
> -- 
>  Bertrand Delacrétaz (codeconsult.ch, jfor.org)
> 
>  buzzwords: XML, java, XSLT, Cocoon, FOP, mentoring/teaching/coding.
>  blogspace http://www.codeconsult.ch/bertrand
> 
> [1] http://marc.theaimsgroup.com/?l=xml-cocoon-docs&m=103788336715888&w=2
> [2] http://qdox.sourceforge.net/model.html