The rearranger plugin rearranges (reorders) class definitions within a Java file according to rules specified by the user.
Version 0.6 adds several new capabilities:
- Ability to select items by matching name to a regular expression pattern.
- Ability to insert comments between groups of items.
- Added support for native, synchronized, transient and volatile attributes.
- Added ability to detect if a field is initialized to an instance of an anonymous class.
- Added ability to detect class static initializers.
Comments can be emitted conditionally, based on whether or not any items matched the preceding and/or subsequent rules. This can prevent "spurious" comments from appearing.
Before the file is rearranged, any comments matching those you specify in the rules are removed, on the theory that they were generated by a previous Rearranger execution. Be careful what you specify for comments! You are responsible for proper formation of comments; e.g., use // or matching /* */ entries. Comments may be multiline.
Several bugs were fixed:
- Configuration dialog now correctly determines if settings are unchanged
- methods with "getter/setter" and "other" selected were not being selected (the conditions are now OR'd, not AND'ed)
In the process of cleaning things up, some configuration items were renamed (mostly in method attributes); please check your configurations to be sure they are still correct.
The plugin requires EAP build 944 or later. It is available from the IDEA Plugin Manager.
Please let me know if you have any problems. (I changed a lot of code! :)