]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/LazyModule.java
Expose CommandSession in SCL
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / module / LazyModule.java
index 61d2c29288992f63ddb6ab2209a9336f86e918d8..dc1e40e7321e3097d84be7c439aeb7a5a0c10cb6 100644 (file)
@@ -2,7 +2,9 @@ package org.simantics.scl.compiler.module;
 
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.simantics.scl.compiler.constants.Constant;
 import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
@@ -25,10 +27,10 @@ import gnu.trove.map.hash.THashMap;
 
 public abstract class LazyModule implements Module {
 
-    String moduleName;
-    private THashMap<String, SCLValue> values = new THashMap<String, SCLValue>();
-    private THashMap<String, SCLRelation> relations = new THashMap<String, SCLRelation>();
-    private THashMap<String, SCLEntityType> entityTypes = new THashMap<String, SCLEntityType>();
+    private final String moduleName;
+    private final Map<String, SCLValue> values = Collections.synchronizedMap(new HashMap<String, SCLValue>());
+    private final Map<String, SCLRelation> relations = Collections.synchronizedMap(new HashMap<String, SCLRelation>());
+    private final Map<String, SCLEntityType> entityTypes = Collections.synchronizedMap(new HashMap<String, SCLEntityType>());
     
     protected abstract SCLValue createValue(String name);
     
@@ -152,4 +154,9 @@ public abstract class LazyModule implements Module {
     public CHRRuleset getRuleset(String name) {
         return null;
     }
+    
+    @Override
+    public String getDeprecation() {
+        return null;
+    }
 }