Eclipse auto-formatter, disable auto line-wrapping of comment lines

后端 未结 2 906
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-05 03:14

I love eclipse auto formatting, but there\'s one feature that\'s driving me raging mad:

Since I use wrap-lines in my auto-formmatter, code like this:

pri         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-05 03:49

    I think that the thing you are specifically asking about you can achieve by editing your formatter:

    • Window -> Preferences -> Java -> Code Style -> Formatter. There edit you click on Edit...
    • If you are using the default Eclipse formatter you will need to edit the profile name (you cna not edit built in profile).
    • Go to comments
    • Deselect line comment formatting.

    That way no formatting of comments of the type // will be done.

提交回复
热议问题