How to have the file selected in Project Explorer when focusing on a certain file’s tab?

Say I have multiple files opened in Eclipse IDE. I just want Eclipse to show the file in the Project file tree, when I have certain file opened.

Just like in NetBeans. In NetBeans when you focus on some opened file, the left tree will be updated and the file will be located in the left (files tree).

Answer

There is an icon which looks like two horizontal arrows:

Link to Editor

If you select this toggle button (so it is depressed as shown, it has the tooltip ‘Link to Editor’) then changing tabs should now refocus the selected item in the explorer.

You can also find a ‘Link to Editor’ checkbox on the Project Explorer menu.

Many other views have similar icons which perform a similar function, for instance the Navigator or Package Explorer, or Git Staging and Repositories views.

You can find more information in the Workbench User Guide on the Linking the Project Explorer view to the active editor page.

Attribution
Source : Link , Question Author : bakytn , Answer Author : Mark Booth

Leave a Comment