[英]Eclipse: Files opened by multiple searches using same editor tab
When using the "file search" function in eclipse to find a bit of text in a ".java" file, I may get a list of several search results. 在eclipse中使用“文件搜索”功能在“.java”文件中查找一些文本时,我可能会得到几个搜索结果的列表。 Let's say I double click on the file "A.java" which then opens A.java in a new editor tab.
假设我双击文件“A.java”,然后在新的编辑器选项卡中打开A.java。 If I then use the "file search" function again to find some other bit of text and this time double click on the file "B.java", this file will replace "A.java" in the editor.
如果我再次使用“文件搜索”功能查找其他一些文本,这次双击文件“B.java”,该文件将替换编辑器中的“A.java”。
I'd like Eclipse to open a new editor for B.java so that both A.java and B.java are available in my editor tabs. 我希望Eclipse为B.java打开一个新的编辑器,以便我的编辑器选项卡中都可以使用A.java和B.java。 Is this possible?
这可能吗? I've had a look around in the preferences but I'm not sure what option would give me this bit of functionality.
我已经在偏好中查看了一下,但我不确定哪个选项会给我这些功能。
Disable the option 禁用该选项
Preferences > General > Search > Reuse editors to show matches 首选项>常规>搜索>重复使用编辑器以显示匹配项
Above is the best answer. 以上是最好的答案。 But since I don't always want to open the search result in a new tab I usually use something like this.
但由于我并不总是想在新标签中打开搜索结果,我通常会使用这样的东西。
right click on the result -> Show In -> Package Explorer ->(file is now automatically selected)->Press 'Enter'
More simply 更简单
Select the result -> alt + shift + w -> Package Explorer -> press 'Enter' twice
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.