### 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 `` attribute and the header text for the sidebar's banner/logo section. - Default: `Apex Documentation` opexdox.engine.subtitle: string - The subtitle for the sidebar's banner/logo section. - Default: `Powered by ApexDox` opexdox.engine.showTOCSnippets: boolean - If set to `false`, hides the method's description snippet in the class's table of contents. - Default: `true` opexdox.engine.sortOrder: 'logical' | 'alpha' - The order in which class methods, properties, and inner classes are presented. - 'logical': Order they appear in the source file. - 'alpha': Alphabetically. - Default: `alpha` ``` -------------------------------- ### ApexDox Output and Filtering Settings Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Configures the output directory for generated documentation and specifies which files to include or exclude from the documentation process. ```APIDOC apexdox.engine.targetDirectory: string - The absolute path of the folder location where ApexDox documentation will be generated. - Default: `${workspaceFolder}/apex-documentation/` opexdox.engine.includes: string[] - A case-sensitive array of file names and/or wildcard patterns to include for documentation. - Supports simple leading and trailing wildcards (e.g., `"*TriggerHandler.cls"`, `"Contact*"`). - An empty array means all files are included. - Example: `[ "NotificationsEmailer.cls", "*TriggerHandler.cls", "Contact*" ]` - Default: `[]` opexdox.engine.excludes: string[] - A case-sensitive array of file names and/or wildcard patterns to exclude from documentation. - Supports simple leading and trailing wildcards (e.g., `"*TriggerHandler.cls"`, `"Contact*"`). - An empty array means no files are excluded. - Note: Files are excluded before they are included. Consider this when using 'includes' and 'excludes' together. - Example: `[ "NotificationsEmailer.cls", "*TriggerHandler.cls", "Contact*" ]` - Default: `[]` ``` -------------------------------- ### ApexDox Documentation Syntax Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Explains the JSDoc-like inline comment syntax used by ApexDox for documenting Apex code elements. ```APIDOC ApexDox Documentation Syntax (JSDoc-like): - General Structure: - Comments start with `/**` and end with `*/`. - Each line within the comment block should start with `*`. - Documentation Tags (`@Tags`): - `@param {Type} name Description`: Documents a method parameter. - `@return {Type} Description`: Documents the return value of a method. - `@throws {Type} Description`: Documents exceptions that a method might throw. - `@deprecated Description`: Indicates that a method or property is deprecated. - `@see {URL|Tag}`: Links to related documentation or code. - `@example Code snippet`: Provides usage examples. - Special Tokens: - `${workspaceFolder}`: A variable that resolves to the root directory of the current VS Code workspace. - Commenting Apex Elements: - Class Comments: - Document the class itself, its purpose, and any relevant information. - Example: ```apex /** * @description Manages user accounts and permissions. */ public class AccountManager { // ... } ``` - Method Comments: - Describe the method's functionality, parameters, and return values. - Example: ```apex /** * @description Retrieves a list of active users. * @param {Integer} limit - The maximum number of users to return. * @return {List<User>} A list of active User records. * @throws {System.LimitException} If the query exceeds governor limits. */ public List<User> getActiveUsers(Integer limit) { // ... } ``` - Property and Inner Enum Comments: - Document class properties and members of inner enums. - Example: ```apex /** * @description The unique identifier for the record. */ public Id recordId; public enum Status { /** @description Indicates the item is pending processing. */ PENDING, /** @description Indicates the item has been completed successfully. */ COMPLETED } ``` ``` -------------------------------- ### ApexDox Docblock Appearance Settings Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Controls the visual formatting of ApexDox comment block stubs, affecting alignment, the inclusion of the @description tag, and spacing between tags. These settings are applied when ApexDox generates stub comment blocks for documentation. ```APIDOC apexdox.docblock.alignItems: boolean - Vertically align anything after an ApexDox @tag. - Default: false apexdox.docblock.omitDescriptionTag: boolean - ApexDox '@description' tags are optional. Set this to false to include them in the comment block stub. - Default: true apexdox.docblock.spacious: boolean - When set to true, ApexDox comment block stubs will add an empty line after the description line and before the next tag. - Default: false ``` -------------------------------- ### ApexDox Comment Block Stubbing Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Details on how to auto-stub ApexDox comment blocks for efficient documentation, including the use of completion items. ```APIDOC Auto-Stubbing ApexDox Comment Blocks: - Command: ApexDox: Stub Comment Block - Purpose: Quickly generate a template for ApexDox comments for classes, interfaces, methods, properties, or enums. - Invocation: Place the cursor on the line directly above the code element and run the command from the Command Palette. - Completion Item: - Trigger: Type `/**` and press `Tab` when the completion prompt appears. - Functionality: Automatically generates a comment stub tailored to the surrounding Apex code structure. - Customization: The appearance and style of these comment stubs can be configured via VS Code settings. ``` -------------------------------- ### Apex Class Comment Structure Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Demonstrates the structure for class-level comments in Apex, including description, author, and since tags for revision history. These comments are located above any top-level type within a .cls file or above inner classes and interfaces. ```Apex /** * @description * A class that does cool things. * * @author John Smith <jsmith@example.org> * @since 2022-06-01 Created * @since 2022-07-02 Added cool things * * @author Jane Doe <jdoe@example.org> * @since 2022-06-03 Added a standard constructor * @since 2022-07-05 Fixed cool things */ ``` -------------------------------- ### Apex Property and Inner Enum Comment Structure Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/README.md Details the structure for property and inner enum comments in Apex. These blocks only support description tags and require explicit access modifiers or the 'static' keyword for detection by ApexDox. ```Apex /** * @description Simple description for a property or enum. */ ``` -------------------------------- ### Apex Method with @AuraEnabled Annotation Source: https://github.com/no-stack-dub-sack/apexdox-vs-code/blob/master/src/test/test-proj/src/Homepage.html This Apex code snippet defines a static method marked with the `@AuraEnabled` annotation, making it accessible from client-side controllers. It includes local variable instantiation and a debug log statement. ```apex @AuraEnabled public static void someMethod() { List<BotField> fields = new List<BotField>(); System.debug('Some debug statement'); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.