Attribute order examples
This document gives some examples of configuring the order of mxml attributes Here are the general rules:
- You can list attributes individually, or defined groups. These settings apply to all tags, so you'll need to factor that in.
- You can add line breaks before or after a set of attributes; if any of the attributes in the set exist, then all of the line breaks in that set will take effect. So it probably only makes sense to add line breaks at the beginning and/or end of a set. If you specify line breaks, then you are controlling the wrapping of attributes directly, irrespective of the default wrapping/sorting settings. Attributes not listed in your custom ordering will be sorted (if the checkbox is checked). Extra newlines after the last attribute (for instance, if all of the attributes for a tag are specified in your custom ordering) will be ignored. The tag ending will never be on a line by itself unless you check the box on the custom ordering page.
- You can also create a group to define a set of multiple attributes, either listed individually or specified with regular expressions. Each group has its own sorting order and wrapping specification.
Here are some examples to show how you would specify certain combinations of line breaks and sorting.