X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscl%2FSCLUtil.java;h=1070803046ec1e38eed5279682c03bc2320dc805;hb=790fd1f45553169b0fdc646f85c86d9e933912a4;hp=ae6bac4baeff7716b0795d16ceb8b780b2e6a88c;hpb=53d55c24c779745f188bdb18d32f71d20acb61b2;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scl/SCLUtil.java b/org.simantics.plant3d/src/org/simantics/plant3d/scl/SCLUtil.java index ae6bac4b..10708030 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scl/SCLUtil.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scl/SCLUtil.java @@ -9,6 +9,7 @@ import org.simantics.db.request.Read; import org.simantics.objmap.graph.IMapping; import org.simantics.objmap.graph.Mappings; import org.simantics.objmap.graph.schema.IMappingSchema; +import org.simantics.plant3d.ontology.Plant3D; import org.simantics.plant3d.scenegraph.P3DRootNode; import org.simantics.plant3d.scenegraph.SchemaBuilder; import org.simantics.plant3d.scenegraph.controlpoint.ControlPointFactory; @@ -20,7 +21,7 @@ public class SCLUtil { public static P3DScriptNodeMap load(final Resource root) throws DatabaseException { try { - ControlPointFactory.preloadCache(); + ControlPointFactory.preloadCache(Plant3D.URIs.Builtin); ComponentUtils.preloadCache(); } catch (Exception e) { throw new DatabaseException(e); @@ -30,10 +31,12 @@ public class SCLUtil { public P3DScriptNodeMap perform(ReadGraph graph) throws DatabaseException { PipingRules.setEnabled(false); IMappingSchema schema = SchemaBuilder.getSchema(graph); - IMapping mapping = Mappings.createWithListening(schema); + IMapping mapping = Mappings.createWithListening(schema); P3DRootNode rootNode = (P3DRootNode)mapping.map(graph, root); try { P3DUtil.finalizeDBLoad(rootNode); + // FIXME: Something needs to be done here... + P3DUtil.finalizeDBLoad2(rootNode); } catch (Exception e) { throw new DatabaseException(e); } @@ -47,7 +50,7 @@ public class SCLUtil { public static P3DRootNode loadReadOnly(final Resource root) throws DatabaseException { try { - ControlPointFactory.preloadCache(); + ControlPointFactory.preloadCache(Plant3D.URIs.Builtin); ComponentUtils.preloadCache(); } catch (Exception e) { throw new DatabaseException(e); @@ -57,10 +60,11 @@ public class SCLUtil { public P3DRootNode perform(ReadGraph graph) throws DatabaseException { PipingRules.setEnabled(false); IMappingSchema schema = SchemaBuilder.getSchema(graph); - IMapping mapping = Mappings.createWithoutListening(schema); + IMapping mapping = Mappings.createWithoutListening(schema); P3DRootNode rootNode = (P3DRootNode)mapping.map(graph, root); try { P3DUtil.finalizeDBLoad(rootNode); + P3DUtil.finalizeDBLoad2(rootNode); } catch (Exception e) { throw new DatabaseException(e); }