简体   繁体   English

Eclipse:使用相同编辑器选项卡通过多次搜索打开的文件

[英]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.

相关问题 Eclipse / PyDev - 当打开两个具有相同名称的文件时,从编辑器选项卡中删除路径 - Eclipse / PyDev - Remove path from editor tabs when two files with same name are opened Eclipse将新打开的编辑器选项卡放在当前活动的编辑器选项卡旁边? - Eclipse place the new opened editor tab next to the currently active one? 将标签添加到Eclipse XML编辑器中的多行 - Add tab to multiple lines in Eclipse XML Editor Eclipse插件-通知何时在Eclipse中打开编辑器 - Eclipse Plugin - Notification of when an editor is opened in Eclipse 打开默认的编辑器,在treeviewer上选择eclipse rcp(例如:因为eclipse知道必须在文本编辑器中打开j.java文件) - Opening a default editor, on a treeviewer selection eclipse rcp(eg: as eclipse knows that j.java files must be opened in text editor) 如何使eclipse识别正确的文件扩展名/为在项目范围之外打开的文件打开正确的编辑器? - How to make eclipse recognize the correct file extension/open the correct editor for files opened outside of the scope of a project? Eclipse中的“更智能的编辑器”选项卡标签 - Smarter Editor Tab Labels in Eclipse 无法在eclipse中关闭编辑器选项卡 - Can not close an editor tab in eclipse Eclipse:控制台窗口作为“编辑器”选项卡 - Eclipse: console window as editor tab Eclipse 跳转到编辑器选项卡快捷方式 - Eclipse jump to Editor tab shortcut
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM