Search in sources :

Example 1 with FactKeyActor

use of pcgen.output.actor.FactKeyActor in project pcgen by PCGen.

the class FreeMarkerTest method createChecks.

private void createChecks() {
    StringManager sm = new StringManager();
    FactKey<String> sn = FactKey.getConstant("ShortName", sm);
    PCCheck pcc = new PCCheck();
    pcc.setName("Willpower");
    pcc.put(sn, new BasicIndirect<>(sm, "Will"));
    cf.add(id, pcc);
    pcc = new PCCheck();
    pcc.setName("Reflex");
    pcc.put(sn, new BasicIndirect<>(sm, "Ref"));
    cf.add(id, pcc);
    pcc = new PCCheck();
    pcc.setName("Fortitude");
    pcc.put(sn, new BasicIndirect<>(sm, "Fort"));
    cf.add(id, pcc);
    FactKeyActor<?> fka = new FactKeyActor<>(sn);
    CDOMObjectWrapper.load(dsid, pcc.getClass(), "shortname", fka);
}
Also used : FactKeyActor(pcgen.output.actor.FactKeyActor) PCCheck(pcgen.core.PCCheck) StringManager(pcgen.base.format.StringManager)

Example 2 with FactKeyActor

use of pcgen.output.actor.FactKeyActor in project pcgen by PCGen.

the class FactDefinition method activateOutput.

/**
	 * @see pcgen.cdom.content.ContentDefinition#activateOutput(DataSetID)
	 */
@Override
protected void activateOutput(DataSetID dsID) {
    FactKeyActor<?> fca = new FactKeyActor<>(getFactKey());
    CDOMWrapperInfoFacet wiFacet = FacetLibrary.getFacet(CDOMWrapperInfoFacet.class);
    if (!wiFacet.set(dsID, getUsableLocation(), factName.toLowerCase(), fca)) {
        Logging.errorPrint(getUsableLocation().getSimpleName() + " output " + factName.toLowerCase() + " already exists, ignoring Visibility to EXPORT for FACT: " + factName);
    }
}
Also used : CDOMWrapperInfoFacet(pcgen.cdom.facet.CDOMWrapperInfoFacet) FactKeyActor(pcgen.output.actor.FactKeyActor)

Aggregations

FactKeyActor (pcgen.output.actor.FactKeyActor)2 StringManager (pcgen.base.format.StringManager)1 CDOMWrapperInfoFacet (pcgen.cdom.facet.CDOMWrapperInfoFacet)1 PCCheck (pcgen.core.PCCheck)1