From: Tuukka Lehtonen Date: Tue, 25 Oct 2016 05:50:09 +0000 (+0300) Subject: Sync git svn branch with SVN repository r33359. X-Git-Tag: v1.25.0~64^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=e87f096;p=simantics%2Fplatform.git Sync git svn branch with SVN repository r33359. refs #6786 --- diff --git a/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java b/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java index 7412c6ccf..d2738d844 100644 --- a/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java +++ b/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java @@ -12,6 +12,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener; +import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.exception.MissingVariableValueException; import org.simantics.db.layer0.request.ResourceToPossibleVariable; @@ -228,7 +229,7 @@ public class Synchronizer { } if(changeFlags == null) { - // Full synchronization, synchronize all childre + // Full synchronization, synchronize all children if(children.size() > 0) { double proportionOfWorkForChildren = proportionOfWork / children.size(); for(Variable child : children) @@ -236,6 +237,9 @@ public class Synchronizer { } else { didWork(proportionOfWork); + // Full synchronization is cancelable + if(monitor != null && monitor.isCanceled()) + throw new CancelTransactionException(); } } else {