It's not a secret anymore!*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse: "The resource is not checked out..."" Watch "Eclipse: "The resource is not checked out..."" New topic
Author

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

Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
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
    internet detective
    Marshal

    Joined: May 26, 2003
    Posts: 30138
        
    150

    Tim,
    Not that this helps, but it wouldn't be a problem with CVS because CVS doesn't have the "check-out" concept.


    [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
    Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
    Tim West
    Ranch Hand

    Joined: Mar 15, 2004
    Posts: 539
    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
    internet detective
    Marshal

    Joined: May 26, 2003
    Posts: 30138
        
    150

    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

    Joined: Mar 15, 2004
    Posts: 539
    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
    internet detective
    Marshal

    Joined: May 26, 2003
    Posts: 30138
        
    150

    you never get the "not checked out" message in Eclipse when using CVS, right?

    Right
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Eclipse: "The resource is not checked out..."
     
    Similar Threads
    JNDI in Servlets
    Error while adding an external archieve
    Can you explain me this code ??
    Help needed
    Disabling content scrolling in iframe