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

Method parseKitLine

code/src/java/pcgen/io/PCGVer2Parser.java:2972–3001  ·  view source on GitHub ↗
(final String line)

Source from the content-addressed store, hash-verified

2970 }
2971
2972 private void parseKitLine(final String line)
2973 {
2974 final StringTokenizer stok =
2975 new StringTokenizer(line.substring(IOConstants.TAG_KIT.length() + 1), IOConstants.TAG_SEPARATOR, false);
2976
2977 if (stok.countTokens() != 2)
2978 {
2979 // TODO This if switch currently does nothing?
2980 Logging.debugPrint(stok.countTokens() + " did not equal 2 - TODO we need to deal with this case.");
2981 }
2982
2983 /* final String region = */
2984 stok.nextToken(); //TODO: Is this intended to be thrown away? The value is never used.
2985
2986 /* final String kit = stok.nextToken(); */
2987
2988 final Kit aKit = Globals.getContext().getReferenceContext().silentlyGetConstructedCDOMObject(Kit.class,
2989 line.substring(IOConstants.TAG_KIT.length() + 1));
2990
2991 if (aKit == null)
2992 {
2993 final String msg = LanguageBundle.getFormattedString("Warnings.PCGenParser.KitNotFound", //$NON-NLS-1$
2994 line);
2995 warnings.add(msg);
2996
2997 return;
2998 }
2999
3000 thePC.addKit(aKit);
3001 }
3002
3003 /*
3004 * ###############################################################

Callers 1

parseCachedLinesMethod · 0.95

Calls 8

debugPrintMethod · 0.95
getContextMethod · 0.95
getFormattedStringMethod · 0.95
nextTokenMethod · 0.80
getReferenceContextMethod · 0.65
addMethod · 0.65
addKitMethod · 0.65

Tested by

no test coverage detected