]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/ConcreteModule.java
Merge "Not possible to open declaration of SCL module from relative path (F3)"
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / module / ConcreteModule.java
index 2f6d52bdba63298ad51c6de3e4f2c8fe3c5b6b89..697e64ef805e1eafc53300cb37c49c79c66b4e8e 100644 (file)
@@ -19,6 +19,7 @@ import org.simantics.scl.compiler.elaboration.relations.SCLRelation;
 import org.simantics.scl.compiler.elaboration.rules.MappingRelation;
 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.top.ModuleInitializer;
 import org.simantics.scl.compiler.types.TCon;
@@ -41,8 +42,10 @@ public class ConcreteModule implements Module {
     THashMap<String, MappingRelation> mappingRelations = new THashMap<String, MappingRelation>();
     ArrayList<ImportDeclaration> dependencies = new ArrayList<ImportDeclaration>();
     THashMap<String, BranchPoint[]> branchPoints;
-
+    CompilationError[] warnings = CompilationError.EMPTY_ARRAY;
+    
     Map<String, byte[]> classes = Collections.emptyMap();
+    ClassLoader parentClassLoader;
     ModuleInitializer moduleInitializer;
 
     protected Documentation documentation;
@@ -267,6 +270,24 @@ public class ConcreteModule implements Module {
 
     @Override
     public void dispose() {
-        
+    }
+    
+    public void setWarnings(CompilationError[] warnings) {
+        this.warnings = warnings;
+    }
+    
+    public CompilationError[] getWarnings() {
+        return warnings;
+    }
+    
+    @Override
+    public ClassLoader getParentClassLoader() {
+        return parentClassLoader;
+    }
+    
+    public void setParentClassLoader(ClassLoader parentClassLoader) {
+        if(parentClassLoader == null)
+            throw new NullPointerException();
+        this.parentClassLoader = parentClassLoader;
     }
 }