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 pr开发者_开发知识库oject) This would be a nice way to use eclipse as a general visual diff utility when files are not inside the project area. 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. 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.
精彩评论