no-stack-dub-sack / apexdox-vs-code

A lightweight VS Code extension that makes documenting your Salesforce Apex files an easy, integrated experience.
Other
49 stars 7 forks source link

Suggestion: Allow forcing new-line in @description comments #23

Closed jarodwsams closed 3 years ago

jarodwsams commented 3 years ago

I was just recently shown this add-in and I really appreciate the work. One thing that I think would be useful is the ability to force new-line and/or bullets in the @description tag. I've got an example below of where this would be helpful.

You'll note that the Class_Name_1 and _2 mentioned in the description block are also referenced as @see tags. I'm trying to annotate why those references are important.

/**
 * This class is used by Chatbot to create Dynamic Choice Menus for the customer to interact with.
 * The specific dynamic menu this class creates allows the customer to select the desired case that has already been created against their order,
 *   as specified by the `[variable]` value provided by the customer.
 * 
 * [ClassName_1] creates the Custom_Object__c records retrieved and displayed by this class
 * [ClassName_2] takes the selected Custom_Object__c record and extracts the [field]
 *
 * @author some schmuck
 * @group some group
 * @since some date
 * @see [ClassName_1]
 * @see [ClassName_2]
 */

image

no-stack-dub-sack commented 3 years ago

Hi @jarodwsams, so sorry for the late reply on this.

Actually, we do already have a way to force new lines inside any multi-line tag. See the special tokens section of the README.

If you use a <br /> tag inside the description, you can force a new line in between your comments. For example:

/**
 * This class is used by Chatbot to create Dynamic Choice Menus for the customer to interact with.
 * The specific dynamic menu this class creates allows the customer to select the desired case that has  
 * already been created against their order,  as specified by the `[variable]` value provided by the customer.
 * <br /><br />
 * [ClassName_1] creates the Custom_Object__c records retrieved and displayed by this class
 * <br />
 * [ClassName_2] takes the selected Custom_Object__c record and extracts the [field]
 *
 * @author some schmuck
 * @group some group
 * @since some date
 * @see [ClassName_1]
 * @see [ClassName_2]
 */

Also, if you want the ability to link to classes inline inside your descriptions, you can use the {@link} syntax, which I find to be more helpful sometimes than @see. This is also documented in the section listed above.

Again, sorry for the late reply! Please feel free to reopen if you still think there's a need for this to be addressed further.