From b8504bad7201fa224682f27ee88d2d90310888fc Mon Sep 17 00:00:00 2001 From: "jussi.koskela" Date: Mon, 19 Jan 2015 11:35:01 +0000 Subject: [PATCH] (fixes #5621) SysdynFunctionLibraryImportAdvisor.java did not compile git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30829 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../imports/SysdynFunctionLibraryImportAdvisor.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/SysdynFunctionLibraryImportAdvisor.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/SysdynFunctionLibraryImportAdvisor.java index 3373d68f..e948c9ff 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/SysdynFunctionLibraryImportAdvisor.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/imports/SysdynFunctionLibraryImportAdvisor.java @@ -48,13 +48,18 @@ public class SysdynFunctionLibraryImportAdvisor extends DefaultPasteImportAdviso @Override public Resource createRoot(WriteOnlyGraph graph, Root root) throws DatabaseException { + Layer0 l0 = graph.getService(Layer0.class); - this.root = graph.newResource(); - graph.claim(library, l0.ConsistsOf, l0.PartOf, this.root); + + Resource rootResource = graph.newResource(); + graph.claim(library, l0.ConsistsOf, l0.PartOf, rootResource); String name = root.name; String newName = nameMappings.get(name); - graph.addLiteral(this.root, l0.HasName, l0.NameOf, l0.String, newName, Bindings.STRING); - return this.root; + graph.addLiteral(rootResource, l0.HasName, l0.NameOf, l0.String, newName, Bindings.STRING); + + addRootInfo(root, newName, rootResource); + + return rootResource; } -- 2.47.1