serg
serg

Reputation: 111265

How to open Eclipse project as read-only?

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.

Upvotes: 22

Views: 7065

Answers (4)

s3m3n
s3m3n

Reputation: 4197

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 :)

Upvotes: 5

wires
wires

Reputation: 4748

This feature is called "binary projects" and is provided by the eclipse plug-in developement environment (PDE). Note that this only works for eclipse plug-in project, see

Contributing to Eclipse - Principles, patterns and plug-ins

or

http://www.vogella.de/articles/EclipseCodeAccess/article.html#importplugins_binary

Upvotes: 2

Jean
Jean

Reputation: 21595

You can also use the close project/open project feature : close all projects and only open the one you need to work on ?

Upvotes: -1

Martin OConnor
Martin OConnor

Reputation: 3593

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.

Upvotes: 3

Related Questions