]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/relations/CHRConstraint.java
Refactoring CHR handling code
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / relations / CHRConstraint.java
index 8b7c122a98458b1a8fa5fbac7e745ae36edb72cf..839f0930e23cc276d1538a57e25217555739b130 100644 (file)
@@ -81,11 +81,14 @@ public class CHRConstraint extends Symbol implements CHRRelation {
         this.name = name;
         this.parameterTypes = parameterTypes;
     }
+    
+    public void setParent(CHRRuleset parentRuleset) {
+        this.parentRuleset = parentRuleset;
+    }
 
     public void initializeCodeGeneration(CompilationContext context, CHRRuleset parentRuleset) {
         JavaTypeTranslator jtt = context.javaTypeTranslator;
         
-        this.parentRuleset = parentRuleset;
         this.factClassName = parentRuleset.runtimeRulesetClassName + "$" + name;
         TCon factTypeConstructor = Types.con(parentRuleset.runtimeRulesetType.module, parentRuleset.runtimeRulesetType.name + "$" + name); 
         this.factType = Types.apply(factTypeConstructor, TVar.EMPTY_ARRAY);