Use transient listener caching for NodePropertyTester requests 85/1385/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 15 Jan 2018 08:39:54 +0000 (10:39 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 15 Jan 2018 08:42:28 +0000 (10:42 +0200)
refs #7718

Change-Id: I6ccb4ef720c4fe8677c78e58fe7ee273caa7ddae

bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NodePropertyTester.java

index 647d0a158df4c62bec42b2e6b6fcc7440a40fe24..2b6f7c37992e3b78ad0486ffda5cc46829973ac2 100644 (file)
@@ -26,6 +26,7 @@ import org.simantics.browsing.ui.model.queries.IsNodeContextModifiable;
 import org.simantics.browsing.ui.model.queries.IsNodeContextRemovable;
 import org.simantics.db.Resource;
 import org.simantics.db.Session;
+import org.simantics.db.common.procedure.adapter.TransientCacheListener;
 import org.simantics.db.common.utils.RequestUtil;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.SelectionHints;
@@ -158,7 +159,8 @@ public class NodePropertyTester extends PropertyTester {
                                 SimanticsUI.UI_THREAD_REQUEST_START_TIMEOUT,
                                 SimanticsUI.UI_THREAD_REQUEST_EXECUTION_TIMEOUT,
                                 false,
-                                new IsNodeContextRemovable( nc ) );
+                                new IsNodeContextRemovable( nc ),
+                                TransientCacheListener.instance());
                 } catch (DatabaseException | InterruptedException e) {
                 }
                 return false;
@@ -185,7 +187,8 @@ public class NodePropertyTester extends PropertyTester {
                                 SimanticsUI.UI_THREAD_REQUEST_START_TIMEOUT,
                                 SimanticsUI.UI_THREAD_REQUEST_EXECUTION_TIMEOUT,
                                 false,
-                                new IsNodeContextModifiable( nc ) );
+                                new IsNodeContextModifiable( nc ),
+                                TransientCacheListener.instance());
                 } catch (DatabaseException | InterruptedException e) {
                 }
                 return false;