Does anyone know is there a way to open a project in Eclipse in read-only mode? If there is a lot of similar projects open it is easy to make changes to a wrong one.
A plugin can do this. But I thought up a tricky one. Set all the files under that project as read-only, and make them only writable and controllable by Admin Group, then start eclipse without admin privilege. I've tested that the dialog won't show up.
Reopening a Closed Project To reopen a closed project, in the Package Explorer view, select the closed project and click on the Project menu and select Open Project. Once the project is open its content can be edited using the Eclipse user interface.
Putting project in read-only mode is really useful, when you make another instance from the previous project. So you copy all files from old project, then make changes in the new instance. It's really simple to edit files from old project by mistake (they have the same names)!
Serg if you use linux, I suggest to put all files in read only mode with chmod in terminal:
sudo chmod 444 -R /path/to/your/project
After this operation Eclipse will tell you that file you are trying to edit is in read-only mode. I think that's enough to make the previous project safe :)
One sub-optimal solution is to make the project directory read-only in the file system in the underlying OS. I'm not sure how eclipse will react though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With