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

Method makeAbilityFromString

code/src/test/pcgen/util/TestHelper.java:293–318  ·  view source on GitHub ↗

Make an ability @param input the Ability source string to parse and create the ability from @return true if OK

(final String input)

Source from the content-addressed store, hash-verified

291 * @return true if OK
292 */
293 public static boolean makeAbilityFromString(final String input)
294 {
295 loadPlugins();
296
297 try
298 {
299 if (source == null)
300 {
301 try
302 {
303 source = new CampaignSourceEntry(new Campaign(),
304 new URI("file:/" + TestHelper.class.getName() + ".java"));
305 } catch (URISyntaxException e)
306 {
307 throw new UnreachableError(e);
308 }
309 }
310
311 abLoader.parseLine(Globals.getContext(), null, input, source);
312 return true;
313 } catch (Exception e)
314 {
315 Logging.errorPrint(e.getLocalizedMessage());
316 }
317 return false;
318 }
319
320
321 /**

Callers

nothing calls this directly

Calls 5

loadPluginsMethod · 0.95
getContextMethod · 0.95
errorPrintMethod · 0.95
getNameMethod · 0.65
parseLineMethod · 0.65

Tested by

no test coverage detected