Skip to content

VSCode Extension To Produce Various File Header (Comments) for Files Associated with Salesforce

License

Notifications You must be signed in to change notification settings

garethknight/sfdx_autoheader

 
 

Repository files navigation

SFDX Autoheader ~ Alpha

License: MIT

Important

Based on ️️☁️ Salesforce Documenter ~ Beta ☁️

This extension depends on the official Salesforce Extensions for VSCode for language support.

Summary

This project was extended by Gareth in order to insert standard Salesforce SE Disclaimer, please see below for local packaging and install instructions

Salesforce Documenter aims at facilitating proper and structured code documenting for Salesforce-related files, by automating related tasks such as File Header Insertion & Update, as well as Method Header insertion.

Salesforce Documenter can be adopted as a project-wide and/or team-wide standard, in an effort to encourage and eventually enforce proper code documenting.

Through these means, code becomes easier to understand, maintain, and evolve.

Local Packing and Install Instructions

  1. Update package.json file with new version number
  2. run vsce package in the local project directory
  3. run code --install-extension ".vsix file name" to install the extension locally

Features

  • Add a method header to any Apex method, with JavaDoc-Like tags to be completed with the method's and contextual details

Method Header Demo

  • Add/Update a header to any Salesforce file (Apex, Visualforce, Aura, LWC, JavaScript)

File Header Demo

Commands

Command Description Applies To
SFDoc: Generate Apex Method Header Place cursor on the first line of a method declaration. Insert a method header based on the method's signature. Apex Methods
SFDoc: Insert File Header Insert a file header at the top of the current file, if it doesn't already include one. Apex, Visualforce, HTML, JavaScript

Settings

Property Description
SFDoc.username Username that will appear in File and Method headers.
SFDoc.EnableForApex Enable automatic on-save file header insertion and update for Apex classes
SFDoc.EnableForVisualforce Enable automatic on-save file header insertion and update for Visualforce pages
SFDoc.EnableForLightningMarkup Enable automatic on-save file header insertion and update for Lightning Markup files
SFDoc.EnableForLightningJavascript Enable automatic on-save file header insertion and update for Lightning JavaScript files
SFDoc.IncludParameterTypeInMethodHeader Include Param Types as well as name in method header

About

VSCode Extension To Produce Various File Header (Comments) for Files Associated with Salesforce

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 64.0%
  • JavaScript 35.7%
  • Other 0.3%