Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » WorkspaceSynchronizer.Delegate [newbie]
WorkspaceSynchronizer.Delegate [newbie] [message #621088] Mon, 06 July 2009 10:16
Eclipse UserFriend
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
Previous Topic:WorkspaceSynchronizer.Delegate [newbie]
Next Topic:Teneo + EclipseLink simple complete example
Goto Forum:
  


Current Time: Fri Apr 26 15:27:59 GMT 2024

Powered by FUDForum. Page generated in 0.02867 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top