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);
}
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);
}
}
Aggregations