【问题标题】:Is this possible to change the way of Eclipse formatting the code?这是否可以改变 Eclipse 格式化代码的方式?
【发布时间】:2014-03-04 05:11:53
【问题描述】:

通常eclipse自动格式化是这样工作的:

但我真的更喜欢这样的变量格式:

【问题讨论】:

  • 不确定,但请尝试 Window -> Preferences - Java -> Code Style -> Formatter。创建自定义格式化程序。

标签: java eclipse formatting


【解决方案1】:

是的,你可以做到这一点..

打开格式化程序首选项页面Java > Code Style > Formatter 首选项页面可让您管理 Java 代码格式化程序的代码格式化程序配置文件。

更多详情Code Formatter Preferences

【讨论】:

    【解决方案2】:

    查看“Window/Preferences/Java/Code Style/Formatter”。在那里你可以配置几乎所有东西。详细教程见here

    【讨论】:

      猜你喜欢
      • 2016-12-12
      • 2011-01-31
      • 1970-01-01
      • 2023-01-20
      • 1970-01-01
      • 1970-01-01
      • 2014-06-26
      • 1970-01-01
      • 2011-01-09
      相关资源
      最近更新 更多