Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse: "The resource is not checked out..."

 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This is a little thing that bugs me constantly. It's a ClearCase plugin issue, but I am guessing it also happens with other version control plugins like that for CVS.

Basically, if you try to edit a version-controlled file that you haven't got checked out, the file's content is hidden and replaced with a message "The resource is not checked out and checkout on edit is disabled". It seems there is no way to get rid of this screen (and back to the file content) other than closing the file window and reopening it.

So, my questions:

  • Can you prevent this? I'd much rather a message in the status bar (and of course, the file not altered).
  • Failing that, can you return to the file's contents directly? I hate losing my position in the file - some of our files are very long.


  • Obviously not the most critical problem, but it bugs me none-the-less =(


    --Tim
     
    Jeanne Boyarsky
    author & internet detective
    Marshal
    Posts: 34835
    369
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Tim,
    Not that this helps, but it wouldn't be a problem with CVS because CVS doesn't have the "check-out" concept.
     
    Tim West
    Ranch Hand
    Posts: 539
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Umm....doesn't it?! CVS itself does... I mean checking in/out as per 'cvs ci FooFile' / 'cvs co FooFile' on the terminal. I haven't used the CVS plugin to Eclipse though, maybe that's where the confusion is.

    The basic checkout concept is the same between ClearCase and CVS, isn't it? The file is marked as read-only on the local FS when you haven't got it checked out. When you check it out, it's automatically set as not read-only. Of course, you can 'hijack' the file by manually marking removing the read-only flag on the local FS.


    --Tim
     
    Jeanne Boyarsky
    author & internet detective
    Marshal
    Posts: 34835
    369
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Tim,
    Allow me to clarify. When you check out of CVS (whether through eclipse or command line), you get a copy of the files. Someone else could also get a copy of the same files. You can both modify them and try to version them. Aka optimistic concurrency. When I said you can't checkout of CVS, I meant you can't get a lock on a project. Sorry for misphrasing that!

    So in order to have a file in your eclipse workspace, it had to have come from CVS (in which case it was already checked out at some point) or you would have created it yourself (in which case you can add it to the repository.) CVS wouldn't complain that the file wasn't checked out, because having a copy is sufficient for check in.
     
    Tim West
    Ranch Hand
    Posts: 539
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Gotcha. Thanks for the clarification Jeanne. Eurgh, that was embarrassing - I used CVS all last year :-\ (but not with Eclipse, or even Java)

    I'll have to get used to it again before I pursue that avenue. In any case from what you say, you never get the "not checked out" message in Eclipse when using CVS, right?


    -Tim
     
    Jeanne Boyarsky
    author & internet detective
    Marshal
    Posts: 34835
    369
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    you never get the "not checked out" message in Eclipse when using CVS, right?

    Right
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic