
AutoFormat / Indent Plugin
Hey all,
I have started using FlashDeveleop quite recently and i'm was surprised with quility of this product. It's really great. Well done.
There was just a minor drawback, which as i seen on forum, is pretty common for users - lack of autoFormat feature.
So, yesterday (following a great samplePlugin code and other plugin codes) i managed to write a simple tool for this purpose. This is still very simple code, but it works for me. It is not really an AutoFormat tool, rather an AutoIndent one. It works well only with clean code, which needs indention, but hopefully i'll develop it further.
InstallationSimply place a dll in "FlashDevelop\Plugins" folder.
NotesIt defaults shortcut to Alt+Shift+F (NetBeans users should be happy). It works with selected text and if none is selected it will autoindent a whole document (it should be undoable, but be careful). It will follow the first line indention, so remember to set this one right. [first line means a first line of selection or file]
Perform import check defaults to true, thought it can be disabled in plugin setting panel. Remember it will be effective only while processing whole document.
DownloadAutoFormat.dll [ver. 1.0.3.7]
UPDATE: I have updated code to recognize "
case: ... break;" statements (link was updated)
UPDATE: It recognizes ASDoc syntax and will format ASDoc body with one leading space.
UPDATE: Recompiled to work with FD 3.0.3 RTM (link was updated) - sorry for the delay

UPDATE: Fixed some issues and added perform import check feature, which should remove all redundant package imports from class.
UPDATE: Fixed issue addressed by tigroux and added recognition of multiple var definitions
var a:int,b:int, ... z:int;.
UPDATE: Fixed issue addressed by MathsIsFun (switch block recognition), trace info about removed imports from class, cursor shouldn't move after formatting whole document (though page might scroll a bit).
UPDATE: Fixed issue addressed by Girou and kudoshinichi (line comment recognition), added beta version of methodTrace functionality (it generates trace command with current method and it's parameters).
Hope you find it useful, report any bugs or requests through PM or forum.
Regards,
Jake