### Quick Start: Build and Run ApexDox VS Code Extension Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Clone the ApexDox VS Code extension repository, install dependencies using yarn, and run the extension locally for development. Press F5 to run the extension and test changes. ```shell git clone https://github.com/no-stack-dub-sack/apexdox-vs-code.git cd apexdox-vs-code code . yarn ``` -------------------------------- ### Minimum ApexDox Configuration Example Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Provides the essential settings required to run ApexDox, specifying the target directory for generated documentation and the source directories for Apex code. This example demonstrates configuration in JSON, YAML, and a dotfile format. ```json { "apexdox.engine.targetDirectory": "${workspaceFolder}\documentation", "apexdox.engine.source": [ { "path": "${workspaceFolder}\src\classes" } ] } ``` ```yaml engine: targetDirectory: "${workspaceFolder}/documentation" source: - path: "${workspaceFolder}/src/classes" ``` ```json { "engine": { "targetDirectory": "${workspaceFolder}/documentation", "source": [ { "path": "${workspaceFolder}/src/classes" } ] } } ``` -------------------------------- ### ApexDox Basic Comment Block Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Illustrates the most fundamental structure for an ApexDox comment block, which is used to document Apex classes, interfaces, enums, methods, or properties. It must start with '/**' and end with '*/', with subsequent lines beginning with '*'. ```java /** * @description This is the description! */ ``` -------------------------------- ### Running and Testing ApexDox VS Code Extension Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Instructions for running the extension in a new VS Code window (F5) and executing its tests. Includes steps for compiling changes and updating snapshots for test verification. ```shell # To run the extension: # Press F5, or click on "Run & Debug" and choose "Run Extension" # To test your changes: # Restart using CTRL + SHIFT + F5 # To run the extension's tests: # First compile your changes by running: yarn compile # Then select "Extension Tests" from the "Run & Debug" dropdown. # To update snapshots: yarn update-snapshots ``` -------------------------------- ### ApexDox VS Code Commands Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Provides essential commands for running the ApexDox documentation generator and previewing generated documentation within VS Code. ```APIDOC VS Code Commands: - ApexDox: Run - Description: Executes the ApexDox documentation generation process. Configuration options for this command can be set in VS Code's settings.json. - Usage: Accessible via the VS Code Command Palette (Ctrl/Cmd + Shift + P). - ApexDox: Open Docs - Description: Launches a local static server to preview the generated ApexDox documentation. - Usage: Accessible via the VS Code Command Palette (Ctrl/Cmd + Shift + P). - ApexDox: Stub Comment Block - Description: Generates an ApexDox comment block stub based on the current code context (class, method, property, enum). This command can also be invoked by typing '/**' and pressing Tab. - Usage: Invoke on the line above the code element to be documented, or use the '/**' completion item. ``` -------------------------------- ### ApexDox Source Configuration Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Defines the source directories and optional URLs for ApexDox to scan for .cls files. Supports recursive scanning and linking to hosted source code. ```APIDOC apexdox.engine.source: { path: string, sourceUrl?: string }[] - An array of source objects, each containing a required 'path' and an optional 'sourceUrl'. - 'path': An absolute path to a folder ApexDox will recursively scan for .cls files. Use `${workspaceFolder}` variable for correct path resolution (e.g., `${workspaceFolder}/force-app/main/default/classes/`). - 'sourceUrl': An optional URL where .cls source files are hosted, enabling links in documentation. Confirmed to work with GitHub. Must use `${workspaceFolder}` in the 'path' setting for this to function correctly. - Default: If omitted, defaults to `${workspaceFolder}/src/classes` (non-DX) or `${workspaceFolder}/force-app/main/default/classes` (DX). apexdoc.engine.source.path: string - An absolute path of a folder location which ApexDox will recursively scan for `.cls` files. - For all features to work correctly, please use the `${workspaceFolder}` variable in your `path` string, e.g. `${workspaceFolder}/force-app/main/default/classes/`. - Default: `${workspaceFolder}/src/classes` for non-DX projects, and `${workspaceFolder}/force-app/main/default/classes` for DX. apexdoc.engine.source.sourceUrl: string - An optional URL where the `.cls` source files are hosted. - Enables ApexDox to create links to your source code throughout the documentation. - Confirmed to work with Github and similar hosting services. - Example: `https://github.com/me/my-project/tree/master/` - Note: For this feature to work correctly, you _**must**_ use the `${workspaceFolder}` variable in your `apexdoc.engine.source.path` setting. - Default: `undefined` ``` -------------------------------- ### ApexDox Engine Configuration Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Configures the core behavior of the ApexDox engine, including source file paths, asset inclusion, custom page inclusion, directory cleaning, and the port for serving documentation. These settings can be defined in various configuration files like settings.json, apexdox.yaml, or .apexdoxrc. ```APIDOC apexdox.engine.assets: string[] - An array of absolute paths of files to be included in the target directory's 'assets' folder. Useful for including images, CSS, or JavaScript files. For example, to include a banner image, add its path and reference it as './assets/yourImage.png' in your HTML. To override the default favicon, include 'favicon.png' in this array. - Default: [] apexdox.engine.pages: string[] - An array of absolute paths of non-ApexDox generated HTML files to be made available alongside generated documentation. These files will be placed in the target directory. For example, linking to 'MyCoolPage.html' can be done via 'href="./MyCoolPage.html"'. - Default: [] apexdox.engine.cleanDir: boolean - If set to true, ApexDox will remove all files and folders in the target directory before generating new documentation. - Default: false apexdox.engine.port: number - The port number on which the 'ApexDox: Open Docs' command will serve your documentation. - Default: 8080 ``` -------------------------------- ### ApexDox Display and Scope Settings Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Controls the project's home page, the scope of documented members, and various display options for the generated documentation. ```APIDOC apexdox.engine.homePagePath: string - An absolute path to an HTML file containing the project's 'home page' markup. - Only markup inside `
` tags is used, or the entire content if it's a partial HTML page. - Default: `undefined` opexdox.engine.scope: string[] - An array of access modifier scopes to document. - Example: `[ 'global', 'public', 'protected', 'private', 'testMethod', 'webService' ]` - Default: `[ 'global', 'public', 'protected', 'private', 'testMethod', 'webService' ]` opexdox.engine.title: string - The value for the output HTML's `