Editing attribute groups
There are 4 predefined groups (properties, styles, effects, and events). You can modify these groups to contain items
I have missed, or create your own groups. An attribute may be listed in more than one group.
Group table
This table lists the currently defined groups.
New...
This button allows you to define a new group. Groups must have unique names.
Delete
This button allows you to delete a group. A group that is used in your custom attribute order cannot be deleted.
Rename...
This button allow you to rename a group. A group that is used in your custom attribute order cannot be renamed.
Update default groups
This button adds attributes to the end of existing groups based on the default group definitions in the FlexFormatter plugin.
The idea is that if more attributes are added to the default groups, this is a way to update them. No attributes or groups
are deleted. The normal restore defaults behavior on the main preference page does not affect the group definitions.
Editing a group
To edit a group, select it in the group table. This will cause the attributes table to be populated with the list of
attributes in the group.
Attribute table operations
- Move up
Move the attribute up one slot in the list
- Move to top
Move the attribute to the first slot in the list
- Move down
Move the attribute down one slot in the list
- Delete
Remove the attribute from the list
- Add
Type in the text field and click this button to add a new attribute to the list
- Replace
Select an attribute in the list, modify it, and click this button to change the name in the list
Legal attribute names
Any legal attribute name may be typed here. Also, you can use Java regular expressions to define attributes.
See this link A simple example is xmlns:.* to match
all attributes starting with "xmlns".
Sorting/Wrapping
A group by definition can contain multiple members. So it makes sense to be able to control sorting and wrapping
within items matched by the group. Each group has its own setting.
Sorting
- Leave attributes in existing order
Attributes that are identified as part of the group keep the order they had prior to formatting, except that they are now all adjacent in the output.
- Sort attributes in ascending order
Attributes that are identified as part of the group are sorted and adjacent in the output.
- Sort attributes in group order
Attributes that are identified as part of the group are sorted according to the order in the group.
For example, you might alter the default group 'properties' to have id, x, y, width, and height at the top.
Those attributes would appear in that order in the output
Wrapping
- Keep attributes on same line
Don't add any line breaks, no matter how many attributes are in this group. This
makes sense if you always keep a tag on a single line, or if the group has a small number of attributes.
- Wrap attributes based on max line length
Wrap based on the max line length hint from the main MXML preference
page.
- Keep n attributes per line
Wrap every n attributes.
Check the "use defaults" box to use the setting on the main MXML preference page. Otherwise uncheck and specify an attr count that will be used only for this group.
- Use default wrapping scheme
Use the wrapping scheme on the main MXML preference page as the wrapping scheme
for this group. This option usually makes the most sense.