]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NodePropertyTester.java
Use transient listener caching for NodePropertyTester requests
[simantics/platform.git] / 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;