Search in sources :

Example 1 with RuntimeLoadContext

use of pcgen.rules.context.RuntimeLoadContext in project pcgen by PCGen.

the class GameMode method clearLoadContext.

/**
	 *
	 */
public void clearLoadContext() {
    masterLCS = new ConsolidatedListCommitStrategy();
    AbstractReferenceContext referenceContext = getRefContext();
    resolveInto(referenceContext);
    context = new RuntimeLoadContext(referenceContext, masterLCS);
}
Also used : AbstractReferenceContext(pcgen.rules.context.AbstractReferenceContext) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 2 with RuntimeLoadContext

use of pcgen.rules.context.RuntimeLoadContext in project pcgen by PCGen.

the class ChangeProfFacetTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
    CDOMObject cdo1 = new PCTemplate();
    cdo1.setName("Template1");
    CDOMObject cdo2 = new Race();
    cdo2.setName("Race1");
    ChangeProf st1 = getObject();
    ChangeProf st2 = getObject();
    cdo1.addToListFor(ListKey.CHANGEPROF, st1);
    cdo2.addToListFor(ListKey.CHANGEPROF, st2);
    source = new CDOMObject[] { cdo1, cdo2 };
    target = new ChangeProf[] { st1, st2 };
}
Also used : ChangeProf(pcgen.cdom.content.ChangeProf) CDOMObject(pcgen.cdom.base.CDOMObject) Race(pcgen.core.Race) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) PCTemplate(pcgen.core.PCTemplate) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 3 with RuntimeLoadContext

use of pcgen.rules.context.RuntimeLoadContext in project pcgen by PCGen.

the class AppliedBonusFacetTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
    addBonus(Combat.class);
}
Also used : ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 4 with RuntimeLoadContext

use of pcgen.rules.context.RuntimeLoadContext in project pcgen by PCGen.

the class RequiredTokenTest method resetContext.

protected void resetContext() {
    URI testURI = testCampaign.getURI();
    context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
    context.setSourceURI(testURI);
    context.setExtractURI(testURI);
    cd = new FactDefinition();
}
Also used : FactDefinition(pcgen.cdom.content.fact.FactDefinition) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) URI(java.net.URI) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 5 with RuntimeLoadContext

use of pcgen.rules.context.RuntimeLoadContext in project pcgen by PCGen.

the class SelectableTokenTest method resetContext.

protected void resetContext() {
    URI testURI = testCampaign.getURI();
    context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
    context.setSourceURI(testURI);
    context.setExtractURI(testURI);
    cd = new FactDefinition();
}
Also used : FactDefinition(pcgen.cdom.content.fact.FactDefinition) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) URI(java.net.URI) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Aggregations

ConsolidatedListCommitStrategy (pcgen.rules.context.ConsolidatedListCommitStrategy)25 RuntimeLoadContext (pcgen.rules.context.RuntimeLoadContext)25 RuntimeReferenceContext (pcgen.rules.context.RuntimeReferenceContext)23 URI (java.net.URI)14 FactDefinition (pcgen.cdom.content.fact.FactDefinition)8 Before (org.junit.Before)4 LoadContext (pcgen.rules.context.LoadContext)3 Test (org.junit.Test)2 FormulaSemantics (pcgen.base.formula.base.FormulaSemantics)2 LegalScope (pcgen.base.formula.base.LegalScope)2 ScopeInstance (pcgen.base.formula.base.ScopeInstance)2 VariableID (pcgen.base.formula.base.VariableID)2 VariableLibrary (pcgen.base.formula.base.VariableLibrary)2 SimpleNode (pcgen.base.formula.parse.SimpleNode)2 ReconstructionVisitor (pcgen.base.formula.visitor.ReconstructionVisitor)2 SemanticsVisitor (pcgen.base.formula.visitor.SemanticsVisitor)2 CDOMObject (pcgen.cdom.base.CDOMObject)2 UserFunction (pcgen.cdom.content.UserFunction)2 Equipment (pcgen.core.Equipment)2 PCClass (pcgen.core.PCClass)2