From: Tuukka Lehtonen Date: Mon, 15 Jan 2018 08:39:54 +0000 (+0200) Subject: Use transient listener caching for NodePropertyTester requests X-Git-Tag: v1.43.0~136^2~625 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=72186a982dc8b076bef48313fbbd22ecc78c08bc Use transient listener caching for NodePropertyTester requests refs #7718 Change-Id: I6ccb4ef720c4fe8677c78e58fe7ee273caa7ddae --- diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NodePropertyTester.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NodePropertyTester.java index 647d0a158..2b6f7c379 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NodePropertyTester.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NodePropertyTester.java @@ -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;