Reentrancy in WorkspaceRunnable [message #523720] |
Mon, 29 March 2010 01:11 |
Neil Bartlett Messages: 93 Registered: July 2009 |
Member |
|
|
Hi, I have a problem with workspace resource locks.
My plugin defines a custom classpath container. During the call to IClasspathContainer.getClasspathEntries(), I have to call some third party code which fiddles with the file system using the java.io.File API. Fortunately I know exactly which files it changes, so I would like to call IFile.refreshLocal() to make the workspace aware of those changes.
Unfortunately, the getClasspathEntries() method is called in the context of a lock on the Project. Calling refreshLocal also tries to lock the Project, but even though I am on the same thread the lock is not reentrant, so my code hangs indefinitely waiting for itself to finish!
Is there any way to perform the refresh without obtaining a new lock?
Many thanks,
Neil
|
|
|
Powered by
FUDForum. Page generated in 0.02913 seconds