Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
S
SfApexDoc
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 0
    • Merge requests 0
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Steve Cox
  • SfApexDoc
  • Wiki
  • Usage

Last edited by Steve Cox Nov 22, 2019
Page history

Usage

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

Clone repository
  • DocFormat
  • ReleaseNotes
  • Usage
  • Home