简体   繁体   中英

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. Let's say I double click on the file "A.java" which then opens A.java in a new editor tab. 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.

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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM