SalesforceFoundation / ApexDoc

The latest java source for ApexDoc, a tool to document your Salesforce Apex classes.
BSD 3-Clause "New" or "Revised" License
229 stars 128 forks source link

Enums treated as properties, not separate item. #18

Open davidhabib opened 9 years ago

davidhabib commented 9 years ago

should they be in a separate section?

ceiroa commented 9 years ago

+1 to giving it a separate section.

davidhabib commented 9 years ago

The way Salesforce documents enums in the Apex Documentation, is they get their own page and table listing, where each value is listed along with a full description. For ApexDoc to support this, enums would need to be formatted something like:

/**
* @description contains possible actions for a trigger.
*/
public enum triggerAction {
/** @description value for the beforeInsert trigger event. */
beforeInsert, 
/** @description value for the beforeUpdate trigger event. */
beforeUpdate, 
/** @description value for the beforeDelete trigger event. */
beforeDelete,
// etc!! 
afterInsert, afterUpdate, afterDelete, afterUndelete}

none of the NPSP triggers are in this verbose format. they all are typically one one line like:

public enum triggerAction {beforeInsert, beforeUpdate, beforeDelete, afterInsert, afterUpdate, afterDelete, afterUndelete}

So I think this enhancement is low priority to implement. note that since the enum is listed as a property, the user can click on its signature and be taken to the actual enum declaration on the hosted source (ie, gitHub).