Documenting Salesforce.com Apex class files
I've made some improvements to ApexDoc. Check out the writeup here: http://force-code.com/sfapexdoc/
In a nutshell, SfApexDoc:
- Parses javadoc-style comments and creates HTML documentation
- recognizes standard tags such as @description, @author, @date, @return, @param, @see.
- creates links to standard Apex types as well as your own classes
- includes full class, method, and property signatures - even those that span multiple lines.
I'm actively working on fixing issues and adding features, so please send me a note if you find problems.
I have used apexDoc for a while and we are starting to roll it out more fully for our use at my organisation. It is open source software and so you could always contribute some updates for it :-) What features are you wanting to add to it that it doesn't have (just to give a flavour)?
In answer to your questions
1) I don't think anybody has successfully managed to do this. There is an idea of the ideas exchange for it to be done but it seems to gain very little support.
2) Theoretically it should be pretty easy as apex is a Java DSL. Have you tried running Doxygen and if so what errors does it throw up?
3) I use ApexDoc to generate some basic output and then have a little script tied in to copy across custom css and things. It isn't perfect but it does for the small amount we need at the moment.
I believe the IDE is being open sourced at some time in which case I would imagine the antlr grammar file would become available which may help you out.
I know it is not really an answer for what you wanted to hear per se, but sadly it's all we have atm (and I would love a nicer documentation generator!!)
Paul
This question is quite old now, but in case anyone stumbles upon it, since most SF development has moved to VS Code, I ported the original ApexDoc over to TypeScript and made several major improvements. It is very easy to document your class files in VS Code (comment blocks can be contextually stubbed, automatically filling in your method params), and preview your docs in seconds. Check it out here: https://marketplace.visualstudio.com/items?itemName=PeterWeinberg.apexdox-vs-code&ssr=false
Hope someone finds this useful!