Commands - JJLongoria/aura-helper GitHub Wiki
Aura Helper has to many commands to execute several operations to make your work easy and faster.
-
AuraHelper: Implement Interfaces
Command to implement all missing methods from inherited interfaces
-
AuraHelper: Implement Extended Methods
Command to implement all missing methods from extended class
-
Command to compress one XML File
-
AuraHelper: Compress ALL XML Files
Command to compress All XML Files from the project or from one folder
-
Command to open the powerfull Aura Helper Package Generator tool
-
Command to open Aura Helper Permission Editor to edit Profiles, Permission Sets or Muting Permission Sets.
-
AuraHelper: Modify Permissions
Command to modify permissions from one Metadata type on several Profiles, Permission Sets or Muting Permission Sets.
-
AuraHelper: Retrieve Special Types
Command to Retrieve Special Types (Profiles, Translations, Record Types...) to the local project
-
AuraHelper: Metadata Comparator
Command to Compare the Metadata Types between Local project and Auth Org or between two Orgs.
-
AuraHelper: Custom Labels Editor
Command to open the Custom Label Editor to create, edit, delete and deploy Custom Labels from custom labels file.
-
AuraHelper: Repair Project Dependencies
Command to repair or check errors on Metadata Types dependencies on your project according the Downloaded Local types.
-
AuraHelper: Ignore Metadata from Project
Command to ignore any Metadata Type from the project. Use
.ahignore.json
to specify Metadata Types to ignore. -
Command to create any Aura File from a component
-
AuraHelper: Edit Aura Documentation Template
Command to edit the Aura Documentation Template to create Aura Documentation Automatically as you like.
-
AuraHelper: Generate Aura Documentation
Command to Create Aura Documentation file from the selected Aura Component based on the user defined template.
-
AuraHelper: Add Method Block to Aura Documentation
Command to add new method block documentation to the Aura Documentation file.
-
AuraHelper: Edit Apex Comment Template
Command to edit Apex Comment Template to create your own Apex Comments and tags.
-
AuraHelper: Create Project Documentation
Command to create the Project Documentation from Apex Code with the comments data. The comments must be the same structure of the template to analize it better.
-
AuraHelper: Add JavaScript Aura function
Simply command to add any aura function to the Controller or Helper file with a defined parameters number.
-
AuraHelper: Refresh All SObjects Definitions
Command to refresh all SObject Definitions used by Aura Helper to offer the best recomendations on IntelliSense.
-
AuraHelper: Refresh SObject Definition
Command to refresh only one SObject Definition used by Aura Helper to offer the best recomendations on IntelliSense.
-
AuraHelper: Clear Problems Panel
Command to clear the Problems Panel view with the Repair Dependencies erros when select only check errors.
Aura Helper make easy implements Interfaces on Apex Classes with a simple command. When you create a class with one or more implement interfaces, you can execute the command AuraHelper: Implement Interfaces to add automatically all methods from interfaces (Only add not existing methods on child).
Like with Apex Interfaces, Aura Helper can implement automatically all Abstract and Virtual methods from the parent Class with a simple command. When you create a class with a super class, you can run the command AuraHelper: Implement Extended Methods to implement automatically all methods from the super class (Only add not existing methods on child)
To change the XML format for only one Metadata XML file, you can run the command AuraHelper: Compress XML File with the XML file opened on editor, or can press right click
on the file in File Explorer and select the option AuraHelper: Compress XML File
Aura Helper always grant the same order into the XML files to make easy detect git changes and reduce conflicts. You can customize the order from Aura Helper Preferences with **Aurahelper › Metadata > Xml Sort Order**
setting
To change the XML format to all Project XML Metadata Files you can run the command AuraHelper: Compress ALL XML Files. If you want to compress all XML Files from any folder (and subfolders) you can press right click
on the folder in File Explorer and select the option AuraHelper: Compress ALL XML Files
Aura Helper always grant the same order into the XML files to make easy detect git changes and reduce conflicts. You can customize the order from Aura Helper Preferences with **Aurahelper › Metadata > Xml Sort Order**
setting
One of the most powerful and useful tools from Aura Helper is the Package Generator Tool becuase not only work with the Local or Org Metadata Types, also can merge several package files (and destructive without limit) to create one file by type or merge all into one file, but its most powerful quality is the ability to generate packages from GIT. In all cases, run the command AuraHelper: Package Generator to open the Package Generator Tool.
When open the Package Generator Tool you can see several options to choose to create the pacakge. If you do not select any option and press OK
, Aura Helper will be analize your Local Project and show your local Metadata Types to select manually to create the Package (or Destructive) file.
Metadata Icons:
-
: there is no element selected for that Metadata Type or Element.
-
: Has almost one element (or Subelement) selected for that Metadata Type or Element.
-
: Has all elements (and subelements) selected for that Metadata Type or Element.
To select all Meteadata Types press Select All
button . If you want to clear selection to unselect all elements, press
Clear Selection
button .
After select the Metadata Types to add to the package or destructive file, press Accept
button to show a summary of the selected objects (If you want to review before create the file)
From the Summary view, press Accept
button to see the options to create and save the Package or Destructive file:
- Use Wildcards: Select to use wildcards when apply, that is, when all elements (and subelements) from any Metadata Type are selected. In otherwise, Package Generator will be put all Metadata Types elements and subelements explicit on the file.
- Destructive Changes: Select this option to create a DestructiveChages XML file instead Package XML file.
- After Deploy: If you select Destructive Changes option to create the file, by default the generated DestructiveChanges file will be to delete data before deploy. If you want to delete data after deploy and create a DestructiveChangesPost file, select this option.
- Custom Folder: By default, the Package Generator tool create the files into the project manifest folder. If you want to create the files into another folder, select this options.
To create package from the Metadata Types in your Auth Org, you must select Download from Org option. Select only this option will be download data from the Org Namespace, if you want to download all Metadata Types (including Manage Types), you need to select Download All too.
Metadata Icons:
-
: there is no element selected for that Metadata Type or Element.
-
: Has almost one element (or Subelement) selected for that Metadata Type or Element.
-
: Has all elements (and subelements) selected for that Metadata Type or Element.
To select all Meteadata Types press Select All
button . If you want to clear selection to unselect all elements, press
Clear Selection
button .
After select the Metadata Types to add to the package or destructive file, press Accept
button to show a summary of the selected objects (If you want to review before create the file)
From the Summary view, press Accept
button to see the options to create and save the Package or Destructive file:
- Use Wildcards: Select to use wildcards when apply, that is, when all elements (and subelements) from any Metadata Type are selected. In otherwise, Package Generator will be put all Metadata Types elements and subelements explicit on the file.
- Destructive Changes: Select this option to create a DestructiveChages XML file instead Package XML file.
- After Deploy: If you select Destructive Changes option to create the file, by default the generated DestructiveChanges file will be to delete data before deploy. If you want to delete data after deploy and create a DestructiveChangesPost file, select this option.
- Custom Folder: By default, the Package Generator tool create the files into the project manifest folder. If you want to create the files into another folder, select this options.
The Package Generator Tool also can create both files (Package and Destructive) from GIT. Aura Helper can analize all GIT changes from two commits
, branches
or tags
to create the most precise package with detected changes.
Aura Helper can detect changes with very high precission, including changes on Metadata types into other files. For example, if you create or delete one custom label from the file. Aura Helper can detect the label and will be add into the package or destructive file.
IMPORTANT
Source always must be the old code and Target the new code to detect all changes correctly. If you select wrong source or target, Aura Helper can create a really wrong packages.
The Package Generator tool wil be able to the user to select only exists sources, that is, if the project has no tags, Aura Helper don't show tags to select. If you can't see all created tags, branches or commits, press Fetch
to update your local GIT Database.
After select source and Target and press Accept
button to show the Create Options:
- After Deploy: If you select Destructive Changes option to create the file, by default the generated DestructiveChanges file will be to delete data before deploy. If you want to delete data after deploy and create a DestructiveChangesPost file, select this option.
- Ignore File: To prevent to include into the package or destructive files some Metadata Types, you can create an Ignore File into your project root, and select this option to use it to exclude the specified Metadata Types on ignore file from the generated files.
- Custom Folder: By default, the Package Generator tool create the files into the project manifest folder. If you want to create the files into another folder, select this options.
If you has to many package files from little deployments, and need to merge all into one file to deploy all components from the other packages (or any other purpose), Aura Helper can help to you to do this task.
When you select the package and/or destructive files to merge, you can see all selected files and can press Accept
button to show the Merge Options:
- Merge By Type: This option will be merge all files selected file into one file by type, that is, if you choose three package files, two destructiveChanges and four destructiveChangesPost, Aura Helper will be create only one Package file with the package files data, one destructive Changes file with the destructiveChanges files and the same with destructiveChangesPost.
- Merge Full Packages: With this options, all files will be merge into one Package file, including the data from destructiveChanges files.
- Merge Full Destructive Before: With this options, all files will be merge into one DestructiveChanges file to delete before deploy, including the data from Package files.
- Merge Full Destructive After: With this options, all files will be merge into one DestructiveChangesPost file to delete after deploy, including the data from Package files.
When you choose any Merge option, you cann chose a Custom Folder to save, or save the generated files into de project manifest folder.
To simplify modify permissions without errors from VSCode (not from Salesforce Interface), Aura Helper provide the Permission Editor Tool to edit any permission file (Profiles, Permission Sets and Muting Permission Sets). This tool can work with all permissions API Verion, for example, if you work with API 45.0, the Permission Editor Tool only will show and modify the permissions available on API 45.
To use the Permission Editor Tool can execute the command AuraHelper: Permission Editor with the permission file opened on the editor, or press right click
on the permission file from File Explorer and select AuraHelper: Permission Editor option.
The permission editor tool has the same behaviour than salesforce with fields validations and controlled fields. For example, if you choose ModifyAll permission to one object, Aura Helper will select Automatically the Read, Create, Edit and ViewAll Permissions like Salesfoce (works equals if you unselect permissions)
If the Permission Editor tool allow to the user to edit the permissions files, the Modify Permissions tool allow to the user to modify the permissions from any available Metadata Types. For example, in Permission Editor you can edit one permission to edit one or several Apex Classes permissions to the selected file. With the Modify Permissions tool yo can choose one Apex file to modify permissions on one or several permissions files.
To use the Modify Permissions Tool can execute the command AuraHelper: Modify Permissions with the any file to edit permissions opened on the editor, or press right click
on the file from File Explorer and select AuraHelper: Modify Permissions option.
Like the Permission Editor, the Modify Permissions tool has the same behaviour of Salesfoce with validations and controlled fields. For example, if you choose ModifyAll permission to one object, Aura Helper will select Automatically the Read, Create, Edit and ViewAll Permissions like Salesfoce (works equals if you unselect permissions)
Some Metadata Types like Profiles, Permission Sets, Record Types or Translations among others are created by Salesforce on runtime when retrieve it to your local project, according the Metadata Types included into the Package XML files. With this comand you can retrieve only the Custom Objects XML File too. This command is specially desgined to work with GIT but can be useful in other use cases.
Work with this Metadata Types can be horrible in some cases, specially if you work with GIT and need to maintance branches integrity only with the modified data for the feature, and not include other information from other features when you retrieve the data to your local project. To make it easy, you can run the command AuraHelper: Retrieve Special Types to choose the Metadata Types to retrive, and Aura Helper will retrieve only the selected Metadata Types with the selected information, and do not affect to other Metadata Files. For example, you can retrieve the entire profile data to the selected profiles without retrieve ApexClasses, CustomObject, CustomFields....
Metadata Icons:
-
: there is no element selected for that Metadata Type or Element.
-
: Has almost one element (or Subelement) selected for that Metadata Type or Element.
-
: Has all elements (and subelements) selected for that Metadata Type or Element.
To select all Meteadata Types press Select All
button . If you want to clear selection to unselect all elements, press
Clear Selection
button .
After select the Metadata Types to retrieve, press Accept
button to show a summary of the selected objects (If you want to review before retrieve). From the Summary view, press
Accept
button to see the option to choose to Compress all affected XML Files.
IMPORTANT
This command can take several minutes, depends to your Internet connection, your Salesforce Environment among other variables.
To retrieve the data that you need, this command has three different options to choose the better to you in any case:
From Local: This option only will be retrieve the data stored in your local project, without include other information from the org, that is, Aura Helper will be show only the special types in your local project, and only include information from the local files.
For example, if you only has Profiles and RecordTypes in your local project as special types, Aura Helper only show Profiles and RecordTypes to choose, and only show the Profiles and RecordTypes stored in your local project. If you choose some Profiles to retrieve, and you only has ApexClasses, Visualforces and CustomObject into your local project, Aura Helper only will include the information about the ApexClasses, Visualforces and Objects stored in your local project.
From Org: Unlike the "From Local" option, if you choose retrieve From Org, Aura Helper will be show all available Special Types into your Auth Org and will be include all related data from the Auth org, ignoring the Metadata Types in your local project.
For Example, if you choose retrieve From Org, Aura Helper wil be show all available Special Types to Retrieve and if you chosee some profiles, Aura Helper will be include all related Data from the org with the selected profiles. (ApexClasses, Visualforces, RecordTypes, Layouts, CustomFields, CustomObjects...)
Mixed: The Mixed option is merge between "From Local" and "From Org" options because only will be show the Special Types stored in your local project, but will be include all data from the Auth Org, ignoring the local project data.
For Example, if you only has Profiles and RecordTypes in your local project as special types, Aura Helper only show Profiles and RecordTypes to choose, and only show the Profiles and RecordTypes stored in your local project. If you choose some profiles to retrieve, Aura Helper will be include all related information from the Org, not from the local project. (ApexClasses, Visualforces, RecordTypes, Layouts, CustomFields, CustomObjects...)
Aura Helper not only works with any Salesforce project, it is also specially prepared to work with GIT and Salesforce, Devops and Continuous Integration and has many tools designed to maintain the integrity of the project and / or organizations. The Metadata Comparator Tool is one of those tools.
With The Metadata Comparator Tool you can compare the Metadata Types between your local project and your auth org, or compare the Metadata Types between two orgs (Must be authorized in the system). To use this tool, execute the command AuraHelper: Metadata Comparator.
Metadata Icons:
-
: there is no element selected for that Metadata Type or Element.
-
: Has almost one element (or Subelement) selected for that Metadata Type or Element.
-
: Has all elements (and subelements) selected for that Metadata Type or Element.
To select all Meteadata Types press Select All
button . If you want to clear selection to unselect all elements, press
Clear Selection
button . Also you can delete the selected data from the Org with the button
Delete
If you to retrieve the data to your local project, press Accept
button to show a summary of the selected objects (If you want to review before retrieve). From the Summary view, press
Accept
button to see the option to Retrieve the selected Metadata Types to your local project. Only can retrieve metadata when compare Local and Org.
The Metadata Comparator Tool has two options two compare Metadata Types:
- Compare Local and Org: This option will compare yout local project Metadata Types with the auth org Metadata Types to show the Metadata Types that exists on your Auth org but do not exists on yout local project. This option only will be compare the existing Metadata Types into your local project, that is, if you only has Apex Classes and Triggers into your local project, only compare ApexClasses and Triggers from the Auth org.
- Compare Different Orgs: With this option you can choose between two different org authorized in the system to compare the Metadata Types from the Orgs. When select this option, you can choose one Org as source and another as target to compare. The result are the Metadata types that exists on the source, but no exists on the target org.
To simplify work with Custom Labels from VSCode and working faster with less errors, Aura Helper implements the Custom Labels Editor to edit the Custom Labels file from VSCode with a graphic interface and the same Salesforce validations.
IMPORTANT
To work with this tool you need to download the Custom Labels to your local project
To use this tool you can press right click
on the custom labels file in File Explorer and select the option AuraHelper: Custom Labels Editor or can run the command AuraHelper: Custom Labels Editor on any moment.
you can create a new label with Add
button , Select any label to edit, or delete the selected label from the file and Org with
Delete
button
After create or modify labels, press Accept
button to show a summary of the modified labels (If you want to review before save).
From the Summary view, press Accept
button to see the save options:
From the Summary view, press Accept
button to see the save options:
- Compres: Select this option to compress the Custom Labels file.
- Deploy to Org: If you want to deploy the created or edited labels, select this option.
To help developers to maintenance local project integrity (specially if work with GIT), Aura Helper can check or repair dependencies errors on your local project, but only work with local data, without connect with your org.
To Check or Repair dependencies, only need to run the command AuraHelper: Repair Project Dependencies and Aura Helper will show the options to check or repair and all supported metadata types from your local project. Aura Helper can repair all XML Files that reference any Metadata Type (like profiles, custom applications and other types, about 80 Metadata Types).
Metadata Icons:
-
: there is no element selected for that Metadata Type or Element.
-
: Has almost one element (or Subelement) selected for that Metadata Type or Element.
-
: Has all elements (and subelements) selected for that Metadata Type or Element.
To select all Meteadata Types press Select All
button . If you want to clear selection to unselect all elements, press
Clear Selection
button .
After select the Metadata Types to repair, press Accept
button to show a summary of the selected objects (If you want to review before repair). From the Summary view, press
Accept
button to see the option to choose to Compress all affected XML Files if you select Repair, or to see the errors on the problems panel if you chosse Check Errors.
When you run the command, Aura Helper will show to you two options to handle dependencies:
- Repair: With this option, Aura Helper will be analize all files from the selected Metadata Types, and will try to repair automatically all files.
- Check Errors: This option is to check if has dependencies errors on your project and will show to you on the problems panel and highlight the files and lines with errors.
Like other tools, the Ignore Metadata Tool will be useful when working with GIT, or to maintenance your project integrity.
Like the .gitignore or .forceignore files, Aura Helper has own
.ahignore.json
file to ignore the Metadata Types from the project (the ignore file can be used in other tools like package generator). To understand the ignore file format, see Ignore File page.
To ignore Metadata Types and elements from the project, you need to create at least one .ahignore.json
to use it, but does not required has in your projecr root folder because you can select any ignore file (with any name, only need has the correct format). With your .ahignore.json
file created, run AuraHelper: Ignore Metadata from Project to ignore metadata Types. To use the Project Ignore File the project must has a file named .ahignore.json
into the root project folder (like .gitignore).
Aura Helper will show to you all Metadata Types on the ignore file, to choose if ignore all or want to ignore only some Metadata Types. After select Metadata Types, press OK
to show Compress option to compress all affected files.
The Ignore Metadata Tool not only can ignore Metadata Type files like CustomObject, CustomFields, ValidationRules, Layouts... also can ignore Metadata Types into other files like some Custom Labels from CustomLabels file, or WorkflowRules, WorkflowAlerts... from Workflow file.
Ignore Metadata from project means delete the Metadata Types files or modify files to remove Metadata Types (like labels)
Aura Helper can create any file from Aura Components easy with only one command. To create Aura files, press Right Click
on any Aura Component folder and select AuraHelper: New Aura File option. Aura Helper will analize the Aura Component Bundle files and show only the not exists files to create.
Aura Helper has to many tools to help to developers to documenting any project easy. One of these tools is the the Aura Documentation Template to define an Aura Documentation file template to create Aura Documentation with a simple command.
To edit the Aura Documentation Template, run the command AuraHelper: Edit Aura Documentation Template and Aura Helper will open the template file into the editor, to allow the user to create and edit the Aura Template.
The Aura Template Documentation to create documentation automatically has the next format and the template content lines bust be HTML
or Aura
languages and can be use reserved keywords to replace data:
{
"documentBody": [ // Represent main template lines
"Line 1 Content",
"Line 2 Content",
"Line 3 Content",
"...",
"Line N Content"
],
"methodBody": [ // Method body template lines
"Line 1 Content",
"Line 2 Content",
"Line 3 Content",
"...",
"Line N Content"
],
"paramBody": [ // Method param body template lines
"Line 1 Content",
"Line 2 Content",
"Line 3 Content",
"...",
"Line N Content"
],
"returnBody": [ // Method return body template lines
"Line 1 Content",
"Line 2 Content",
"Line 3 Content",
"...",
"Line N Content"
]
}
To customize the template, Aura Helper has to many keywods to replace it to the respective data:
- Description Body Tags: To use into the Description Body template, Aura Helper implements the next tags (Other tags does not take effect in this section):
{!controllerMethods}
- Use this tag to replace it to the controller method generated body based onmethodBody
template.{!helperMethods}
- Use this tag to replace it to the helper methods generated body based onmethodBody
template.
- Method Body Tags: To use into the Method Body template, Aura Helper implements the next tags (Other tags does not take effect in this section):
{!method.description}
: Tag to replace it to the method description. Aura Helper can get the method description from JavaScript comments.{!method.auraSignature}
: Tag to replace it to the method Aura signature.{!method.signature}
: Tag to replace it to the standard method signature.{!method.name}
: Tag to replace it to the method name.{!method.params}
: Tag to replace it to the method params generated body based onparamBody
template.{!method.return}
: Tag to replace it to the method params generated body based onreturnBody
template.
- Param Body Tags: To use into the Params Body template, Aura Helper implements the next tags (Other tags does not take effect in this section):
{!param.description}
: Tag to replace it to the param description. Aura Helper can get the params description from JavaScript comments.{!param.name}
: Tag to replace it to the method param name.{!param.type}
: Tag to replace it to the method param datatype
- Return Body Tags: To use into the Return Body template, Aura Helper implements the next tags (Other tags does not take effect in this section):
{!return.description}
: Tag to replace it to the return description. Aura Helper can get the return description from JavaScript comments.{!return.type}
: Tag to replace it to the method return datatype
{
"documentBody": [
"<aura:documentation>",
"\t<aura:description>",
"\t\t<h6><b>Short description</b> of the component</h6>",
"\t\t<p>",
"\t\t\tHelper methods:",
"\t\t\t<ul>",
"\t\t\t\t{!helperMethods}",
"\t\t\t</ul>",
"\t\t</p>\n",
"\t</aura:description>",
"\t<aura:example name=\"ExampleName\" ref=\"ExampleComponent\" label=\"ExampleLabel\">",
"\t\t",
"\t</aura:example>",
"</aura:documentation>"
],
"methodBody": [
"<li>",
"\t<b>{!method.signature}: </b> {!method.description}",
"\t<ul>",
"\t\t{!method.params}",
"\t<ul>",
"\t\t{!method.return}",
"\t</ul>",
"</li>"
],
"paramBody": [
"<li><i>{!param.name}<i> ({!param.type}): {!param.description}</li>"
],
"returnBody": [
"<li><i>{!return.type}<i> {!return.description}</li>"
]
}
To make easy the project documentation task, Aura Helper has the command AuraHelper: Generate Aura Documentation to create the Aura Documentation file from Aura Components easy based on used defined template to addapt the documentation to the project style.
To create the Aura Documentation you can open the Aura Documentation from the Aura Component and run the command AuraHelper: Generate Aura Documentation or can press right click
on Aura Component file an choose the option AuraHelper: Generate Aura Documentation.
When you run the command AuraHelper: New Aura File, Aura Helper will created the Aura Documentation file with the documentation content based on the template.
To make this task faster, you can write comments on JavaScript function with the JavaScript standard comment style and Aura Helper extract the information from the comments to include automatically into the Aura Documentation.
To update Aura Documentation easy when add new methods, you can add new Method documentation blocks to Aura Component easy and faster. Only need to go to the line to add the new method block, and run the command AuraHelper: Add Method Block to Aura Documentation. Aura Helper will show the controller and helper file to choose (if exists). When choose the file, Aura Helper show the available methods on the file to choose the method to put it on Documentation file.
Aura Helper implements the most complete comment system for Apex Code to documenting the code and write comments with customized styles. (Aura Helper also understand the JavaDoc standard comments). You can define your own comment template to create comments automatically with the template style.
You can create your own customized tags and can choose different datasources to the tags to replace it automatically on comments and project documentation. To Create or update your comment template, run the command AuraHelper: Edit Apex Comment Template and Aura Helper open the template on editor to modify.
The Apex comment template is a JSON object with different section to define the tag symbol, the section to your custotm tags and the section to define the templates:
Main JSON body schema:
Key Datatype Description tagSymbol String
Represent the general tag symbol to use in all tags tags Object
Tag section. In this section you can definne your custom comment tags comments Object
Comment templates section. In this section you can define the comments template for classes, methods, constructors... and the available tags to every comment
Represent the custom tags collection. Every key must be the name of the tag.
Key Datatype Description tagName Object
Represent every custom tag created by the user. The value must be the name of the tag. For example: author
to create a tag name author
Represent every custom tag created for comments.
Key Datatype Description equalsTo String
If you create two or more tags that are equals to other tag (synonyns). Put the name of the main tag here. Not Required
symbol String
You can define your custom symbols for each tag. Not Required
, if not defined, get the general tagSymbolkeywords Array<Object>
The tags can have keywords to put or replace it to the selected datasource data. Required
except if equalsTo has valuetemplate String
Every tag has a template to replace it into the comments. Define the template in this field. Required
except if equalsTo has valuemultiple Boolean
True if the tag can has multiple occurences in the same comment, like method params, author tags..., false in otherwise. Required
except if equalsTo has valueanywhere Boolean
False if the tag must be start into new line (like params, author...). True if the tag can be writed everywhere in the comment. Required
except if equalsTo has valuesource String
The Datasource group to the tag. You has several datasources to replace each tag and keywords with the selected data. Required
except if equalsTo has value
Represent every keyword to define to each tag.
Key Datatype Description name String
The name of the keyword to put into the tag template and put or replace with data source into the apex comment. Required
source String
Keyword Datasource. The selected datasource must be contained into the selected datasource tag group. For example, params datasource group contains name, type and input as datasource. If you select params source group as datasource to the tag, only can select name, type and input as datasource for every tag keyword. Not Required
message Array<Object>
The message to put into the tag when replace it on the comments if you select input datasource or the selected datasource has no data. If message is not defined, the keyword name will be used with the same purpose. Not Required
Represet each Apex Node comment template and the available tags to use on each node.
Key Datatype Description nodeName Object
Represent each Apex Node to define its custom comment template. Each element key must be the Apex Node name. The available nodes are: class, interface, enum
,method
,constructor
,variable
,property
,static_constructor
andinitializer
. At least, you must define class, method and variable templates. The rest of nodes will be use the Required templates if not has its own template. For example, if you not defined constructor template, the method template will be used insted. interface and enum will use class template if not has own. The same with static_constructor, initializer and constructor that use method template if not has own. property will be use variable node if not has its own.
Represent every Apex Node comment template lines and available tags for each node
Key Datatype Description tags Array<String>
String array with the available tags names to the Apex Node template Array<String>
String array with every template line to create the comments. In addition to the keywords defined in each tag, you can out into the templates a master keyword {!description}
to use to put the method, class, enum... description
Aura Helper has several datasources to the comments to create the best apex comment system and adapt comments better to every project styles and requirement.
Datasource Description Group user.name Git User name defined into GIT config file git
user.email Git User email defined into GIT config file git
author.name Git Author name defined into GIT config file git
author.email Git Author email defined into GIT config file git
committer.name Git Commiter name defined into GIT config file git
committer.email Git Commiter email defined into GIT config file git
branch Git Commiter name defined into GIT config file git
input Special source name to allow the user to write data on the keyword position git
Datasource Description Group username Salesforce Auth Org Username salesforce
alias Salesforce Auth Org Alias salesforce
instance Auth Org Instance URL salesforce
input Special source name to allow the user to write data on the keyword position salesforce
Datasource Description Group input Allow to the user to write data user
Datasource Description Group file File absolute path path
folder File directory absolute path path
root Project Root absolute path path
input Special source name to allow the user to write data on the keyword position path
Datasource Description Group file Parent Class or Interface file absolute path parent
folder Parent Class or Interface file directory absolute path parent
input Special source name to allow the user to write data on the keyword position parent
This datasource is only available to use on variable or property comment templates, in otherwise does not take effect and not will be replaced.
Datasource Description Group name Variable or Property name variable
type Variable or Property datatype variable
input Special source name to allow the user to write data on the keyword position variable
This datasource is only available to use on method comment template, in otherwise does not take effect and not will be replaced.
Datasource Description Group type Method return datatype return
input Special source name to allow the user to write data on the keyword position return
This datasource is only available to use on method and constructor comment templates, in otherwise does not take effect and not will be replaced.
Datasource Description Group name Method or Constructor parameter name params
type Method or Constructor parameter datatype params
input Special source name to allow the user to write data on the keyword position params
{
"tagSymbol": "",
"tags": { // Tags Object
"tagName": { // Tag Object
"equalsTo": "",
"symbol": "",
"keywords": [ // Keywords Array
{ // Keyword Object
"name": "",
"source" "",
"description": ""
}
],
"template": "",
"multiple": boolValue,
"anywhere": boolValue,
"source": ""
},
},
"comments": { // Comments Object
"class": { // Comment Object
"tags": [], // Available tag names
"template": [] // Template lines
},
"interface": {
"tags": [],
"template": []
},
"enum": {
"tags": [],
"template": []
},
"method": {
"tags": [],
"template": []
},
"constructor": {
"tags": [],
"template": []
},
"variable": {
"tags": [],
"template": []
},
"property": {
"tags": [],
"template": []
}
}
}
{
"tagSymbol": "@",
"tags": { // Tags Object
"author": { // Define an author tag
"equalsTo": "",
"symbol": "",
"keywords": [
{
"name": "name", // Keyword name
"source": "username", // username datasource from Salesforece group
"message": "Put the Author name" // Message if has no data into datasource
}
],
"template": "{!name}", // Template to replace. (name will be replace with salesforce username or keyword name message)
"multiple": true,
"anywhere": false,
"source": "salesforce" // User Salesforce datasource group
},
"param": { // Define a param tag
"equalsTo": "",
"symbol": "",
"keywords": [
{
"name": "name", // Keyword name
"source": "name", // method param name datasource
"message": "Parameter name" // Message if has no data into datasource
},
{
"name": "type", // Keyword name
"source": "type", // method param datatype datasource
"message": "Parameter datatype" // Message if has no data into datasource
},
{
"name": "description", // Keyword name
"source": "input", // method param description datasource
"message": "Write the parameter description" // Message if has no data into datasource
}
],
"template": "{!name} ({!type}): {!description}", // Template to replace. (name will be replace with param name, type with datatype and and description with the keyword message and allow the user to write data)
"multiple": true,
"anywhere": false,
"source": "params" // Params datasource group
},
"params": { // Define a params tag
"equalsTo": "param" // equals to param tag (synonym)
},
"version": { // Define a version tag
"equalsTo": "",
"symbol": "",
"keywords": [
{
"name": "value",
"source": "input",
"message": "Version number"
}
],
"template": "{!version}",
"multiple": true,
"anywhere": false,
"source": "user"
},
"return": { // Define a return tag
"equalsTo": "",
"symbol": "",
"keywords": [
{
"name": "type",
"source": "type",
"message": "Return datatype"
},
{
"name": "description",
"source": "input",
"message": "Write the return description"
}
],
"template": "{!type}: {!description}",
"multiple": false,
"anywhere": false,
"source": "return"
},
...
...
...
...
// Define all tags that you need
},
"comments": { // Comments Object
"class": { // Class comment Object
"tags": [ // Available tag names
"author",
"version",
// add all available tags for class node
],
"template": [ // Template lines
"/**",
" * {!description}", // all comments has master {!description} keyword to replace it to the class, method or other node description
" *",
" * {!tag.author}",
" * {!tag.version}",
" */"
]
},
"method": { // Method comment Object
"tags": [ // Available tag names
"author",
"version",
"param",
"params",
"return"
],
"template": [ // Template lines
"/**",
" * {!description}",
" *",
" * {!tag.param}",
" *",
" * {!tag.return}",
" */"
]
},
"variable": { // Variable comment Object
"tags": [ // Available tag names
"author",
"param",
"params",
],
"template": [ // Template lines
"/**",
" * {!description}",
" *",
" */"
]
}
}
}
Aura Helper can create a navigable HTML Documentation from the entire Apex Code quickly with one command. Run AuraHelper: Create Project Documentation command to create it.
Aura Helper will be use the defined template to extract data from the comments to add to documentation. If any comment does not match with the template, generated documentation will be contains errors with some description and data.
Aura Helper can detect all Apex Class types to organize documentation by all classes and classes by type, like test classes, scheduled, REST classes. Also has links on datatypes to redirect to the apex classes or salesforce system classes documentation.
To create Aura function with N parameters quickly, Aura Helper has the command AuraHelper: Add JavaScript Aura function. When run this command, Aura Helper show an input box to select the parameters number to craete the function.
To provide the best Intellisense sugestion for SObjects (including Query Intellisense or Hover information about other intellisense options) you must refresh the Aura Helper SObjects Definition at least once. To refresh the SObject Definitions run the command AuraHelper: Refresh All SObjects Definitions.
To make easy this task, Aura Helper has the setting Aurahelper > Metadata > Referesh SObject Definitions On Start to refresh the not existing object definitions when start VSCode to maintance updated the SObject Definitions. If you has SObjects folder into your local folder, Aura Helper will get the data from these objects and not will refresh it on start. But when execute the command, Aura Helper will be refresh all SObjects Definitions from the Auth Org.
Refresh All SObjects Definitions will download all Custom and Standard SObjects, but not History, Apex Classes or other Configuration or Queriable objects. If you need to refresh other SObjects Definition that Custom or Standard, run AuraHelper: Refresh SObject Definition command to select the SObject to refresh.
Aura Helper is optimized to multi core CPUs, that is, more CPU cores, more speed to refresh or downloads SObjects or Metadata from Salesforce. (The Internet connection speed is important too)
If you want to refresh only one SObject Definition, Custom or Standard or need to refresh other SObjects definitions like configuration objects, history objects, apex classes or other Queriable objects, run the command AuraHelper: Refresh SObject Definition and choose the SObject to refresh.
To clear the problems panel when Check Dependencies errors, run the command AuraHelper: Clear Problems Panel to delete all Aura Helper dependencies error from the panel.