[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-users] Resources are out of synch after Replace with Latest from Repository

From: <Sascha.Theves_at_innovations.de>
Date: Tue, 7 Jul 2009 15:38:10 +0200

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$Workb
enchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerI
mpl.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

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2368837

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2009-07-07 15:42:56 CEST

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.