Example #1
0
 @Override
 public String getLabel(PrintNameFile value) {
   String printName = value.getPrintName();
   CharacterReference reference = createReference(value);
   CharacterType characterType = scanner.getCharacterType(reference);
   String characterString = new CharacterTypeUi(resources).getLabel(characterType);
   Identifier casteType = scanner.getCasteType(reference);
   if (casteType == CasteType.NULL_CASTE_TYPE) {
     return resources.getString(
         "LoadCharacter.PrintNameFile.ShortMessage", printName, characterString);
   }
   String casteTypeString = resources.getString("Caste." + casteType.getId());
   String casteString = resources.getString(characterType.getId() + ".Caste.Label");
   return resources.getString(
       "LoadCharacter.PrintNameFile.Message",
       printName,
       characterString,
       casteTypeString,
       casteString);
 }
Example #2
0
 @Override
 public String getLabel(PrintNameFile value) {
   return value.getPrintName();
 }
Example #3
0
 private CharacterReference createReference(PrintNameFile value) {
   return new CharacterReference(
       new SimpleRepositoryId(value.getRepositoryId()), value.getPrintName());
 }