Eclipse: Files opened by multiple searches using same editor tab

EclipseSearch

Eclipse Problem Overview


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.

Eclipse Solutions


Solution 1 - Eclipse

Disable the option

Preferences > General > Search > Reuse editors to show matches

Solution 2 - Eclipse

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondigiarnieView Question on Stackoverflow
Solution 1 - EclipseChris LercherView Answer on Stackoverflow
Solution 2 - EclipseprageethView Answer on Stackoverflow