In your projects, There is a large tree of folders and files, Sometimes you opened a file in Code editor. The same selection does not reflect in the Project window(Left side) with selected in Project or files tree.
This tutorial explains multiple ways to select the current file in an editor linked to Project Windows or Project explorer. It also includes project and file tabs that are selected with a files tree with the current file selected and It gives the location of the file in the project window.
This is helpful to navigate the files in the directory and know the location of the file in a project.
This tip is useful to know if the current file belongs to the project if you open multiple projects in IDE.
How to select the Opened file in the editor to Project tree
using UI Option
- Go to
Synchronize Editor with Views
- This option opens the current file selected in the Project and Files tabs of the left side window.
Similarly, You can do the same thing with shortcuts
Ctrl + Shift + 1command to select the file in Project explorer
Ctrl + Shift + 2Command to select the current file in File explorer
Command + Shift + 1command to select the file in the Project window
Command + Shift + 2Command to select the current file in the File window
how to open a file in the editor from Project or files window.
In the project or files explorer, You have a list of files in tree format.
Double-click on the file, It opens in Code Editor. You can still map to single click or shortcut using key mapping in settings configuration.