From 22714bf9eacc1a767295254834087ebcf87e69a7 Mon Sep 17 00:00:00 2001 From: lehtonen Date: Fri, 30 Oct 2015 08:37:07 +0000 Subject: [PATCH] Fixed non-compiling code after merging r31889 from simantics-1.18 branches to trunks in r31897. refs #6113 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@31903 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../org/simantics/sysdyn/utils/imports/ImportUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/ImportUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/ImportUtils.java index 18be49f7..bfbc6bad 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/ImportUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/ImportUtils.java @@ -53,11 +53,13 @@ import org.simantics.db.layer0.migration.MigrationUtils; import org.simantics.db.layer0.util.Layer0Utils; import org.simantics.db.layer0.util.ModelDependenciesBean; import org.simantics.db.layer0.util.ModelDependency; +import org.simantics.db.layer0.util.ModelTransferableGraphSourceRequest; import org.simantics.db.layer0.util.RemoverUtil; import org.simantics.db.request.Read; import org.simantics.diagram.stubs.DiagramResource; import org.simantics.issues.common.AllBatchIssueSources; import org.simantics.issues.common.BatchIssueSource; +import org.simantics.issues.common.BatchIssueValidationContext; import org.simantics.issues.ontology.IssueResource; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; @@ -267,9 +269,11 @@ public class ImportUtils { SubMonitor progress = null; if(monitor != null) progress = SubMonitor.convert(monitor, "Validate Model", 100); - Collection contexts = Collections.singletonList(conf); + BatchIssueValidationContext context = new BatchIssueValidationContext(); + context.domain = ModelTransferableGraphSourceRequest.getDomainOnly(session, monitor, conf); + context.contexts = BatchValidations.fillConfig(progress, Collections.singletonList(conf)); for(BatchIssueSource bis : validations) { - Map> is = BatchValidations.validate(monitor != null ? progress.newChild(90, SubMonitor.SUPPRESS_NONE) : null, bis, contexts); + Map> is = BatchValidations.validate(monitor != null ? progress.newChild(90, SubMonitor.SUPPRESS_NONE) : null, bis, context); BatchValidations.store(monitor != null ? progress.newChild(10, SubMonitor.SUPPRESS_NONE) : null, bis.getResource(), is); } } -- 2.47.1