use of pcgen.system.PCGenSettings in project pcgen by PCGen.
the class WriteDirectoryPanel method performAnalysis.
@Override
public boolean performAnalysis(CDOMObject pc) {
TaskStrategyMessage.sendStatus(this, "Finding Data Directories");
campaignList = pc.getListFor(ListKey.CAMPAIGN);
path = pc.get(ObjectKey.WRITE_DIRECTORY);
if (path != null) {
fileLabel.setText(path.getAbsolutePath());
} else {
PCGenSettings context = PCGenSettings.getInstance();
String outputPathName = context.initProperty(PCGenSettings.CONVERT_OUTPUT_SAVE_PATH, SystemUtils.USER_DIR);
path = new File(outputPathName);
}
pc.put(ObjectKey.WRITE_DIRECTORY, path);
fireProgressEvent(ProgressEvent.ALLOWED);
return true;
}
Aggregations