Rearranger: does not honour own spacing options

I've enabled
- Force 0 blank lines before class close brace "}"
- Force 0 blank lines before method close brace "}"
- Remove initial and final blank lines inside code block
but in the code below the blank lines don't get removed when invoking
Rearrager from editor's context menu:


Tom

2 comments
Comment actions Permalink

Thanks, Thomas. I'll take a look.
-Dave

0
Comment actions Permalink

Thomas,

I tested with your settings and supplied file and did not find any problems. I made some changes to your file so it would compile, of course;

- "ublic" -> "public"
- "..." -> "// ..."

and created some variable declarations or replaced method calls to make it parse better.

There is one exception to what one might expect; the blank line in the empty method "checkDoubleMessung" was not removed; I explicitly leave empty methods intact. The reason for this may have been that IDEA already has sufficient settings to control it, or that it would not be clear how the relevant settings (lines after method open brace or lines before close brace) would combine.

The only thing I can suggest is to ensure that the file compiles properly. When I first ran the test I was missing a brace, which meant that a different brace was considered end of method from the one that I expected.

If it does compile, and the error still persists, could you email me the file? Address is davek wrq.com. Would also like a copy of the element in ]]>/config/options/other.xml to see your settings.

Thanks,
-Dave

0

Please sign in to leave a comment.