Search in sources :

Example 1 with CodeControl

use of pcgen.cdom.inst.CodeControl in project pcgen by PCGen.

the class CodeControlLoader method parseLine.

@Override
public void parseLine(LoadContext context, String inputLine, URI sourceURI) throws PersistenceLayerException {
    int sepLoc = inputLine.indexOf('\t');
    if (sepLoc != -1) {
        Logging.errorPrint("Unsure what to do with line with multiple tokens: " + inputLine + " in file: " + sourceURI);
        return;
    }
    try {
        AbstractReferenceContext refContext = context.getReferenceContext();
        CodeControl controller = refContext.constructNowIfNecessary(CodeControl.class, "Controller");
        LstUtils.processToken(context, controller, sourceURI, inputLine);
    } catch (PersistenceLayerException ple) {
        Logging.errorPrint("Exception in Load: ", ple);
    }
}
Also used : PersistenceLayerException(pcgen.persistence.PersistenceLayerException) CodeControl(pcgen.cdom.inst.CodeControl) AbstractReferenceContext(pcgen.rules.context.AbstractReferenceContext)

Aggregations

CodeControl (pcgen.cdom.inst.CodeControl)1 PersistenceLayerException (pcgen.persistence.PersistenceLayerException)1 AbstractReferenceContext (pcgen.rules.context.AbstractReferenceContext)1