X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FUndoRedoSupportImpl.java;h=e492f68337e3ba01ae76dd54cd71a07b7e16027e;hb=HEAD;hp=8b939041031671de5ea875e1cd1f1793464bc44e;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/UndoRedoSupportImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/UndoRedoSupportImpl.java index 8b9390410..e492f6833 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/UndoRedoSupportImpl.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/UndoRedoSupportImpl.java @@ -44,9 +44,9 @@ public class UndoRedoSupportImpl implements UndoRedoSupport { final Operation fop = (Operation)ops.toArray()[0]; final DataContainer id = new DataContainer(0L); final TaskHelper th = new TaskHelper("Undo"); - session.requestManager.scheduleWrite(new SessionTask(null, 0) { + session.requestManager.scheduleWrite(new SessionTask(null) { @Override - public void run(int thread) { + public void run0(int thread) { session.flushCounter = 0; session.clusterStream.reallyFlush(); ClientChangesImpl cs = new ClientChangesImpl(session); @@ -93,9 +93,9 @@ public class UndoRedoSupportImpl implements UndoRedoSupport { um.setTypeAndRange(false, ope.getId(), ope.getCSId()); writer.addMetadata(um); } - session.getQueryProvider2().performDirtyUpdates(writer); + session.getQueryProvider2().propagateChangesInQueryCache(writer); session.fireMetadataListeners(writer, cs); - session.getQueryProvider2().performScheduledUpdates(writer); + session.getQueryProvider2().listening.fireListeners(writer); session.fireReactionsToSynchronize(cs); session.fireSessionVariableChange(SessionVariables.QUEUED_WRITES); session.printDiagnostics(); @@ -106,6 +106,8 @@ public class UndoRedoSupportImpl implements UndoRedoSupport { e.printStackTrace(); Logger.defaultLogError(e); th.throwableSet(e); + } finally { + cs.dispose(); } } });