]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added L0.typeResource SCL type to SCLTypeUtils to prevent warning prints 51/2551/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Dec 2018 13:32:44 +0000 (15:32 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Dec 2018 13:32:44 +0000 (15:32 +0200)
gitlab #83

Change-Id: I811959a6ef16fa57710b67aea2f454cef1cf2206

bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java

index d0a777caa8ffbdf061c1f64b003ae24f2d4d3608..27955fb7ee2ae99d95eab3d19653e71c8bbc7441 100644 (file)
@@ -58,7 +58,13 @@ public class SCLTypeUtils {
         TYPE_MAP.put("Vector Double", Types.vector(Types.DOUBLE));
         TYPE_MAP.put("Vector String", Types.vector(Types.STRING));
         TYPE_MAP.put("ByteArray", Types.BYTE_ARRAY);
         TYPE_MAP.put("Vector Double", Types.vector(Types.DOUBLE));
         TYPE_MAP.put("Vector String", Types.vector(Types.STRING));
         TYPE_MAP.put("ByteArray", Types.BYTE_ARRAY);
-        
+
+        // #83: L0.typeResource
+        TCon variable = Types.con("Simantics/Variables", "Variable");
+        add(variable);
+        TYPE_MAP.put("Variable -> Resource -> <ReadGraph> Resource",
+                Types.functionE(new Type[] {variable, Types.RESOURCE}, Types.READ_GRAPH, Types.RESOURCE));
+
         add((TCon)Types.RESOURCE);
         add(Types.con("Simantics/GUID", "GUID")); // L0.GUID
         add(Types.con("Simantics/Variables", "StructuredProperty")); // L0.methods
         add((TCon)Types.RESOURCE);
         add(Types.con("Simantics/GUID", "GUID")); // L0.GUID
         add(Types.con("Simantics/Variables", "StructuredProperty")); // L0.methods