From 08ca2aabe57d6c55a59dd7c9302a0f6de3667c6d Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Tue, 16 Sep 2014 07:19:07 +0000 Subject: [PATCH] refs #5314 Add cache listener to DiagramFinderRequest calls git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30284 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/ui/editor/OpenDiagramFromComponentAdapter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/OpenDiagramFromComponentAdapter.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/OpenDiagramFromComponentAdapter.java index 1ff6f174..5456e92a 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/OpenDiagramFromComponentAdapter.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/OpenDiagramFromComponentAdapter.java @@ -9,6 +9,7 @@ import org.eclipse.ui.IEditorPart; import org.simantics.Simantics; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener; import org.simantics.db.common.request.UnaryRead; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.request.PossibleModel; @@ -45,7 +46,7 @@ public class OpenDiagramFromComponentAdapter extends AbstractResourceEditorAdapt @Override public boolean canHandle(ReadGraph graph, Object input) throws DatabaseException { - Collection rs = graph.syncRequest(new DiagramFinderRequest(input)); + Collection rs = graph.syncRequest(new DiagramFinderRequest(input), TransientCacheAsyncListener.>instance()); return !rs.isEmpty(); } @@ -74,7 +75,7 @@ public class OpenDiagramFromComponentAdapter extends AbstractResourceEditorAdapt if (d == null) return; - Collection rs = Simantics.getSession().syncRequest(new DiagramFinderRequest(input)); + Collection rs = Simantics.getSession().syncRequest(new DiagramFinderRequest(input), TransientCacheAsyncListener.>instance()); for (Runnable runnable : rs) { runnable.run(); } -- 2.47.1