Reputation: 82559
When I search for a text string (or find references in workspace) in Eclipse (Version: Helios Service Release 1 Build id: 20100917-0705) I am able to double click on search results to open an editor window and brings me to that line. Let's say I do so, and it opens MyClass.java
. I then want to see where some code is used in my jsp. So I open (again, using search results) some_action.jsp
.
When I do this, whatever editor window was opened first (in this case, my .java) is replaced with what I open second (the .jsp). I've never encountered this behavior before, and haven't made any changes to my workspace recently. (Well, obviously I have done something, because things don't break without a cause... but I'm not aware of any changes.) This only just started happening without any known catalyst.
Is there a setting I must toggle to remove this undesired behavior?
Upvotes: 28
Views: 7873
Reputation: 37807
If you only want to do this occasionally and don't want to change the default behavior, you can open the search result from Package Explorer:
right click on the result > Show In > Package Explorer > ENTER
or with keyboard only:
select result > shift+alt+W > DOWN > ENTER > ENTER
Upvotes: 1
Reputation: 3552
This is actually the default behavior.
To toggle between the two modes use the preference Preferences > General > Search > Reuse editors to show matches
.
Upvotes: 54