Re: Can't get method declaration braces to align

Hi Ron,

Sorry but I was unable to reproduce the problem within the java code
under the latest IJ X build (99.32) - the braces are not indented to
method start.

Please submit dedicated ticket with detailed steps to reproduce the
problem if you still have it with the mentioned build.

Denis Zhdanov
IDEA developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Ron Siemens wrote:

I have the option "braces placement", "in method declaration" set to "Next line".  If I reformat my code, this gives the desired format.  But while interactively typing in code, the braces are always indented, exactly like "Next line shifted" does.

I would like:

public void test()
{
}

But while typing it in, the braces are indented and I get

public void test()
     {
     }

Is there some other option that affects the code while typing it in?

---
Original message URL: http://devnet.jetbrains.net/message/5285866#5285866

1 comment
Comment actions Permalink

On Wed, 09 Feb 2011 00:35:00 MSK, Ron Siemens <no_reply@jetbrains.com>
wrote, quoted or indirectly quoted someone who said :

>I have the option "braces placement", "in method declaration" set to "Next line".  If I reformat my code, this gives the desired format.  But while interactively typing in code, the braces are always indented, exactly like "Next line shifted" does.

This drove me nuts for months. The fix:

1. install Idea 10.0.2.

2. Go into the settings, code style, wrapping and braces, braces
placement, in method declaration.

3. Set it to something other than next line shifted.

4. set it back to next line shifted.

5. save your config.

6. test the reformatter.

7. run the rearranger then the reformatter on the universe (root node
in the project display).

8. recompile 
--
Roedy Green Canadian Mind Products
http://mindprod.com
Refactor early. If you procrastinate, you will have
even more code to adjust based on the faulty design.
.

0

Please sign in to leave a comment.