FlexFormatter AutoFormat
The FlexFormatter allows you to cause a Format or Indent operation to occur when an editor is saved. Operation for ActionScript and
MXML files can be controlled separately. Check the appropriate box and decide whether you want Format or Indent to occur.
Operations of either kind can be performed manually as needed.
Excluding files from AutoFormat
You can exclude files from auto (or batch) formatting by adding a regular expression to match
the workspace-relative path in the table on the preference page. For example, to exclude items in package
com.mycompany.adobePatches, you could add .*/com/mycompany/adobePatches/.* to the table. Note that you are
filtering based on a path (not a package), and that I canonicalize the paths to use forward slashes for
convenience, regardless of Operation System.
The rules are:
- Use a forward slash '/' as the path separator, regardless of operating system
- Use Java regular expression syntax to specify the mask. See http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html
Examples
all paths containing a package segment of "adobe"
.*/adobe/.*
Actionscript files that come from a third party with "org" package (notice the escaped period before the file extension)
.*/src/org/.*\.as
Formatting other file extensions as xml
You can also use the formatter as a helper for formatting xml-style files. In the extensions table, add other extension (ex. 'xml') that should be formatted/indented using the mxml pretty printer. CData sections are not formatted.