[英]Eclipse: how to diff files not listed in project explorer
I can open files not in my project area by using File->Open File... I can't figure out a way to diff these files (either against each other or against files in my project) This would be a nice way to use eclipse as a general visual diff utility when files are not inside the project area. 我可以使用“文件”->“打开文件”来打开不在我项目区域中的文件...我无法找出一种方法来区分这些文件(彼此之间或项目中的文件之间)。这将是一种不错的选择当文件不在项目区域内时,将eclipse用作常规的可视化diff实用程序。 I know I could just copy the files to a project directory and use Compare With->Each Other, but it's a hassle & I would rather not clutter up my project directory with one-offs.
我知道我可以将文件复制到项目目录中,并使用“与->其他相比”,但这很麻烦,我也不希望一次性将项目目录弄乱。
Have a scratch project called whatever you want (mine is called "testing-project"). 有一个随便一个名为您想要的项目(我的项目称为“测试项目”)。 Drag and drop your file from wherever it is into that project, and when Eclipse prompts you whether you want to Copy or Link To the file, choose Link To.
将文件从任何位置拖放到该项目中,然后当Eclipse提示您是否要复制或链接到文件时,选择“链接到”。 Then you have 1) left the file in the original, non-project location, 2) have access to the Eclipse toolkit, including Compare, and 3) aren't cluttering up your "real" projects.
然后,您可以1)将文件保留在原始的非项目位置,2)可以访问Eclipse工具包,包括Compare,以及3)不会使您的“实际”项目变得混乱。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.