August 8th, 2011· New Features
· New option to not add line breaks for single-line functions. This applies to functions that are already on a single line and don't contain any code blocks in their bodies. On the Actionscript 'tweaks' page.
· Fixes
· Fixed "remove unused namespaces" to discover namespace uses when they are only used on an attribute. Someone sent me an example where 'fb' was used that way.
August 1st, 2011New Features:
· Arranging the order of MXML elements inside the Application tag. There's a new "MXML Rearranging" tab that works similarly to the "AS Rearranging" tab.
Fixes:
· Fixed regression where the "Rearrange code" command/toolbar icon had no affect on .mxml files.
June 21st, 2011· Added setting to not indent the 'case' keyword for switch statements. On the Actionscript 'tweaks' page. This probably only makes sense for 'cuddled' braces.
· Extended the semantics of 'No newlines before break/continue/expressions' settings to include 'else' and loops. These options are buried under the 'Braces/Line breaks' section.
· Added option to not indent the closing tag if it has been forced to a newline in mxml. This is on the "Custom attribute order" dialog.
· Added option to control spaces around equals in metatags. On Actionscript 'tweaks' page.
· Added ability to associated getters and setters without requiring the sort option. This is in the ActionScript Rearranging settings. Should work for both simple settings and creating advanced member selectors.
April 12th, 2011New Features:
· Now a setting to control breaking before or after operators
· Setting under "Advanced wrapping" to wrap each (every) argument to a function call if the maximum line length is reached
· Ditto for parameters in function declarations
· Options to wrap arrays with or without alignment
· Options to wrap object declarations with or without alignment
· New command (toolbar icon and option in mxml prefs) to remove unused namespace declarations in mxml files.
Fixes:
· One regression introduced in 0.8.1 for specifying a charset when running from the command line.
November 10th, 2010New Features:
· Options for mxml/as to preserve relative indent of lines inside multiline comments (see tweaks)
· Added 'other' category to mxml attribute ordering; allows placement of extra attributes in middle of attribute list
Fixes :
· parser didn't properly handle metadatas with qualified names (ex. [MessageHandler(selector = MessageChannel.PNL)]
· A few parser bugs around :: operator where I cleaned up the parser.
August 26th, 2010· New Features
· Option to align '=' in variable declarations (on Tweaks preference page)
· Option to add braces to cases in switch statements (on Tweaks preference page).
· Option to add blank lines before 1st import in package scope.
· Example code in preference page is now editable (there's a new checkbox above each text area). It won't stick between invocations, but you can paste in the current file you are editing or add particular syntax to see the effects of changing settings.
· Option to control spaces inside the binding braces in mxml attributes
· Option to 'format' the bound variables inside mxml attributes. Will add spaces inside method parens, for example.
· Option to leave whitespace between the end of a line and a comment on the line (either // or /* */)
· Fixes
· Bug with rearranging ActionScript within MXML code. In some cases, an error dialog will pop up indicating an internal error. This is annoying, although the code will end up formatted correctly anyway.
· Vector initializers not supported (ex. var v:Vector.=new [1,2,3];
August 4th, 2010· System Requirements: Eclipse 3.3+, JDK 1.5+. The intent is for this software to be used with FlexBuilder 3 or 4, but there are no actual dependencies.
· If you have a SourceForge account, please monitor this page for updates (click the Monitor or Watch icons (I'm not sure what the difference is)).
· Install (several ways to install)
· Add a remote update site through Help->Software Updates: http://flexformatter.googlecode.com/svn/trunk/FlexFormatter/FlexPrettyPrintCommandUpdateSite. The exact instructions differ depending on which version of Eclipse you are using. You should be able to turn on Eclipse auto updates and be notified when a new version is published. You may have to set up proxy settings in the Eclipse preferences if you are behind a corporate firewall. Note: if you are running Eclipse 3.5 and the update site doesn't work for you, try adding "/site.xml" on the end and see if that helps.
· Download the zip file and extract the 3 plugins jars into the Eclipse plugins directory (Eclipse 3.3) or the dropins directory (Eclipse 3.4+) and restart Eclipse (with -clean if you are using 3.3).
· Usage See the docs page for a usage doc that describes the options. https://sourceforge.net/apps/mediawiki/flexformatter/index.php?title=Preferences There is also usage doc in the ? (question mark) help on the preference pages.
· Bugs: Undoubtedly, although things have been pretty stable for the last few months. If you find something, create a bug/feature report through the 'tracker'.
June 23rd, 2010· New Features
· New option (ActionScript->Tweaks->Add braces to conditional statements) to add braces if there no braces. There is no inverse option, so use with care.
· New option to add blank lines before comments in mxml files
· Added ability to exclude entire file from formatting: Include the following string in an Actionscript or MXML comment anywhere in the file. {FlexFormatter:IgnoreFile}
· Fixes
· Fixed comments in mxml files to be kept with the following line. This was broken if options like 'Spaces between sibling tags' were used.
· Fixed code to not pull in extra Eclipse classes if run from the command line.
· Updated the 'Set to Adobe Standards' button to add a lot more mxml standards from the Cairngorm site.
May 3rd, 2010· New Features
· New option (on Auto Format page) to allow batch formatting to not pop up a dialog at the end.
· Fixes
· Fixed minor bug where there was no space between the 'new' operator and a parenthesized expression
· Fixed nested switch statements to indent correctly
· Added category to update site so that it doesn't appear that the formatter can't be installed
March 17th, 2010· New Features
· Member selectors can now select sort members by type (the String type name in the declaration)
· Member selectors can now select members by metadata tag (ex. all the 'Bindable' items)
· New toolbar icons (thanks to Mat Blanchet)
· Fixes
· default xml namespace didn't honor the 'spaces around assignment' setting
· no space after asterisk in for loop control
· made member selector dialog scrollable since it has gotten too tall.
January 22nd, 2010· System Requirements: Eclipse 3.3+. The intent is for this software to be used with FlexBuilder 3, but there are no actual dependencies. It also works with FlashBuilder 4 beta 2. I have heard that it doesn't work with FlashBuilder pre-release copies, but I don't have access to those.
· If you have a SourceForge account, please monitor this page for updates (click the Monitor or Watch icons (I'm not sure what the difference is)).
· Usage See the docs page for a usage doc that describes the options. https://sourceforge.net/apps/mediawiki/flexformatter/index.php?title=Preferences There is also usage doc in the ? (question mark) help on the preference pages.
· Bugs: Undoubtedly, although things have been pretty stable for the last few months. If you find something, create a bug/feature report through the 'tracker
January 8th, 2010· New Features
· No new features this week, just some bug fixes.
· Fixes
· Changed parsing of Strings to be more lenient and not require escaping of backslashes since Adobe apparently doesn't require it.
· parse error: default xml namespaces didn't allow expressions as the assignment value.
· parse error: for loops only allowed declarations in the initializer, not expressions
· fixes for some problems involving missing (but implicit) semicolons
December 7th, 2009New Features:
· Added plain xmlns to the default 'xml namespaces' group for mxml attributes.
· Added ability to autosync back to auto sync file to maintain preferences. With this setting, saving the preferences dialog also writes back to the autosync file.
· Added option to capture 'state' attributes as part of mxml attribute groups. State attributes are ones that have a '.' in them, like 'event.mouseUp'
Fixes:
· Conditional code blocks inside the class declaration area weren't parsing in some cases.
· Rearranging code would add an extra newline after lines ending with a line comment (//)
· Static initializers weren't accounted for in the rearranging code.
· Rearranging failed on interfaces
· Using bulk formatting from the package explorer/navigator context menu failed in some situations because of files with no extension (which is common in subversion source control)
June 7th, 2009· New Features
· 2 new buttons for adding ASDoc to class elements. This
· only works in ActionScript files (.as). One button adds the
· comments to all methods that don't already have them (based
· on the preference page settings). The other button adds
· a comment to the current class/method/property. On the
· preference page, there are also templates to let you control
· to some extent what is generated. This is EXPERIMENTAL.
· Feedback through the tracker/forums is welcome.
· Another new button for rearranging actionscript elements.
· Again, there is a preference page that lets you control the
· order of elements and modifiers on elements. This is
· EXPERIMENTAL. Feedback through the tracker/forums is
· welcome. I expect to integrate this with the formatter proper
· (as an optional pre-format step) at some point, but there
· is too great a potential for corrupting code at this point.
· Added an option to allow non-indenting of package elements.
· This matches the look of the Adobe samples, although not
· their editor auto indent behavior.
· Bug fixes
· Added keystroke bindings to map the keys by default in
· FlashBuilder. I did not add Ctrl+I since that already is in use.
· Fixed several e4x bugs
· Parser failed with methods named "get" or "set". Fixed to
· allow that, as well as some other surprises, like "override".
March 30th, 2009New Features:
· Added new "tweak" setting to allow separate control of spaces around '=' for optional parameters.
· Added context menu item for files/folders in navigator view to allow formatting/indenting of a tree of files. It is slow, but easier than doing it by hand. There are also instructions on the the documentation page for how to format from the command line.
· New setting to allow mxml tags with )
· Added option to allow blank lines to be added before user-specified mxml tags.
Fixes:
· Code from 0.6.15 to preserve indents in non-AS CDATA sections didn't add a linebreak after the CDATA section, so the following tag could end up on the same line with the end of the CDATA tag.
March 17th, 2009New Features:
· Added new setting for "spaces after label colon". Now, there is a separate setting for spaces around a variable declaration colon and labels (code labels, case labels, Object labels).
· Reworked preference page (again) to group items and make slightly better use of screen real estate.
· Add context (F1) help to preference page and related dialogs.
Fixes:
· Text operators like 'as' keyword did not always get surrounded by a space if the adjacent character was a ')'. Fixed to always surround with a space.
· Single line comments (//) were indented wrong in if right before an end brace ('}'). Typically for empty methods with a comment in them.
· Fixed problem with using FlexBuilder rename refactoring in combination with AutoFormat on save. This has probably been an issue for several releases. People with the experimental 0.6.13 release got worse behavior.
March 10th, 2009· Fix so that formatting/indenting doesn't delete breakpoints and other line-based annotations. This is a major change to the way I modify the document once I've created a formatted text string, so I'm making this an experimental version and hope that people will contact me or create tracker entries if you run into issues. If you do run into problems there is a temporary setting on the main preference page to allow you to turn off "micro edits" and revert back to the old strategy. If the micro edit strategy doesn't have problems, I will remove the setting.
· Annoying scrolled position with autoformat on save. Should be fixed to maintain both line and relative position on screen.
· Removed spaces inside the [ char of a directive because the Actionscript editor doesn't color the keyword if there is a space after the opening bracket. I don't believe the space interferes with the compile, but it seems better to remove it for the moment.
· Space between return and ';' ("return ;"). Should be "return;"
March 2nd, 2009New Features:
· Ability to use regular expressions to specify attributes in groups.
· Ability to create groups of attributes and specify sort/wrapping settings for them.
· Option to put [bindable] tags on line with bound item or line before.
· Option for setting number of spaces inside parentheses.
Fixes:
· Now treat variable declarations as part of 'general expressions' for purposes of the wrapping options.
· "namespace" was not allowed in package names. I was treating it as a reserved word. Now allow it and others that are similar ("default", "to", "internal", etc.).
· Fixed 0.6.11 to treat custom attribute ordering correctly when all of the attributes in a tag are handled in the custom ordering, and the order ends with a newline.
· Command line formatting would zero-out a file if there were parse errors. Added code to fail to format in that case.
February 16th, 2009New Features:
· Changed behavior of Format command/button to format entire file if no selection, or selected lines if there is a selection. This matches the Java formatter behavior in Eclipse.
· Breaking change to handling of attribute order dialog. Now, you can specify groups of attributes at once. You can push the 1st attribute to start on the line below the tag start by including a
· as the first entry.
· You can specify tags that should not have any of their text contents modified (not even indented). Or you can specify tags whose text content can be indented and where newlines aren't significant.
Fixes:
· I royally screwed up the "format on save" functionality in the 0.6.8 release. This release incorporates the fixes in the experimental 0.6.9 release.
· Fixed bug where special '*' type specifier wasn't parsed correctly if it was followed by '='. Found mention of this on a Russian language blog.
· A multiline comment before the package statement would pull the package keyword up on the last line of the comment.
· MXML tags that had text content (like VO tags or String) were getting extra newlines added, which caused compile or runtime errors when whitespace was illegal. Ex. the mx:Number tag.
· The default behavior for 'general expressions' is to adjust whitespace and indent, but not to change newlines. However, this setting was broken, meaning that all expressions get pulled up onto 1 line by default. Fixed to honor setting.
· The 'if' keyword always had a space before the open paren and the other keywords had no spaces. Fixed to consistently have one space.
· Nested functions bodies were getting an extra indent.
February 9th, 2009New features:
· Ability to format/indent on save (settings on new preference page
· Split preference page into some tabs to be a little more screen friendly
· Added ability to add spaces around colons (':')
Fixes:
· Removed extra blank line generation in ActionScript formatter when formatting the entire file or at end of file
· Fixed single line and multiline comments that are at the end of a line to not be pushed down to the next line
January 28th, 2009· Line delimiters were not being preserved and certain interactions with the Eclipse editor could lead to a lost trailing character (usually > or ;).
January 27th, 2009· added keybindings (ctrl+shift+f and ctrl+i) and added to AS context tmenu (I couldn't get it added to the mxml context menu)
· added support for Vector. syntax
· now prevent labeled statement from adding a return before the statement it's associated with
· added ability to wrap method calls/method decls/array decls to the first wrapped item
· added ability to wrap xml tags with a standard hanging indent
· fixed bug that prevented left braces from formatting after class and package decls
· added "preserve blank lines" feature for mxml
· miscellaneous other bug fixes