File modifications are done by the Subversion native libraries (C
code). Subversion fires notifications of the things it changes.
Subclipse receives those and sends notifications to Eclipse so that it
knows the resource is changed and can update change listeners etc.
Maybe Eclipse has to lock the tree when it refreshes its knowledge of
the file contents?
We lock the project during an update, but I do not think that locks
the tree and all team providers have to do that.
On Tue, Jul 7, 2009 at 9:38 AM, <Sascha.Theves_at_innovations.de> wrote:
> Hi all,
>
>
>
> we have very big problems running subclipse together with our product.
>
> Our product listens to resource change events and reads the content of some
> files if they were changed. That works fine in all cases except if you make
> an update from a subclipse repository.
>
> When we invoke “Replace With -> Latest from Repository” and files were
> changed we got the following exceptions:
>
>
>
> Caused by: org.eclipse.core.internal.resources.ResourceException: The
> resource tree is locked for modifications.
>
> at
> org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:115)
>
> at
> org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1747)
>
> at
> org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1478)
>
> at
> org.eclipse.core.internal.resources.File.refreshLocal(File.java:342)
>
> at
> org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:202)
>
> ... 24 more
>
>
>
> And that exception occurs if we want to read the content from a file and the
> file is out of synch. We call (EMF does it) file.refreshLocal if the file is
> out of synch before reading the content. And there the exception occurs
> because the resource tree is locked for modifications to that time. After
> this resource change event no other events occur. So we can not wait until
> we get an event where the resource tree is not locked. No other Team
> Provider or Eclipse itself sends such resource change events. It only occurs
> with subclipse and I think it is a bug. So our questions are:
>
>
>
> - Why are the files out of synch if we make an update?
>
> - Why are the files still out of synch when we receive the resource
> change events?
>
> - Why does no other change events occur if the file was synched?
>
> - Is there a workaround for the problem? (Reading the content of
> the file in another Thread when the resource is not locked is not a solution
> for us!)
>
>
>
> I think subclipse does not conform to the resource API from Eclipse in this
> case.
>
>
>
> Any ideas/help would be useful!
>
>
>
> Kind regards,
>
>
>
> Sascha Theves
>
>
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2368856
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2009-07-07 15:58:09 CEST