On 12/11/06, Thomas M. Hofmann <email@thomashofmann.com> wrote:
>
>
>
> - Open test1.txt and add some text. The callback
> SVNFileModificationValidator#validateSave is called.
> SVNFileModificationValidator#validateEdit is not called so the code that has
> been changed in rev. 2853 is not run.
>
> This is interessting since I would have expected the validateEdit to be
> called.
We are only supposed to be called if the file is read only. This filtering
is done within Eclipse by ResourceRuleFactory.
> Let me describe when I see the problem. I am using Rational Software
> Architect version 7 and I am working on a UML project. Whenever I add a emx
> (UML model file) to Subversion I see the problem as soon as I try to edit
> it. I figure that this happens because Rational Software Architect is not
> obeing the API contract. It is always calling Workspace#validateEdit even if
> the file is not read only.
OK, this problem also existed with earlier versions of RSA. That is why we
had the explicit check to see if the file really was read only. In theory,
we should not have even needed that as we are not supposed to be called if
it is not read only. I always just assumed that RSA was somehow calling the
team provider directly and not going through the proper API. I now think
the problem is something else. I think that RSA must be telling Eclipse
that the IFile for one of these files is read only. That would explain why
it gets past the Eclipse filtering. As part of the change in 1.1.9, I
copied some code out of Team core that checks if the file is read only.
This is using the IFile#isReadOnly method. The earlier code was using the
method from java.io.File, which would be looking at the actual file system.
So I think we just need to change that one method to use File instead of
IFile. I have committed a change that does this if you would like to update
and test it.
Mark
Received on Mon Dec 11 15:00:32 2006