]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/environment/EmptyNamespace.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / environment / EmptyNamespace.java
index ed08b7b690864191f88cec3baf47cfd5d84c2ef9..9e86a7e9d4f159ff8e230668d390b9818829687a 100644 (file)
@@ -1,9 +1,11 @@
 package org.simantics.scl.compiler.environment;
 
+import java.util.Collection;
+import java.util.Collections;
 import java.util.function.Consumer;
 
+import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
 import org.simantics.scl.compiler.elaboration.modules.SCLValue;
-import org.simantics.scl.compiler.elaboration.modules.TypeAlias;
 import org.simantics.scl.compiler.elaboration.modules.TypeClass;
 import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;
 import org.simantics.scl.compiler.elaboration.relations.SCLEntityType;
@@ -23,6 +25,11 @@ public enum EmptyNamespace implements Namespace {
     public Namespace getNamespace(String name) {
         return null;
     }
+    
+    @Override
+    public Collection<String> getNamespaces() {
+        return Collections.emptyList();
+    }
 
     @Override
     public SCLValue getValue(String name) throws AmbiguousNameException {
@@ -39,10 +46,9 @@ public enum EmptyNamespace implements Namespace {
             throws AmbiguousNameException {
         return null;
     }
-
+    
     @Override
-    public TypeConstructor getTypeConstructor(String name)
-            throws AmbiguousNameException {
+    public TypeConstructor getTypeDescriptor(String name) throws AmbiguousNameException {
         return null;
     }
 
@@ -57,11 +63,6 @@ public enum EmptyNamespace implements Namespace {
         return null;
     }
 
-    @Override
-    public TypeAlias getTypeAlias(String name) throws AmbiguousNameException {
-        return null;
-    }
-
     @Override
     public MappingRelation getMappingRelation(String name)
             throws AmbiguousNameException {
@@ -80,4 +81,9 @@ public enum EmptyNamespace implements Namespace {
     @Override
     public void findTypesForPrefix(String prefix, NamespaceFilter filter, Consumer<TCon> consumer) {
     }
+
+    @Override
+    public CHRRuleset getRuleset(String name) throws AmbiguousNameException {
+        return null;
+    }
 }