From: jsimomaa Date: Tue, 16 Sep 2014 07:19:07 +0000 (+0000) Subject: refs #5314 X-Git-Tag: v1.29.0~174 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=08ca2aabe57d6c55a59dd7c9302a0f6de3667c6d;p=simantics%2Fsysdyn.git 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 --- 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(); }