Code arrangement - blank lines? comments between sections?

I've got two questions about Code Style -> Arrangement:

First, is it possible to inject a blank line between sections?  For example, I'd like to have an arrangement like this:

...
[var] [public]
[blank line]
[var] [protected]
[blank line]
[var] [package private]
[blank line]
[var] [private]
...


Second, is it possible to inject comments between sections?  For example, I'd like something like this:

[constructor]
///////////////////////////////////
// Properties
//////////////////////////////////
[property] [public]
[property] [public] [override]
[property] [protected]
...
/////////////////////////////////////
// Functions
/////////////////////////////////////
[blank line]
//-------------------------
// Public functions
//-------------------------
[method] [public]
[blank line]
//-------------------------
// Public overrides
//-------------------------

[method] [public] [override]
...

and so on.

Are either of these possible?
4 comments

On Fri, 18 Apr 2014 23:04:41 MSK, Rob Freundlich
<no_reply@jetbrains.com> wrote, quoted or indirectly quoted someone
who said :

>I've got two questions about Code Style -> Arrangement:

The old Rearranger would let me sort variable and constant
declarations by type and alphabetically.  Now it is gone, my code is
suffering entropy.  Will it come back? Is there a third party tool
tidy?

I know this is "dangerous" since Java does not do "natural" order
initialisation. The order of declarations matters.  However, I do my
inits in static{ } blocks when they are order sensitive.
--
Roedy Green Canadian Mind Products http://mindprod.com
"Don't worry about people stealing an idea; if it's original, you'll
have to shove it down their throats."
~ Howard Aiken (born: 1900-03-08 died: 1973-03-14 at age: 73)

0

You can configure blank lines around fields or methods at Code Style -> Blank Lines. But at this moment it's not possible to configure blank lines around arrangement sections itself. Would you please create feature request at http://youtrack.jetbrains.com

0

Please sign in to leave a comment.