@MOD.sclAction "createSTSTestAction"
ACTIONS.RunSTSTest
@MOD.sclAction "runSTSTestAction"
+ACTIONS.IgnoreSTSTest
+ @MOD.sclAction "ignoreSTSTestAction"
ACTIONS.NewSTSVariable
@MOD.sclAction "createSTSVariableAction"
VP.ActionContribution.HasNodeType TESTS.STSSuite
VP.ActionContribution.HasNodeType TESTS.STSTest
VP.ActionContribution.HasAction ACTIONS.RunSTSTest
+ VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
+ L0.HasLabel "Ignore"
+ VP.ActionContribution.HasImage SILK.control_play
+ VP.ActionContribution.HasCategory VP.EditActionCategory
+ VP.ActionContribution.HasNodeType TESTS.STSSuite
+ VP.ActionContribution.HasNodeType TESTS.STSTest
+ VP.ActionContribution.HasAction ACTIONS.IgnoreSTSTest
VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
L0.HasLabel "STS Variable"
VP.ActionContribution.HasImage SILK.page_white_edit
importJava "org.simantics.tests.modelled.ui.TestsUIUtils" where
runSTSTestAction :: Resource -> <Proc> ()
+ ignoreSTSTestAction :: [Resource] -> <Proc> ()
createSTSSuiteAction :: Resource -> <Proc> ()
createSTSSuiteAction res = do
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 {
view.currentTest(test);
view.execute();
}
+
+ public static void ignoreSTSTestAction(List<Resource> 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);
+ }
+ }
+ });
+ }
}
// // }
// // }
// return new ModuleCompilationOptions(coverage);
-// }
+ // }
// });
SCLReportingHandler handler = (SCLReportingHandler) SCLContext.getCurrent().get(SCLReportingHandler.REPORTING_HANDLER);