From: Tuukka Lehtonen Date: Tue, 25 Oct 2016 05:50:44 +0000 (+0300) Subject: Merge commit 'e87f096' X-Git-Tag: v1.25.0~64 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=591f4572f18d20a08a797a8e5c4a8dfc1b3320c1;hp=2a8d452434358e28cb826744bc01755a46455afd Merge commit 'e87f096' 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 {