On Thu, Jul 12, 2012 at 1:26 PM, Dawid Weiss <[email protected]> wrote: >> I think a lot of this could be fixed with examples and docs, which > > We use a simple ANT task that extracts snippets of code from Java > (very often unit tests) and include these in JavaDocs, unfortunately > by post-processing. See the example here: > > http://download.carrot2.org/stable/javadoc/ > > and the sources (linked) are here: > > https://github.com/carrot2/carrot2/blob/df49d66087d0da9e87043e13a400ac148952a41c/applications/carrot2-examples/examples/org/carrot2/examples/clustering/ClusteringDocumentList.java > > As you can see there are simple tags of the form: > > [[[start:clustering-document-list-intro]]] > ... > [[[end:clustering-document-list-intro]]] > > these get extracted to separate files which are then included in the > javadocs. Crude, but works. I'm sure it could be improved and probably > other folks have come up with a similar idea, I just don't know of > such attempts.
Thats more sophisticated than what we do with the javadocs "linksource" option in the demo. The key advantage there is that we never want to link to any trunk/development code as it may not exist. So with linksource (like my example), it basically makes an htmlized version of your code included in the javadocs. -- lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
