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

Method run

code/src/java/pcgen/gui2/PCGenFrame.java:1508–1560  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1506 }
1507
1508 @Override
1509 public void run()
1510 {
1511 worker.execute();
1512 //wait until the worker finish and post any errors that occurred
1513 try
1514 {
1515 statusBar.setSourceLoadErrors(worker.get());
1516 } catch (InterruptedException | ExecutionException e)
1517 {
1518 Logging.errorPrint("error when loading sources", e);
1519 }
1520 //now that the SourceFileLoader has finished
1521 //handle licenses and whatnot
1522 section15 = " "
1523 + readTextFromFile(
1524 ConfigurationSettings.getSystemsDir() + File.separator + "opengaminglicense.10a.txt")
1525 + loader.getOGL();
1526 try
1527 {
1528 showLicenses();
1529 }
1530 catch (Throwable e)
1531 {
1532 Logging.errorPrint("Failed to show licences.", e);
1533 }
1534
1535 DataSetFacade data = loader.getDataSetFacade();
1536 if (data != null)
1537 {
1538 currentSourceSelection.set(sources);
1539
1540 StringBuilder sourceString = new StringBuilder(100);
1541 ListFacade<Campaign> campaigns = sources.getCampaigns();
1542 for (int i = 0; i < campaigns.getSize(); i++)
1543 {
1544 if (i > 0)
1545 {
1546 sourceString.append('|');
1547 }
1548 sourceString.append(campaigns.getElementAt(i));
1549 }
1550 PCGenSettings.getInstance().setProperty(PCGenSettings.LAST_LOADED_GAME,
1551 sources.getGameMode().toString());
1552 PCGenSettings.getInstance().setProperty(PCGenSettings.LAST_LOADED_SOURCES, sourceString.toString());
1553 }
1554 else
1555 {
1556 currentSourceSelection.set(null);
1557 }
1558 currentDataSetRef.set(data);
1559 updateTitle();
1560 }
1561
1562 // TODO there are no examples with licenses. Either remove this or add a test.
1563 private void showLicenses()

Callers

nothing calls this directly

Calls 15

errorPrintMethod · 0.95
getSystemsDirMethod · 0.95
showLicensesMethod · 0.95
getInstanceMethod · 0.95
setSourceLoadErrorsMethod · 0.80
readTextFromFileMethod · 0.80
getOGLMethod · 0.80
getDataSetFacadeMethod · 0.80
setPropertyMethod · 0.80
updateTitleMethod · 0.80
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected