Documenting Salesforce.com Apex class files
Asked Answered
R

1

7

Since the Salesforce.com Apex language is "Java-like", I'd like to use javadoc or Doxygen to generate API documentation for the package we plan to release on App Exchange.

I found an ApexDoc project on Google Code, but it's severely limited and uses a naive parser to generate HTML output. I'd much rather take advantage of the existing Doxygen parsers and output generators than try to reinvent that wheel from scratch.

So, my questions:

1) Has anyone been able to use javadoc or Doxygen to generate API documentation for their Apex classes? How were you able to do it?

2) I'm wondering how hard it would be to write a simple script to create a series of .java files from the .cls Apex class files, adding fake import statements and possibly modifying certain declarations to keep Doxygen happy. Any thoughts on what Doxygen (or javadoc) is choking on when it tries to parse an Apex .cls file?

I'm amazed that Salesforce doesn't provide such a tool or hasn't contributed an Apex parser to javadoc/Doxygen. Their documentation and developer tools are extensive, and they've got a great automated test setup. I haven't found anything from them for auto generating classes.

EDIT: Please view the updated version of this question on the Salesforce Stack Exchange.

Rayerayfield answered 6/8, 2012 at 21:25 Comment(0)
E
1

I've written a tool based on ApexDoc. There's a short writeup here, with links to the JAR file and the GitHub project. Please leave me a comment on my blog if you find problems.

Ehrlich answered 1/9, 2013 at 13:0 Comment(1)
Note that link-only answers are discouraged, SO answers should be the end-point of a search for a solution (vs. yet another stopover of references, which tend to get stale over time). Please consider adding a stand-alone synopsis here, keeping the link as a reference.Quail

© 2022 - 2024 — McMap. All rights reserved.