Code alignment -- cosmetic issue

public class ExampleClass{
Logger logger = Logger.getLogger (ExampleClass.class);


The global settings require a 1 line around the class declaration, which Idea seems to ignore.
Not a show stopper but its policy where i work
Appreciate your help
Best regards,
Parthi

6 comments
Comment actions Permalink

yup, happens here too


parthi wrote:

public class ExampleClass{
Logger logger = Logger.getLogger (ExampleClass.class);


The global settings require a 1 line around the class declaration, which Idea seems to ignore.
Not a show stopper but its policy where i work
Appreciate your help
Best regards,
Parthi

0
Comment actions Permalink

The global settings require a 1 line around the class
declaration, which Idea seems to ignore.


"Around class" means before the 'class' statement and after the closing brace. Unfortunately, there's no formatting option for what you're looking for (a blank line after the opening brace).

0
Comment actions Permalink

In article <31786624.1117816335928.JavaMail.javamailuser@localhost>,
Marcus Brito <mbrito@gmail.com> wrote:

The global settings require a 1 line around the class
declaration, which Idea seems to ignore.


"Around class" means before the 'class' statement and after the closing
brace. Unfortunately, there's no formatting option for what you're looking
for (a blank line after the opening brace).


Yes but if you look at the blank lines tab, if you set after import to 0
and before class to 1, there is no space added anyway, that's till a
bug. And having a space after the closing class brace is kinda useless,
so I think around class should mean around public class Foo { space


R

0
Comment actions Permalink

And having a space after the closing class
brace is kinda useless,


Remember you can have multiple classes in the same file -- inner classes, in particular. This option controls the spacing between two inner classes (or two top-level classes -- but I'm yet to see a file with two top-level classes).

0
Comment actions Permalink

In article <28021204.1117828614168.JavaMail.javamailuser@localhost>,
Marcus Brito <mbrito@gmail.com> wrote:

And having a space after the closing class
brace is kinda useless,


Remember you can have multiple classes in the same file -- inner classes, in
particular. This option controls the spacing between two inner classes (or
two top-level classes -- but I'm yet to see a file with two top-level
classes).


Even if there were, with the space before class you'd get space before
the second class so that's a moot point.

R

0
Comment actions Permalink

issue, which i once thought is not going to be a critical one is now a CRITICAL one :(

we are soon going to upgrade to IDEA 5 once it comes out. Imagine a scenario where you accidentally hitting ctrlaltl in the root and you end up formatting the whole .java src tree it will be a complete mess.
why is that option to configure no of blank lines "After class header"?? does not have any effects at all in the .java files??
please resolve this issue

appreciate your help

best regards,
parthi

0

Please sign in to leave a comment.