如何在 Eclipse 中保存时禁用自动格式化?

2022-01-12 00:00:00 formatting eclipse

Eclipse 在保存时保持自动格式化,例如:它坚持以下代码在我保存后应该在一行中,尽管按照我想要的方式分解它.

Eclipse keeps auto formatting upon save, for example: it is insisting the following code should be in a single line once I save, despite breaking it up the way I want to.

@Transactional(rollbackFor = DataAccessException.class, readOnly = false, timeout = 30, propagation = Propagation.SUPPORTS, isolation = Isolation.DEFAULT)

推荐答案

Window > Preferences > Java > Editor > Save Actions.

Window > Preferences > Java > Editor > Save Actions.

也可以在项目级别进行配置.项目 > 属性 > Java 编辑器 > 保存操作.

Can also be configured at the project level. Project > Properties > Java Editor > Save Actions.

相关文章