X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.tests.modelled.ui%2Fsrc%2Forg%2Fsimantics%2Ftests%2Fmodelled%2Fui%2FTestsUIUtils.java;h=b24f445e23c985e317f652f628e435a0135a3b53;hp=651ee47df7282751f3e891b11dcce3e5588b2caa;hb=93e70f713558f9826b78ad54929f80e52d8c824b;hpb=fe1a2f532761669e67da4db4ae15096ced8a04db diff --git a/bundles/org.simantics.tests.modelled.ui/src/org/simantics/tests/modelled/ui/TestsUIUtils.java b/bundles/org.simantics.tests.modelled.ui/src/org/simantics/tests/modelled/ui/TestsUIUtils.java index 651ee47df..b24f445e2 100644 --- a/bundles/org.simantics.tests.modelled.ui/src/org/simantics/tests/modelled/ui/TestsUIUtils.java +++ b/bundles/org.simantics.tests.modelled.ui/src/org/simantics/tests/modelled/ui/TestsUIUtils.java @@ -1,10 +1,16 @@ package org.simantics.tests.modelled.ui; import java.io.IOException; +import java.util.List; import org.eclipse.e4.ui.model.application.ui.basic.MPart; +import org.simantics.Simantics; +import org.simantics.databoard.Bindings; import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.request.Write; +import org.simantics.tests.modelled.ontology.TestsResource; import org.simantics.ui.workbench.e4.E4WorkbenchUtils; public class TestsUIUtils { @@ -20,4 +26,17 @@ public class TestsUIUtils { view.currentTest(test); view.execute(); } + + public static void ignoreSTSTestAction(List tests) throws DatabaseException { + Simantics.getSession().syncRequest(new Write() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + TestsResource TESTS = TestsResource.getInstance(graph); + for (Resource test : tests) { + graph.claimLiteral(test, TESTS.ignore, true, Bindings.BOOLEAN); + } + } + }); + } }