Bug? IDEA Inserts empty lines (IDEA-9375)

I have reported this one a while ago. It has been set to fixed but I still have the problem in 6.0.2. Am I the only one?

http://www.jetbrains.net/jira/browse/IDEA-9375

The bug is simple:

<![CDATA[
public class Foo
{
<- Cursor here
}
]]>


Now when generating for example a constructor, the resulting code looks like this:

<![CDATA[
public class Foo
{

   public Foo()
   {
   }
}
]]>


With an extra empty line added.

This worked fine in 5.x and any versoin before. If I want inconsistent code generation then I'll switch to Eclipse :)

S.

6 comments
Comment actions Permalink

Settings -> Global Code Style -> Blank Lines -> After class header

0
Comment actions Permalink

It is set to 0 (zero) here.

Same happens anywhere in the class btw. If I do this:

<![CDATA[
public class Foo
{
    public Foo()
    {
    }

    private int foo;

    <- Cursor here
}
]]>


And ask IDEA to create a getter/setter then the result is:

<![CDATA[
public class Foo
{
    public Foo()
    {
    }

    private int foo;


    int getFoo()
    {
         return foo;
    }

    ...
}
]]>


I'm pretty sure that this was different in 5. My muscle memory complains about the extra keystrokes that I need now.

S.

0
Comment actions Permalink

This really seems to be a bug. Try to convince them to reopen your existing bug report or file a new one.

0
Comment actions Permalink

+1

I agree. This irritates me too. It used to do it right, and now it doesn't.

John Hurst
Wellington, New Zealand

0
Comment actions Permalink

I have no idea how to reopen an issue that has been set to fixed so I created a new one:

http://www.jetbrains.net/jira/browse/IDEA-10569

Please add a comment to this if you also experience this problem.

S.

0
Comment actions Permalink

I am having a similar issue in my file templates.
I have a "comment header" in there and it does this:

Original:
// -


// Methods
// -



IntelliJ Formatting:
// -


// Methods

// -


0

Please sign in to leave a comment.