X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.tests.modelled%2Fsrc%2Forg%2Fsimantics%2Ftests%2Fmodelled%2Futils%2FModelledSTSTest.java;h=94ff2b6b6a4082a78dc5f006b0038d0b22999637;hp=33e4c25e2fc6b2f121bd3e6264a1ede8b3f09068;hb=597687a4e41e9892a4b40e0de05183d930e6cc32;hpb=6abae37c9b120020fbd8a0519a3d19bb4b3335c3 diff --git a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/ModelledSTSTest.java b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/ModelledSTSTest.java index 33e4c25e2..94ff2b6b6 100644 --- a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/ModelledSTSTest.java +++ b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/ModelledSTSTest.java @@ -24,6 +24,7 @@ import org.simantics.scl.runtime.reporting.SCLReportingHandler; public class ModelledSTSTest { private final String name; + private final String parentName; private final String code; private final int priority; private final boolean ignored; @@ -33,8 +34,9 @@ public class ModelledSTSTest { private CombinedCoverage coverage; private Map variables; - ModelledSTSTest(String name, String code, int priority, boolean ignored, Set dependencies, Map variables) { + ModelledSTSTest(String name, String parentName, String code, int priority, boolean ignored, Set dependencies, Map variables) { this.name = name; + this.parentName = parentName; this.code = code; this.priority = priority; this.ignored = ignored; @@ -47,6 +49,10 @@ public class ModelledSTSTest { return name; } + public String getParentName() { + return parentName; + } + public String getCode() { return code; } @@ -94,6 +100,7 @@ public class ModelledSTSTest { public List run(List vars) throws IOException { ModuleRepository repo = new ModuleRepository(SCLOsgi.SOURCE_REPOSITORY); + CommandSession session = null; try { repo.setAdvisor(new ModuleCompilationOptionsAdvisor() { @@ -113,7 +120,7 @@ public class ModelledSTSTest { }); SCLReportingHandler handler = (SCLReportingHandler) SCLContext.getCurrent().get(SCLReportingHandler.REPORTING_HANDLER); - CommandSession session = new CommandSession(repo, handler); + session = new CommandSession(repo, handler); for (CommandSessionVariable var : vars) session.setVariable(var.getName(), var.getType(), var.getValue());