fix error with null in hint boxes

This commit is contained in:
Grahame Grieve 2020-01-13 14:25:26 +11:00
parent 02a8d9dad7
commit f3d39b4112
1 changed files with 10 additions and 1 deletions

View File

@ -3110,7 +3110,11 @@ public class ProfileUtilities extends TranslatingUtilities {
used.used = true;
if (logicalModel && element.hasRepresentation(PropertyRepresentation.XMLATTR))
s = "@"+s;
Cell left = gen.new Cell(null, ref, s, (element.hasSliceName() ? translate("sd.table", "Slice")+" "+element.getSliceName() : "")+(hasDef && element.hasSliceName() ? ": " : "")+(!hasDef ? null : gt(element.getDefinitionElement())), null);
String hint = "";
hint = checkAdd(hint, (element.hasSliceName() ? translate("sd.table", "Slice")+" "+element.getSliceName() : ""));
hint = checkAdd(hint, (hasDef && element.hasSliceName() ? ": " : ""));
hint = checkAdd(hint, !hasDef ? null : gt(element.getDefinitionElement()));
Cell left = gen.new Cell(null, ref, s, hint, null);
row.getCells().add(left);
Cell gc = gen.new Cell();
row.getCells().add(gc);
@ -3238,6 +3242,11 @@ public class ProfileUtilities extends TranslatingUtilities {
return slicingRow;
}
private String checkAdd(String src, String app) {
return app == null ? src : src + app;
}
private String listConstraintsAndConditions(ElementDefinition element) {
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
for (ElementDefinitionConstraintComponent con : element.getConstraint()) {