If a file is read-only, it is marked with the closed lock icon in the status bar. If a file is writable, it is marked with the open lock icon .
Toggle the read-only mode on and off
Open a file in the editor and click the lock icon / in the status bar.
Alternatively, select a file in the Project tool window (Alt+1), go to in the main menu and click Make file read-only.
If a read-only status is set by a version control system, it is suggested that you use IntelliJ IDEA version control integration features. For more information, refer to Version control.