Usage options
Home | Doc Format | Usage | Release Notes
Parameters
- -s (source directory): absolute or relative path to your Apex files. Typically, this will be the 'classes' folder in your Force.com project.
- -x (file extension): optional; files with this extension will be processed. Default is "cls"
- -t (target directory): optional absolute or relative path where generated documentation files will be saved. If not specified, the current directory will be used.
- -p (scope): optional comma-separated list of scope names to document (e.g. global,public,protected). The default is global,public
- -h (home file): optional absolute or relative path to your custom home page. This file is parsed and displayed as your 'Home' page in the documentation. It must be in html format.
- -a (author file): optional absolute or relative path to your custom author values. This text file should include 2 lines, "projectName = My Project Name" and "author = Author Name".
- -o (true | false): optional boolean flag to specify whether properties and methods should be sorted alphabetically. Default is true.
- -d: optional; output debug information.
Run from an OSX Terminal window
java -jar SfApexDoc.jar -s <source_folder> [-t <target_folder>] [-h <homefile>] [-a <authorfile>] [-p <scope>] [-o <true|false>]
To check the version number
java -jar SfApexDoc.jar -v[ersion]
Run from an Eclipse External Tool
On the main tab (from terminal, run "whereis java" to get the java program location) ("scope" is a comma-separated list of scope names to document e.g. global,public)
- Location: [java program location]
- Working Directory: ${project_loc}
- Arguments: -jar SfApexDoc.jar -s <source_folder> [-t <target_folder>] [-h ] [-a ] [-p ]
Create an ANT target
<target name="SfApexDoc">
<java fork="true" classname="SfApexDoc" failonerror="true">
<classpath><path location="/Users/scox/Dev/Tools/SfApexDoc.jar"/></classpath>
<arg line="-s src/classes -a docAuthor.txt -h docHome.txt"/>
</java>
</target>
Run Eclipse plugin (no longer supported as of 11/22/2019)
- Download the Eclipse plugin and copy it to the 'plugins' folder of your eclilpse installation
- Restart Eclipse, then right click on Force.com project in package explorer
- Choose Force.com | Generate SfApexDoc... from the context menu
- Specify parameters, then click 'Generate'
Home | Doc Format | Usage | Release Notes