3

I've been using WinMerge, Eclipse's compare tool and Tortoise's to see my changes before committing. The problem is that when I edit a file that hasn't been edited by someone else since we last updated our autoformatter-configuration I'll see many, many changes caused by the autoformatter. Now I have to copy the code from the previous revision, autoformat it in Eclipse and copy it into WinMerge to only see I really made.

Is there a tool that can automatically autoformat both versions of the file I'm comparing?

4

1 回答 1

2

任何允许您在比较之前设置外部转换的差异工具都应该处理它。外部转换主要用于 Word/Excel/PDF 到文本的转换,但只要您可以从命令行运行它,您就可以做任何您想做的事情。

对于Beyond Compare,我们已经有一个可选的附加规则,它将使用Jalopy来格式化 Java 源代码,另一个使用 HTML Tidy 来格式化 HTML 文件。

WinMerge看起来并不支持开箱即用的 Java 重新格式化程序,但他们的插件页面确实描述了如何使用 dll 或 Windows Scripting Host scriptlet 添加一个。

于 2012-02-01T16:44:04.277 回答