Accepted answer

update (2020, eleven years later): see "source code navigation / locate a file in the project tool window"

in the project tool window, right-click the project toolbar and, from the context menu, select always select opened file.

after that intellij idea will track the file that is currently opened in the active editor tab and locate it in the project tool window automatically.

original answer (2009)

that would be autoscrollfromsource.png : autoscroll from source.

navigate from a file in the editor that gets the focus, to the corresponding node in the project tool window.

alt text

fried hoeben comments that

you get there from the config of the project tool window.
it is not present in the general ide settings (at least in version 12)


in intellij 2019.3 community editor, it is to right-click on the project view and check the item "always select opened file.


right click on the project title bar (project view). then select the option "autoscroll from resource".


in version 2016.3, it's a little icon on the project tool window called scroll from source. it's the first icon on the right see screen shot


at intellij idea 12 (13, 14 and 15 from comments), it is located at the gear icon into the "project" tool window, called as our mate said, autoscroll from source

check the image

enter image description here

i hope this can helps someone else :)

Related Query

More Query from same tag