Generate Salesforce Apex Code documentation, with navigatable UML

Approach 1: Doxygen + Graphviz Dot + Mscgen (Windows-centric)

Provides clickable UML, takes some setup time for initial setup.

  1. Install Doxygen: http://www.stack.nl/~dimitri/doxygen/
  2. Install Graphviz Dot: http://www.graphviz.org/Download_windows.php
  3. Install Mscgen: http://www.mcternan.me.uk/mscgen/
  4. Configure Doxygen GUI frontend (Doxywizard)
    1. Specify project name, src and destination dirs (choose path close to root to avoid Windows path length issues)
    2. Choose Mode: Java/C#
    3. Choose Output: e.g. HTML with nav panel & search function
    4. Choose Chart type: Use dot tool
    5. Under Expert > Dot
      1. The Mscgen_path, probably: Program Files (x86)\Mscgen
      2. Dot_path, probably: Program Files (x86)/Graphviz2.38/bin
      3. Turn on Have_Dot, Class_graph, Collaboration_graph, Group_graphs, Call_graph, Caller_graph
      4. I would set Dot_image_format to SVG and turn on Interactive_svg
    6. Start a Doxygen run to generate documentation (if you don't get any graphs, a path is not set properly)
  5. Save your configuration (you get a "Doxyfile" file), and check it in (I wouldn't put generated html in version management, it is better hosted in a different way)
  6. If you want to see SVG graph thumbnails in Explorer: https://svgextension.codeplex.com/releases/view/118790



If you have chosen HTML as format you can see the project overview under:

Classes > Class Hierarchy > Go to the graphical class hierarchy

This shows global UMLs of the project, where elements are clickable. You can also go to a class with the search function, and click through the UML to navigate.

For Salesforce Apex projects:

  1. Same as above, and…
  2. Enable *.cls extension under Expert/Input/File_Patterns
  3. Under Expert/Project/Extension_Mapping add cls=Java
  4. Enable EXTRACT_ALL to EXTRACT_LOCAL_METHODS under Export/Build



Aanpak 2: Doxygen + Mscgen + Msc-generator

For flow structograms, but without the Visio mouse RSI hassle.

Easily create structograms to describe a project/change, without graphical editing, and so that it works together with version control (text-only)
  1. Install Mscgen as per Doxygen (Affero GNU Public License) http://sourceforge.net/projects/msc-generator/
  2. Open Msc generator
  3. Enter structogram code as on their site
  4. Check your *.signalling chart src and possibly. a screenshot in version control at the project
There's even a Jira plugin to post visualization directly to issues:
https://marketplace.atlassian.com/plugins/com.addteq.jira.plugin.mscgen.JIRA-Mscgen