WorkspaceSynchronizer.Delegate [newbie] [message #621088] |
Mon, 06 July 2009 10:16 |
Eclipse User |
|
|
|
Originally posted by: luca_picello.mentor.com
Hallo folks,
ignoredResources is always ignored in handleResourceChanged()
public class ModelEditingDomainFactory implements
TransactionalEditingDomain.Factory {
private static Vector<Resource> ignoredResources = new Vector<Resource>();
public static void ignoreResourceChange(Resource res) {
if (!ignoredResources.contains(res))
ignoredResources.add(res);
}
private class WorkspaceSynchronizerDelegate implements
WorkspaceSynchronizer.Delegate {
public boolean handleResourceChanged(Resource resource) {
if (ignoredResources.contains(resource))
// We are to absorb any change for this resource
return true;
when
protected void execute(IProgressMonitor monitor) throws CoreException,
InvocationTargetException, InterruptedException {
try {
ModelEditingDomainFactory.ignoreResourceChange(res);
res.save(Collections.EMPTY_MAP);
ModelEditingDomainFactory.acceptResourceChange(res);
From the previous code I assume the
ModelEditingDomainFactory.acceptResourceChange() requires to be finish: no
more pending handleResourceChanged() should be invoked.
But it is not true as handleResourceChanged() is called AFTER
acceptResourceChange().
Did anybody encounter the same issue or can suggest a solution?
Thank you in advance,
Luca
|
|
|
Powered by
FUDForum. Page generated in 0.03386 seconds