search

Home  >  Q&A  >  body text

java - Eclipse如何等号对齐?

如题[字数补丁]
补充:

PHP中文网PHP中文网2804 days ago847

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-17 11:38:37

    I know there is a setting, but it only works for the part of a class that declares member variables...

    Window > Preferences > Java > Formatter > Edit 那个 profile
    然后在Indentaion中选择Spaces only或Tabs only,在Align fileds in columns上打勾
    这样在使用Source > Format的时候就会自动对齐。
    

    But you definitely don’t like to use Format manually every time, right...

    在之前的Java下面,有一个Editor,选择Save Actions,选上Format source code > Format all lines
    

    This will automatically adjust the format when saving. Of course, all of the above options require selecting Apply, but you probably won’t forget it.

    reply
    0
  • PHPz

    PHPz2017-04-17 11:38:37

    It’s not a comment. Does it look good if you align it?

    reply
    0
  • Cancelreply