]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
(fixes #5621) SysdynFunctionLibraryImportAdvisor.java did not compile
authorjussi.koskela <jussi.koskela@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 19 Jan 2015 11:35:01 +0000 (11:35 +0000)
committerjussi.koskela <jussi.koskela@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 19 Jan 2015 11:35:01 +0000 (11:35 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30829 ac1ea38d-2e2b-0410-8846-a27921b304fc

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

index 3373d68fc4961892c8b88be66b678a0fcacd3df1..e948c9ff6730f84d2bcfdf9b5b536da04037b5ba 100644 (file)
@@ -48,13 +48,18 @@ public class SysdynFunctionLibraryImportAdvisor extends DefaultPasteImportAdviso
     \r
     @Override\r
     public Resource createRoot(WriteOnlyGraph graph, Root root) throws DatabaseException {\r
+       \r
         Layer0 l0 = graph.getService(Layer0.class);\r
-        this.root = graph.newResource();\r
-        graph.claim(library, l0.ConsistsOf, l0.PartOf, this.root);\r
+\r
+        Resource rootResource = graph.newResource();\r
+        graph.claim(library, l0.ConsistsOf, l0.PartOf, rootResource);\r
         String name = root.name;\r
         String newName = nameMappings.get(name);\r
-        graph.addLiteral(this.root, l0.HasName, l0.NameOf, l0.String, newName, Bindings.STRING);\r
-        return this.root;\r
+        graph.addLiteral(rootResource, l0.HasName, l0.NameOf, l0.String, newName, Bindings.STRING);\r
+        \r
+               addRootInfo(root, newName, rootResource);\r
+\r
+        return rootResource;\r
 \r
     }\r
         \r