Skip to content

v2.1.0

Choose a tag to compare

@cesarParra cesarParra released this 23 Mar 14:37
· 476 commits to master since this release
8cd73b2

Groping support for class members

A class might have members that should be grouped together. For example, you can have a class for constants with
groups of constants that should be grouped together because they share a common behavior (e.g. different groups
of constants representing the possible values for different picklists.)

You can group things together within a class by using the following syntax:

// @start-group Group Name or Description
public static final String CONSTANT_FOO = 'Foo';
public static final String CONSTANT_BAR = 'Bar';
// @end-group

Groups of members are displayed together under their own subsection after its name or description.

Some notes about this functionality:

  • This is only supported on classes, NOT enums and interfaces
  • Supports
    • Properties
    • Fields (variables and constants)
    • Constructors
    • Methods
  • BUT only members of the same type are grouped together. For example,
    if you have a group that contains properties and methods the properties will be grouped together under Properties -> Group Name, and the methods will be grouped together under Methods -> Group Name
  • Does not support inner types (inner classes, interfaces, and enums)
  • It is necessary to use // @end-group whenever a group has been started, otherwise a parsing error will be raised for that file.