Eclipse 文本比较顺序
我正在使用 Eclipse 3.4(在 Mac 上),并且我对文本比较感到烦恼,因为我正在按特定顺序比较文件,这不是我想要的。
当我比较两个文件时,它似乎总是将第一个文件(按字母顺序)放在左侧,后一个文件放在右侧,但我希望能够在逐个比较的基础上更改此设置。
IE 比较“file-a”和“file-b”时,左侧总是有“file-a”,但这并不总是我想要的。 我似乎记得在早期版本的 Eclipse 中,更改了选择“比较”->“时右键单击的文件”。 彼此都改变了顺序,但这在 3.4 中对我不起作用。
我为什么关心的一个例子:
我刚刚执行了颠覆合并并发生了冲突,所以我现在有以下文件:
文件
文件.merge-left
file.merge-right
file.working
我已对 file 进行了更改,现在想要将 file 与 file.merge-right 和 进行比较>file.working 到 file.merge-left 并拆分编辑器,这样我就可以将工作/左侧更改放在文件/右侧更改之上,然后只需翻阅比较编辑器并确保该文件与合并来源的文件之间的差异已被保留,但 file 位于左侧,而 file.working 位于右侧,并且因此,需要对角比较差异,而不仅仅是比较顶部和底部。
I'm using Eclipse 3.4 (on Mac) and I've got an annoyance with the text comparison having the files I'm comparing in a specific order which is not what I want.
When I compare two files it always seems to put the first file (alphabetically) on the left, and the latter one on the right, but I want to be able to change this on a comparison by comparison basis.
IE comparing 'file-a' and 'file-b' will always have 'file-a' on the left, but that isn't always what I want. I seem to recall in earlier versions of Eclipse that changing the file that was right-clicked when choosing Compare With -> Each Other changed the order, but that isn't working for me in 3.4.
An example of why I care:
I've just performed a subversion merge and had a conflict, so I now have the following files:
file
file.merge-left
file.merge-right
file.working
I've made changes to file and now want to compare file to file.merge-right and file.working to file.merge-left and split the editors so I can have the working/left changes sitting above the file/right changes, and then just page through the compare editors and make sure the differences between this file and the file that the merge comes from have been preserved, but file is on the left while file.working is on the right, and hence the differences need to be compared diagonally rather than just comparing top and bottom.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,这实际上很烦人。 我们使用一个名为 Beyond Compare 的外部工具(我们有公司许可证),它可以轻松地交换两侧。
您可能应该做的是向 Bugzilla 的相关 Eclipse 团队提出增强请求。 如果有足够的需求,它要么会进入下一个版本,要么有人会编写一个新的(或修改现有的)插件以允许交换。
Yes, that's actually very annoying. We use an external tool called Beyond Compare (we have a corporate licence) which can swap the two sides easily.
What you should probably do is raise an enhancement request on the relevant Eclipse team with Bugzilla. If there's enough demand, it'll either make it into the next release or someone will write a new (or modify the existing) plug-in to allow swaps.
当比较屏幕出现时,有一个“交换自和到”按钮。 使用Eclipse 3.6。 我实际上正在寻找一种改变默认行为的方法。 例如,当我比较修订版时,它总是在左侧而不是右侧显示最新修订版,除非我在比较之前单击交换按钮。
There's a "Swap From and To" button when the Compare screen comes up. Using Eclipse 3.6. I'm actually looking for a way to change default behavior. For example, when I compare revisions, it always have the latest revision on the left side instead of right unless I click the swap button before comparing.
正如我在此处提到的,Eclipse Neon.2 (4.6.2) 有一个用于交换视图的按钮:
As I mentioned here, Eclipse Neon.2 (4.6.2) has a button to swap the views: