Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Browsing search results is not synced (Linked) to Project Explorer
Browsing search results is not synced (Linked) to Project Explorer [message #661157] Wed, 23 March 2011 12:08 Go to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Hi!

Using latest Helios SR-2 Java EE, I noticed, that when going through search results, the opened file in the editor is not linked with its icon in the Project explorer.

- open dialog Search / File... and search for some content
- in the results view (Search) , click the next Show Next Match button (down arrow)
As you click it and go through different files, they open in the editor, but the Project view does not change.

It helps, if I open another, unrelated file in editor, the select again the search result file in editor (by clicking on its tab). Then the Project view is updated properly.


Is this a known bug?
I am not sure under which component to file it.

Regards,
David
Re: Browsing search results is not synced (Linked) to Project Explorer [message #661184 is a reply to message #661157] Wed, 23 March 2011 13:56 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
It sounds like you don't have Link with Editor enabled. There is an icon at the top of the Package Explorer that toggles this behavior. The icon is two arrows, one facing left and the other facing right.

If you click the icon, it enables linking the selected item in the Package Explorer with the current editor. If you click it again, it stops linking them.
Re: Browsing search results is not synced (Linked) to Project Explorer [message #661193 is a reply to message #661157] Wed, 23 March 2011 14:40 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Quote:
It helps, if I open another, unrelated file in editor, the select again the search result file in editor (by clicking on its tab). Then the Project view is updated properly.

This would not work, if I would not have the linking enabled by the icon you mentioned.

So, yes. It is enabled.
Re: Browsing search results is not synced (Linked) to Project Explorer [message #661202 is a reply to message #661157] Wed, 23 March 2011 15:07 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
I tried on another PC (very similar setup) and it is the same.

One more detail: When clicking the Show Next Match button for the first time, so a new editor is opened for the file, the linking works. But on each next click, when no new editor is opened but the existing is reused, the linking does not occur.
Re: Browsing search results is not synced (Linked) to Project Explorer [message #661305 is a reply to message #661157] Thu, 24 March 2011 06:48 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 23.03.2011 13:08, David Balažic wrote:
> Hi!
>
> Using latest Helios SR-2 Java EE, I noticed, that when going through
> search results, the opened file in the editor is not linked with its
> icon in the Project explorer.
>
> - open dialog Search / File... and search for some content
> - in the results view (Search) , click the next Show Next Match button
> (down arrow)
> As you click it and go through different files, they open in the
> editor, but the Project view does not change.
>
> It helps, if I open another, unrelated file in editor, the select
> again the search result file in editor (by clicking on its tab). Then
> the Project view is updated properly.
>
>
> Is this a known bug?
When you step through the results the Search view stays active, so that
you can continue stepping to the next/previous result. Because the
Project and Package explorers only track the active editor, they don't
update while stepping through. You can reveal the element(s) directly in
the explorers using 'Show In' from the Search view's context menu.

Dani
> I am not sure under which component to file it.
>
> Regards,
> David
Re: Browsing search results is not synced (Linked) to Project Explorer [message #661342 is a reply to message #661305] Thu, 24 March 2011 10:31 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Dani Megert wrote on Thu, 24 March 2011 07:48
On 23.03.2011 13:08, David Balažic wrote:
When you step through the results the Search view stays active, so that
you can continue stepping to the next/previous result. Because the
Project and Package explorers only track the active editor, they don't
update while stepping through.


Yes, although I disagree with this behavior.

If I click inside the editor, the Project explorer updates.

But there are some cases, when even this does not work.
I think it happens with some project in my workspace.
If there are search matches in project1, clicking in the editor (text area) makes the Project exlorer sync to the open file.
But when I click through search results until a file that is in project2 is opened, this does not work any more.
If I select another open tab in editor (which is properly synced) then back the the matched file, it it is not synced.
Then I open a file in the same directory (Java Resources...), then finally the problematic editor gets linked properly.

There is definitely something odd going on.

Regards,
David
Re: Browsing search results is not synced (Linked) to Project Explorer [message #661360 is a reply to message #661342] Thu, 24 March 2011 11:27 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 24.03.2011 11:31, David Balažic wrote:
> Dani Megert wrote on Thu, 24 March 2011 07:48
>> On 23.03.2011 13:08, David Balažic wrote:
>> When you step through the results the Search view stays active, so
>> that you can continue stepping to the next/previous result. Because
>> the Project and Package explorers only track the active editor, they
>> don't update while stepping through.
>
>
> Yes, although I disagree with this behavior.
>
> If I click inside the editor, the Project explorer updates.
>
> But there are some cases, when even this does not work.
> I think it happens with some project in my workspace.
> If there are search matches in project1, clicking in the editor (text
> area) makes the Project exlorer sync to the open file.
> But when I click through search results until a file that is in
> project2 is opened, this does not work any more.
> If I select another open tab in editor (which is properly synced) then
> back the the matched file, it it is not synced.
> Then I open a file in the same directory (Java Resources...), then
> finally the problematic editor gets linked properly.
>
> There is definitely something odd going on.
Yes that sounds strange. It would be great if you could find
reproducible steps and file them against Platform UI.

Dani
>
> Regards,
> David
>
Re: Browsing search results is not synced (Linked) to Project Explorer [message #1852909 is a reply to message #661360] Fri, 10 June 2022 12:16 Go to previous message
Pavol Sestak is currently offline Pavol SestakFriend
Messages: 5
Registered: September 2013
Junior Member
I wonder in 13 years this obvious bug is not fixed.
Here is simple scenario how to reproduce it:
Let's have some java project and in it somewhere in directories have some jasper template file (*.jrxml). When invoke search: menu Search->File...
put on File Search tab some text to search that I know is definittelly in some jrxml files and file name pattern set to *.jrxml.
Then in search result in Search view on right click in context menu choose "Open with -> Text editor" , not system editor - just simple text editor in Eclipse.
And that's it - link between text editor and Project Explorer view doesn't work.
Of course toggle button "Link with Editor" is on.
BUT! when the very same file is open through right click on context menu in Project Explorer view then the Editor<->Project Explorer link works.
The point is opening the file from the results in Search view. Then the link Editor<->Project Explorer doesn't work.
Tested on
Version: 2021-12 (4.22.0)
Build id: 20211202-1639.
Previous Topic:Can I install a second copy of Eclipse?
Next Topic:Launching Eclipse 2020-09R error Version 11 or greater is required.
Goto Forum:
  


Current Time: Fri Apr 19 23:33:31 GMT 2024

Powered by FUDForum. Page generated in 0.08132 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top