use of pcgen.system.PropertyContextFactory in project pcgen by PCGen.
the class DataTest method loadGameModes.
private static void loadGameModes() {
String configFolder = "testsuite";
String pccLoc = TestHelper.findDataFolder();
System.out.println("Got data folder of " + pccLoc);
try {
TestHelper.createDummySettingsFile(TEST_CONFIG_FILE, configFolder, pccLoc);
} catch (IOException e) {
Logging.errorPrint("DataTest.loadGameModes failed", e);
}
PropertyContextFactory configFactory = new PropertyContextFactory(SystemUtils.USER_DIR);
configFactory.registerAndLoadPropertyContext(ConfigurationSettings.getInstance(TEST_CONFIG_FILE));
Main.loadProperties(false);
PCGenTask loadPluginTask = Main.createLoadPluginTask();
loadPluginTask.execute();
GameModeFileLoader gameModeFileLoader = new GameModeFileLoader();
gameModeFileLoader.execute();
CampaignFileLoader campaignFileLoader = new CampaignFileLoader();
campaignFileLoader.execute();
}
use of pcgen.system.PropertyContextFactory in project pcgen by PCGen.
the class TestHelper method loadGameModes.
public static void loadGameModes(String testConfigFile) {
String configFolder = "testsuite";
String pccLoc = TestHelper.findDataFolder();
System.out.println("Got data folder of " + pccLoc);
try {
TestHelper.createDummySettingsFile(testConfigFile, configFolder, pccLoc);
} catch (IOException e) {
Logging.errorPrint("DataTest.loadGameModes failed", e);
}
PropertyContextFactory configFactory = new PropertyContextFactory(SystemUtils.USER_DIR);
configFactory.registerAndLoadPropertyContext(ConfigurationSettings.getInstance(testConfigFile));
Main.loadProperties(false);
PCGenTask loadPluginTask = Main.createLoadPluginTask();
loadPluginTask.execute();
GameModeFileLoader gameModeFileLoader = new GameModeFileLoader();
gameModeFileLoader.execute();
CampaignFileLoader campaignFileLoader = new CampaignFileLoader();
campaignFileLoader.execute();
}
use of pcgen.system.PropertyContextFactory in project pcgen by PCGen.
the class DataLoadTest method loadGameModes.
private static void loadGameModes() {
String configFolder = "testsuite";
String pccLoc = TestHelper.findDataFolder();
System.out.println("Got data folder of " + pccLoc);
try {
TestHelper.createDummySettingsFile(TEST_CONFIG_FILE, configFolder, pccLoc);
} catch (IOException e) {
Logging.errorPrint("DataTest.loadGameModes failed", e);
}
PropertyContextFactory configFactory = new PropertyContextFactory(SystemUtils.USER_DIR);
configFactory.registerAndLoadPropertyContext(ConfigurationSettings.getInstance(TEST_CONFIG_FILE));
Main.loadProperties(false);
PCGenTask loadPluginTask = Main.createLoadPluginTask();
loadPluginTask.execute();
GameModeFileLoader gameModeFileLoader = new GameModeFileLoader();
gameModeFileLoader.execute();
CampaignFileLoader campaignFileLoader = new CampaignFileLoader();
campaignFileLoader.execute();
}
use of pcgen.system.PropertyContextFactory in project pcgen by PCGen.
the class PCGenDataConvert method main.
public static void main(String[] args) {
//$NON-NLS-1$
Logging.log(Level.INFO, "Starting PCGen Data Converter v" + PCGenPropBundle.getVersionNumber());
configFactory = new PropertyContextFactory(SystemUtils.USER_DIR);
configFactory.registerAndLoadPropertyContext(ConfigurationSettings.getInstance());
Main.loadProperties(true);
getConverter().setVisible(true);
}
Aggregations