[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-vcm-dev] validateEdit refresh problem
|
OK I figured out what the problem was. Hooray!!! I'll share it in the event that someone else comes across this problem.
Inside of the validateEdit() method, it seems that both the checkout and the refresh need to be run inside of a WorkspaceModifyOperation. If they are not, calling refreshLocal() on the checked out resources does not do much for you.
Thanks for the help,
Joe
-----Original Message-----
From: Boris Pruessmann [mailto:boris+mailinglists.platform-vcm-dev@xxxxxxxxxxxxxx]
Sent: Thursday, August 01, 2002 12:06 AM
To: platform-vcm-dev@xxxxxxxxxxx
Subject: Re: [platform-vcm-dev] validateEdit refresh problem
validateEdit gets called with a handle to the IResource that should be
edited. It seems as if the checkout operation you are performing changes
at least the timestamp of the file on the local filesystem, perhaps even its
content so you should call IResource.refreshLocal before leaving
validateEdit.
Greetings,
Boris
On Wed, 31 Jul 2002, Zulli, Joseph wrote:
>
> Hi everyone,
>
> I posted the message below to the Eclipse newsgroup. Someone responded
> saying that it was most likely a bug and that I should fill out a bug
> report. I'm not quite convinced that this is a bug though, and I
> wanted to know if anyone has had a problem with this, and if so, what
> is the work-around. I'd bet I'm just missing an API call.
>
>
> What I have is a class that implements the IFileModificationValidator
> interface that we all know. I have created a validateEdit method() that checks if the file is read only, and if so, checks it out.
>
> This works great except every time a file is checked out I get a
> question dialog with this message: "The file has been changed on the
> local file system. Do you want to load the changes?"
>
> Of course the answer to this question is always going to be yes. Is
> there any way to make it so that dialog does not pop up? I need everything to be in the background and, as I said, in this case the answer is always yes, with no exceptions. I tried calling the refresh() method on all of the files, but it didn't seem to help for some reason.
>
> Does anyone have any clues?
>
> Thanks in advance,
> Joe
>
>
>
--
"Engineering does not require science. Science helps a lot but
people built perfectly good brick walls long before they knew why
cement works." - Alan Cox
_______________________________________________
platform-vcm-dev mailing list
platform-vcm-dev@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/platform-vcm-dev