]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fixed non-compiling code after merging r31889 from simantics-1.18 branches to trunks...
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 30 Oct 2015 08:37:07 +0000 (08:37 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 30 Oct 2015 08:37:07 +0000 (08:37 +0000)
refs #6113

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@31903 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/ImportUtils.java

index 18be49f708d1ef6ce3624aea23e6f4351c295af7..bfbc6bad6f03d8c979f702532f1f7773b98151f1 100644 (file)
@@ -53,11 +53,13 @@ import org.simantics.db.layer0.migration.MigrationUtils;
 import org.simantics.db.layer0.util.Layer0Utils;\r
 import org.simantics.db.layer0.util.ModelDependenciesBean;\r
 import org.simantics.db.layer0.util.ModelDependency;\r
+import org.simantics.db.layer0.util.ModelTransferableGraphSourceRequest;\r
 import org.simantics.db.layer0.util.RemoverUtil;\r
 import org.simantics.db.request.Read;\r
 import org.simantics.diagram.stubs.DiagramResource;\r
 import org.simantics.issues.common.AllBatchIssueSources;\r
 import org.simantics.issues.common.BatchIssueSource;\r
+import org.simantics.issues.common.BatchIssueValidationContext;\r
 import org.simantics.issues.ontology.IssueResource;\r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.layer0.utils.direct.GraphUtils;\r
@@ -267,9 +269,11 @@ public class ImportUtils {
                         SubMonitor progress = null;\r
                         if(monitor != null)\r
                             progress = SubMonitor.convert(monitor, "Validate Model", 100);\r
-                        Collection<Resource> contexts = Collections.singletonList(conf);\r
+                        BatchIssueValidationContext context = new BatchIssueValidationContext();\r
+                        context.domain = ModelTransferableGraphSourceRequest.getDomainOnly(session, monitor, conf);\r
+                        context.contexts = BatchValidations.fillConfig(progress, Collections.singletonList(conf));\r
                         for(BatchIssueSource bis : validations) {\r
-                            Map<Resource, Set<Issue>> is = BatchValidations.validate(monitor != null ? progress.newChild(90, SubMonitor.SUPPRESS_NONE) : null, bis, contexts);\r
+                            Map<Resource, Set<Issue>> is = BatchValidations.validate(monitor != null ? progress.newChild(90, SubMonitor.SUPPRESS_NONE) : null, bis, context);\r
                             BatchValidations.store(monitor != null ? progress.newChild(10, SubMonitor.SUPPRESS_NONE) : null, bis.getResource(), is);\r
                         }\r
                     }\r