开发者

eclipse: how to deactivate auto-adjusting of method brackets

I have turned off all of the intelligent typing preferences that I ca开发者_JAVA技巧n find ...

however, when I create a method, eclipse forces my { to align left ...

private my_method()
{
}

I prefer:

private my_meth()
  {
  }

it also auto left-aligns nested brackets:

private my_meth()
{
  if ( true )
{
}
}

where I prefer:

private my_meth()
  {
    if ( true )
      {
      }
  }

is there a way to tell eclipse to stop doing that?


Preferences -> Java -> Code Style -> Formatter -> Edit -> Braces.
The brace position you want is Next line indented.

eclipse: how to deactivate auto-adjusting of method brackets

eclipse: how to deactivate auto-adjusting of method brackets


GO TO

Preferences -> Java -> Code Style -> Formatter -> Edit -> Braces

set your preferred margine then select your code and press

Ctrl + Shift + F

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜