]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Immutable resources were modified during import (refs #3785)
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 16 Oct 2012 10:16:33 +0000 (10:16 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 16 Oct 2012 10:16:33 +0000 (10:16 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26024 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModelHandler.java

index 024bb2291a8104b337fc2a249c47785560ff9851..827705498ec55f6dfaf1c970514ed41a6962b47f 100644 (file)
@@ -45,6 +45,7 @@ import org.simantics.graph.representation.TransferableGraph1;
 import org.simantics.issues.ontology.IssueResource;\r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.layer0.utils.direct.GraphUtils;\r
+import org.simantics.modeling.utils.BatchValidations;\r
 import org.simantics.operation.Layer0X;\r
 import org.simantics.simulation.ontology.SimulationResource;\r
 import org.simantics.structural.stubs.StructuralResource2;\r
@@ -169,6 +170,16 @@ public class ImportModelHandler extends AbstractHandler {
                                        }\r
 \r
                                });\r
+                               \r
+\r
+                               try {\r
+                                   BatchValidations.runAll(null, ModelRoot);\r
+                               } catch(Throwable t) {\r
+                                   t.printStackTrace();\r
+                               } \r
+\r
+\r
+                               \r
                        } catch (DatabaseException e) {\r
                                e.printStackTrace();\r
                        }\r