7

This is such an amateur question I'm embarrassed I even have to ask.

In Eclipse, sometimes I can't edit a file. I can open it, but it behaves as it if it's a read-only file—typing has no effect. It only happens sometimes though, and that's what's driving me crazy.

The only perspectives I use are Java and Perforce, and normally I check out a file via Perforce, like so:

Checking out a file via Perforce

Once checked out, it looks like this:

A file checked out via Perforce

But I can't edit this file. Meanwhile, you see the file directly underneath, "VWAPParameterManagerImpl.java"? I can edit that one just fine, checking it out using the same steps. Furthermore I was able to edit "VWAP.java" just yesterday@ I have also witnessed this happening with non-java files. In Windows Explorer, I checked the file's attributes and verifed it wasn't read-only (if that means anything; I didn't know what else to check).

So, why can't I edit files in Eclipse sometimes, and what can I do make such files writable?

Obviously I can open the file up in gvim or another program, but I'd like to edit within Eclipse. I'm primarily a C++ developer and accustomed to a UNIX environment, so this Java/Windows thing is really tripping me up. Thanks in advance to anyone who might be able to advise...

3
  • Permissions issue? Eclipse might be running as a user which has read-only access to the location of your files? Or are the files you can edit in the same directory as ones you can't?
    – jam
    Nov 22, 2012 at 9:44
  • @J20 - Same directory; that's what's weird. Nov 22, 2012 at 22:35
  • Does it behave after you restart Eclipse or close and reopen your editor windows? I have experienced similar in the past on Mac and using IBM RAD (based on Eclipse) under Windows but i always chalked it up to memory/heap issues since it would be fine after a restart. Oct 31, 2014 at 20:46

1 Answer 1

1

This is file permissions issue. Perforce is somehow messing with that.

Unlock the file from File Properties and then give Write permissions to yourself.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .