]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/DefaultValueTyping.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.graph.compiler / src / org / simantics / graph / compiler / internal / procedures / DefaultValueTyping.java
index a6b54b4a57062977bbaf5c84473b68ecde1b6236..98ae7b943a6e1bdbc588c124e9070e6db8d1762f 100644 (file)
@@ -1,44 +1,44 @@
-package org.simantics.graph.compiler.internal.procedures;\r
-\r
-import gnu.trove.procedure.TIntObjectProcedure;\r
-import gnu.trove.set.hash.TIntHashSet;\r
-\r
-import org.simantics.graph.compiler.internal.store.IPreValue;\r
-import org.simantics.graph.compiler.internal.store.PreValueStore;\r
-import org.simantics.graph.query.Path;\r
-import org.simantics.graph.query.Paths;\r
-import org.simantics.graph.store.GraphStore;\r
-\r
-public class DefaultValueTyping implements Runnable {\r
-\r
-       GraphStore store;\r
-       Paths paths;\r
-       \r
-       public DefaultValueTyping(Paths paths, GraphStore store) {\r
-           this.paths = paths;\r
-               this.store = store;\r
-       }\r
-\r
-       @Override\r
-       public void run() {\r
-               final int instanceOfId = store.identities.createPathToId(paths.InstanceOf);\r
-               final TIntHashSet \r
-                       instanceOfDomain = store.statements.getRelationDomain(instanceOfId);\r
-               PreValueStore preValues = store.getStore(PreValueStore.class);\r
-               preValues.forEachPreValue(new TIntObjectProcedure<IPreValue>() {                \r
-                       @Override\r
-                       public boolean execute(int a, IPreValue b) {\r
-                               if(!instanceOfDomain.contains(a)) {\r
-                                       Path defaultType = b.getDefaultType(paths);\r
-                                       if(defaultType != null)\r
-                                               store.statements.add(a, \r
-                                                               instanceOfId,\r
-                                                               store.identities.createPathToId(defaultType)\r
-                                                       );\r
-                               }\r
-                               return true;\r
-                       }\r
-               });\r
-       }       \r
-\r
-}\r
+package org.simantics.graph.compiler.internal.procedures;
+
+import gnu.trove.procedure.TIntObjectProcedure;
+import gnu.trove.set.hash.TIntHashSet;
+
+import org.simantics.graph.compiler.internal.store.IPreValue;
+import org.simantics.graph.compiler.internal.store.PreValueStore;
+import org.simantics.graph.query.Path;
+import org.simantics.graph.query.Paths;
+import org.simantics.graph.store.GraphStore;
+
+public class DefaultValueTyping implements Runnable {
+
+       GraphStore store;
+       Paths paths;
+       
+       public DefaultValueTyping(Paths paths, GraphStore store) {
+           this.paths = paths;
+               this.store = store;
+       }
+
+       @Override
+       public void run() {
+               final int instanceOfId = store.identities.createPathToId(paths.InstanceOf);
+               final TIntHashSet 
+                       instanceOfDomain = store.statements.getRelationDomain(instanceOfId);
+               PreValueStore preValues = store.getStore(PreValueStore.class);
+               preValues.forEachPreValue(new TIntObjectProcedure<IPreValue>() {                
+                       @Override
+                       public boolean execute(int a, IPreValue b) {
+                               if(!instanceOfDomain.contains(a)) {
+                                       Path defaultType = b.getDefaultType(paths);
+                                       if(defaultType != null)
+                                               store.statements.add(a, 
+                                                               instanceOfId,
+                                                               store.identities.createPathToId(defaultType)
+                                                       );
+                               }
+                               return true;
+                       }
+               });
+       }       
+
+}