MCPcopy Create free account
hub / github.com/PCGen/pcgen / startupWithoutGUI

Method startupWithoutGUI

code/src/java/pcgen/system/Main.java:325–354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

323 }
324
325 private static boolean startupWithoutGUI()
326 {
327 loadProperties(false);
328 validateEnvironment(false);
329
330 PCGenTaskExecutor executor = new PCGenTaskExecutor();
331 executor.addPCGenTask(createLoadPluginTask());
332 executor.addPCGenTask(new GameModeFileLoader());
333 executor.addPCGenTask(new CampaignFileLoader());
334 executor.run();
335
336 UIDelegate uiDelegate = new ConsoleUIDelegate();
337
338 BatchExporter exporter = new BatchExporter(commandLineArguments.getExportSheet().map(File::getPath).orElse(null), uiDelegate);
339
340 boolean result = true;
341 if (commandLineArguments.getPartyFile().isPresent())
342 {
343 result = exporter.exportParty(commandLineArguments.getPartyFile().map(File::getPath).orElseThrow(),
344 commandLineArguments.getOutputFile().map(File::getPath).orElse(null));
345 }
346
347 if (commandLineArguments.getCharacterFile().isPresent())
348 {
349 result = exporter.exportCharacter(commandLineArguments.getCharacterFile().map(File::getPath).orElseThrow(),
350 commandLineArguments.getOutputFile().map(File::getPath).orElse(null));
351 }
352
353 return result;
354 }
355
356 public static void shutdown(boolean success)
357 {

Callers 1

mainMethod · 0.95

Calls 14

loadPropertiesMethod · 0.95
validateEnvironmentMethod · 0.95
addPCGenTaskMethod · 0.95
createLoadPluginTaskMethod · 0.95
runMethod · 0.95
exportPartyMethod · 0.95
exportCharacterMethod · 0.95
getExportSheetMethod · 0.80
isPresentMethod · 0.80
getPartyFileMethod · 0.80
orElseThrowMethod · 0.80
getCharacterFileMethod · 0.80

Tested by

no test coverage detected