Resending
this … my first subscription request had failed.
Hi,
I have
checked many of the threads on this subject for a solution but so far to no
avail. Posting now as a last resort.
The problem
I have is this.
Our plugin
maintains a file which has assiciations to Markers which may be placed on many
other Resource objects in the system.
We need to
be able to detect when the file is removed and also remove the associated
markers from th eother resources.
We have tried
using POST_CHANGE to track this change but discovered that we cannot remove the
markers at this time since the Resource tree is locked.
We also
tried using POST_AUTO_BUILD, but this did not report all of the intervening
Resource changes , so the Resource removal was not
detected.
One message
thread from way back in Jan 2002, suggested issuing a WorkSpace lock which
should block until the lock is released.
I tried this
but discovered that even though the tree was still locked the WorkspaceLock
returned immediately. See code below.
IWorkspace workspace = ResourcesPlugin.getWorkspace();
WorkspaceLock lock = new WorkspaceLock(workspace);
lock.acquire();
Am I missing
something or is there a better way of doing this.
Regards
Fergal
Dearle