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

  • I came to this thread while facing exactly same issue in Android Studio. Project explorer in Android Studio has a setting named Autoscroll to Source meant for exactly same purpose. In case, if anyone wants to do it explicitly on need basis then use the setting Autoscroll from Source. Both these settings can be enabled or disabled using the gear icon present on top right corner of project explorer itself. Related thread - What is the use of autoscroll to source and and autoscroll from source features in Intellij IDEs?
    – RBT
    Sep 2, 2018 at 0:12

2 Answers 2


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.

  • Brilliant! Very simple. Sep 11, 2013 at 11:29
  • just a small comment, for some reason the link to editor in my 'project explorer' stopped working but the one in 'package explorer' works fine. so this might be a solution for those that have issues with it.
    – thedrs
    Oct 6, 2020 at 11:19
1. From the Project Explorer menu, select Link With Editor.

2. Click on the Link With Editor icon Link with editor icon on one of the navigation bars.

Click on the link below for the image

Ref : http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-18.htm

  • This has already been answered above. Jan 23, 2015 at 8:12
  • yes it had it even helped me and I even did given a upvote. The only reason i added a new answer was to provide the official link
    – mateen
    Jan 24, 2015 at 9:32
  • In such cases you should comment on the answer itself rather than posting a new answer. You can comment on a post once you have enough reputation. Jan 25, 2015 at 9:45
  • yes I though of commmenting but because of not having enough reputation I have posted this as another answer if you can comment the the link I ll delete this answer. Is that okay ?
    – mateen
    Jan 27, 2015 at 4:20
  • Also, no matter what your reputation, you can suggest an edit. I would have happily accepted your edit. Still, here's another 10 rep and I'm sure you'll get the hang of Stack Exchange quite quickly. *8')
    – Mark Booth
    May 20, 2015 at 11:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.