日食仅格式化编辑行 [英] eclipse reformat only edited lines

查看:77
本文介绍了日食仅格式化编辑行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java。如果我在Eclipse Helios中按Ctrl + Shift + F,它将自动格式化整个文件,而不是我编辑的行。当其他人在同一文件上使用其他样式时,这将成为签入时的噩梦。有没有办法告诉eclipse仅格式化文件中触摸的行。

I am working with Java. If I hit Ctrl+Shift+F in Eclipse Helios, it will auto format the entire file instead of the lines I edited. This becomes a nightmare at the time of check in when someone else uses a different style on the same file. Is there a way to tell eclipse to only format the touched lines in a file.

推荐答案

Windows-Preferences-Java-Editor-保存操作

Windows-Preferences-Java-Editor-Save Actions

仅格式化已保存的行。但是,如果您按Ctrl + Shift + f,我认为没有办法只保存已编辑的行。

Format only saved lines. However, if you hit Ctrl+shift+f i don't think there is a way that only edited lines will be saved.

这篇关于日食仅格式化编辑行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆