In your projects, There is a large tree of folders and files, Sometimes you open a file in Code editor. The same selection does not reflect in the Project window(Left side) with selected in the 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 file 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
View
Menu 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
In Windows,
Ctrl + Shift + 1
command to select the file in Project ExplorerCtrl + Shift + 2
Command to select the current file in File Explorer
In Mac
Command + Shift + 1
command to select the file in the Project windowCommand + Shift + 2
Command to select the current file in the File window
How to open a file in the editor from the 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 a single click or shortcut using key mapping in the settings configuration.