Can't edit files in Eclipse even though not read-only

22,274

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

Share:
22,274

Related videos on Youtube

Andrew Cheong
Author by

Andrew Cheong

Early web dev (1999 to around when jQuery came out), a decade of C++ in stock exchanges, and now Java in ad tech. Here, I used to go by A—— C——, farmed XP on the regex tag to wield fake authority on unrelated subjects, ♦'ed a beta site, and created the SOCVR chatroom. (I take no credit for the community it's grown into today, that was @rene et al.)

Updated on September 18, 2022

Comments

  • Andrew Cheong
    Andrew Cheong over 1 year

    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...

    • jam
      jam over 11 years
      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?
    • Andrew Cheong
      Andrew Cheong over 11 years
      @J20 - Same directory; that's what's weird.
    • asj
      asj over 9 years
      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.