]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/ConcreteModule.java
Collect reference hierarchy for SCL values
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / module / ConcreteModule.java
index 73311e99ab9ab4a17f087d1f215b15de89286929..8a83e5f35644631bdc58c568dd70c275a264109d 100644 (file)
@@ -22,6 +22,7 @@ import org.simantics.scl.compiler.elaboration.rules.TransformationRule;
 import org.simantics.scl.compiler.environment.filter.NamespaceFilter;
 import org.simantics.scl.compiler.errors.CompilationError;
 import org.simantics.scl.compiler.internal.codegen.effects.EffectConstructor;
+import org.simantics.scl.compiler.module.debug.ModuleDebugInfo;
 import org.simantics.scl.compiler.top.ModuleInitializer;
 import org.simantics.scl.compiler.types.TCon;
 import org.simantics.scl.runtime.profiling.BranchPoint;
@@ -33,6 +34,7 @@ import gnu.trove.procedure.TObjectProcedure;
 public class ConcreteModule implements Module {
     String moduleName;
     String defaultLocalName;
+    String deprecation;
     THashMap<String, TypeDescriptor> typeDescriptors = new THashMap<String, TypeDescriptor>();
     THashMap<String, EffectConstructor> effectConstructors = new THashMap<String, EffectConstructor>();
     THashMap<String, TypeClass> typeClasses = new THashMap<String, TypeClass>();
@@ -53,6 +55,8 @@ public class ConcreteModule implements Module {
     ModuleInitializer moduleInitializer;
 
     protected Documentation documentation;
+    
+    public ModuleDebugInfo moduleDebugInfo;
 
     public ConcreteModule(String moduleName) {
         this.moduleName = moduleName;
@@ -248,7 +252,7 @@ public class ConcreteModule implements Module {
         this.values.forEachEntry(new TObjectObjectProcedure<String,SCLValue>() {
             @Override
             public boolean execute(String name, SCLValue value) {
-                if(value.isPrivate())
+                if(value.isPrivateOrDerived())
                     return true;
                 String lowerPrefix = prefix.toLowerCase();
                 String lowerName = name.toLowerCase();
@@ -268,6 +272,11 @@ public class ConcreteModule implements Module {
                 consumer.accept(value);
         });
     }
+    
+    @Override
+    public List<String> getValueNames() {
+        return new ArrayList<String>(values.keySet());
+    }
 
     public Collection<SCLRelation> getRelations() {
         return relations.values();
@@ -326,4 +335,18 @@ public class ConcreteModule implements Module {
     public void addRuleset(String name, CHRRuleset ruleset) {
         rulesets.put(name, ruleset);
     }
+
+    @Override
+    public String getDeprecation() {
+        return deprecation;
+    }
+
+    public void setDeprecation(String deprecation) {
+        this.deprecation = deprecation;
+    }
+    
+    @Override
+    public ModuleDebugInfo getModuleDebugInfo() {
+        return moduleDebugInfo;
+    }
 }