Brandstädter Reinhard <Reinhard.Brandstaedter@ams-engineering.com> wrote
on 07/18/2005 03:36:14 AM:
> I've got a problem with Subclipse and IBM Rational Software Architect
(based
> on eclipse 3.0.1), when opening/creating Model files with software
Architect.
> Subclipse issues an locking dialogue several times (6 for one change in
the model file).
> Although there is no "needs-lock" property set or any reason for locking
the
> file (the file is xml based!)
> Using Software architect with an older subclipse plugin (0.9.30) which
doesn't
> know about locking works fine though.
>
> Any ideas on this?
>
> I'm also in contact with IBM support, but didn't get any further so far.
> Maybe a dev-question: how is it determined wether a file needs locking
or not?
> And how is subclipse involved in this then?
The way this works is that whenever a tool is about to open a file for
edit, it is supposed to call an Eclipse API method called validateEdit().
This method is passed through to the team provide to decide whether to
allow the edit, present any UI etc... There is another API involved
called a ResourceRule which is where the decisions are made whether
anything needs to be done or not. We are just using the default
implementation of this that comes with Eclipse. This default
implementation makes its decision based on whether the resource being
edited has the read-only attribute set or not. So that is what is really
being checked, not the Subversion needs:lock property. We chose to use
this technique as it is more efficient and the only files in a Subversion
working copy that should have the read-only attribute set are those which
have the needs:lock property set.
All that being said, I have seen instances where I am incorrectly prompted
to lock objects. Specifically, if you take the Eclipse option in the PDE
to migrate a plugin from 2.x to 3.x you get prompted to lock a few
resources. My assumption is that this is some kind of Eclipse bug as all
of the decisions are made inside Eclipse code. Our code which displays
the dialog has no checking in it, and should only be called if all of the
upfront criteria has been satisified. This obviously works at some level
as most people never see one of these dialogs.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
Received on Mon Jul 18 22:49:54 2005