- rearranges (reorders) class and class member declarations according to a user-specified order and/or method call hierarchy;
- generates section-marking comments; and
- provides several controls for spacing within and between methods and classes.
Version 2.2 is primarily a bug fix release:
- repeated Rearranging no longer inserts an additional blank line after a generated separator comment
- inner class separator comments are properly removed and regenerated
- toolbar icons in Live Rearrange popup might be fixed (I am guessing that they worked on Windows platforms but not Linux because of upper/lowercase issues)
- blank lines before and/or after separator comments are now preserved and correctly inserted
- default configuration updated to add a blank line before and after each separator comment
- Confirm Rearrangement dialog has been enhanced in a few ways. Separator comments may optionally be shown in the tree, both as rules and as generated comments. The list of rules shown may be restricted to only those with matching items. And the checkboxes have been replaced with buttons. The dialog has been made resizable.
I'll try to implement many of the remaining features you've suggested in the next release.
I discovered a few oddities that can still affect appearance of blank lines around comments.
- Sometimes IDEA doesn't strip trailing whitespace from a line. I pressed 'Enter' repeatedly in one Java file, and got "\n \n " inserted in the file (one newline and four spaces per line). I have tried to account for this, but it may mess things up if this sort of behavior occurs inside or before the generated comment. Seems to happen infrequently.
- IDEA doesn't save newline characters in the other.xml file, even when emitted as element text. Perhaps a document formatter is losing them when it tidies up indentation. It does read newline characters. So you may create a configuration by hand (e.g. the included default configuration) that contains newline characters before and/or after a separator comment, and the plugin will see them. But when saved, these characters are escaped as "\n" for newline and "\t" for tab.