]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scl/SCLUtil.java
White space clean-up
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scl / SCLUtil.java
index 9007432b329f81f86a3a1b2db2a33695c812410c..ae6bac4baeff7716b0795d16ceb8b780b2e6a88c 100644 (file)
@@ -17,57 +17,57 @@ import org.simantics.plant3d.utils.ComponentUtils;
 import org.simantics.plant3d.utils.P3DUtil;
 
 public class SCLUtil {
-    
-    public static P3DScriptNodeMap load(final Resource root) throws DatabaseException {
-        try {
-            ControlPointFactory.preloadCache();
-            ComponentUtils.preloadCache();
-        } catch (Exception e) {
-            throw new DatabaseException(e);
-        }
-        return Simantics.getSession().syncRequest(new Read<P3DScriptNodeMap>() {
-            @Override
-            public P3DScriptNodeMap perform(ReadGraph graph) throws DatabaseException {
-                PipingRules.setEnabled(false);
-                IMappingSchema<Resource, Object> schema = SchemaBuilder.getSchema(graph);
-                IMapping mapping = Mappings.createWithListening(schema);
-                P3DRootNode rootNode = (P3DRootNode)mapping.map(graph, root);
-                try {
-                    P3DUtil.finalizeDBLoad(rootNode);
-                } catch (Exception e) {
-                    throw new DatabaseException(e);
-                }
-                P3DScriptNodeMap nodeMap = new P3DScriptNodeMap(Simantics.getSession(), mapping, rootNode);
-                return nodeMap;
-                
-            }
-        });
-        
-    }
-    
-    public static P3DRootNode loadReadOnly(final Resource root) throws DatabaseException {
-        try {
-            ControlPointFactory.preloadCache();
-            ComponentUtils.preloadCache();
-        } catch (Exception e) {
-            throw new DatabaseException(e);
-        }
-        return Simantics.getSession().syncRequest(new Read<P3DRootNode>() {
-            @Override
-            public P3DRootNode perform(ReadGraph graph) throws DatabaseException {
-                PipingRules.setEnabled(false);
-                IMappingSchema<Resource, Object> schema = SchemaBuilder.getSchema(graph);
-                IMapping mapping = Mappings.createWithoutListening(schema);
-                P3DRootNode rootNode = (P3DRootNode)mapping.map(graph, root);
-                try {
-                    P3DUtil.finalizeDBLoad(rootNode);
-                } catch (Exception e) {
-                    throw new DatabaseException(e);
-                }
-                return rootNode;
-                
-            }
-        });
-    }
+       
+       public static P3DScriptNodeMap load(final Resource root) throws DatabaseException {
+               try {
+                       ControlPointFactory.preloadCache();
+                       ComponentUtils.preloadCache();
+               } catch (Exception e) {
+                       throw new DatabaseException(e);
+               }
+               return Simantics.getSession().syncRequest(new Read<P3DScriptNodeMap>() {
+                       @Override
+                       public P3DScriptNodeMap perform(ReadGraph graph) throws DatabaseException {
+                               PipingRules.setEnabled(false);
+                               IMappingSchema<Resource, Object> schema = SchemaBuilder.getSchema(graph);
+                               IMapping mapping = Mappings.createWithListening(schema);
+                               P3DRootNode rootNode = (P3DRootNode)mapping.map(graph, root);
+                               try {
+                                       P3DUtil.finalizeDBLoad(rootNode);
+                               } catch (Exception e) {
+                                       throw new DatabaseException(e);
+                               }
+                               P3DScriptNodeMap nodeMap = new P3DScriptNodeMap(Simantics.getSession(), mapping, rootNode);
+                               return nodeMap;
+                               
+                       }
+               });
+               
+       }
+       
+       public static P3DRootNode loadReadOnly(final Resource root) throws DatabaseException {
+               try {
+                       ControlPointFactory.preloadCache();
+                       ComponentUtils.preloadCache();
+               } catch (Exception e) {
+                       throw new DatabaseException(e);
+               }
+               return Simantics.getSession().syncRequest(new Read<P3DRootNode>() {
+                       @Override
+                       public P3DRootNode perform(ReadGraph graph) throws DatabaseException {
+                               PipingRules.setEnabled(false);
+                               IMappingSchema<Resource, Object> schema = SchemaBuilder.getSchema(graph);
+                               IMapping mapping = Mappings.createWithoutListening(schema);
+                               P3DRootNode rootNode = (P3DRootNode)mapping.map(graph, root);
+                               try {
+                                       P3DUtil.finalizeDBLoad(rootNode);
+                               } catch (Exception e) {
+                                       throw new DatabaseException(e);
+                               }
+                               return rootNode;
+                               
+                       }
+               });
+       }
 
 }