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

Method getDefaultSheet

code/src/java/pcgen/io/ExportUtilities.java:233–254  ·  view source on GitHub ↗
(SheetFilter sheetFilter, CharacterFacade character)

Source from the content-addressed store, hash-verified

231 }
232
233 public static URI getDefaultSheet(SheetFilter sheetFilter, CharacterFacade character)
234 {
235 String outputSheetsDir;
236 String outputSheetDirectory = SettingsHandler.getGameAsProperty().get().getOutputSheetDirectory();
237 if (outputSheetDirectory == null)
238 {
239 outputSheetsDir = ConfigurationSettings.getOutputSheetsDir() + '/' + sheetFilter.getPath();
240 }
241 else
242 {
243 outputSheetsDir = ConfigurationSettings.getOutputSheetsDir() + '/' + outputSheetDirectory + '/'
244 + sheetFilter.getPath();
245 }
246 String defaultOutputSheet = character.getDefaultOutputSheet(sheetFilter == SheetFilter.PDF);
247 if (StringUtils.isEmpty(defaultOutputSheet))
248 {
249 defaultOutputSheet = outputSheetsDir + '/'
250 + SettingsHandler.getGameAsProperty().get().getOutputSheetDefault(sheetFilter.getTag());
251 }
252 URI osPath = new File(outputSheetsDir).toURI();
253 return osPath.relativize(new File(defaultOutputSheet).toURI());
254 }
255
256 public static File getExportDialogBaseDir(boolean pdf)
257 {

Callers

nothing calls this directly

Calls 10

getGameAsPropertyMethod · 0.95
getOutputSheetsDirMethod · 0.95
getPathMethod · 0.80
getOutputSheetDefaultMethod · 0.80
getTagMethod · 0.80
getMethod · 0.65
getDefaultOutputSheetMethod · 0.65
isEmptyMethod · 0.65
relativizeMethod · 0.45

Tested by

no test coverage detected