more narrative work

This commit is contained in:
Grahame Grieve 2022-08-21 03:48:27 +10:00
parent ae285401ae
commit 0d5c03c632
1 changed files with 7 additions and 3 deletions

View File

@ -313,6 +313,7 @@ public class ProfileUtilities extends TranslatingUtilities {
} }
} }
public static final String CONSTRAINT_STYLE = "padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdeeee;";
private static final String ROW_COLOR_ERROR = "#ffcccc"; private static final String ROW_COLOR_ERROR = "#ffcccc";
private static final String ROW_COLOR_FATAL = "#ff9999"; private static final String ROW_COLOR_FATAL = "#ff9999";
private static final String ROW_COLOR_WARNING = "#ffebcc"; private static final String ROW_COLOR_WARNING = "#ffebcc";
@ -4364,7 +4365,10 @@ public class ProfileUtilities extends TranslatingUtilities {
checkForNoChange(element.getIsSummaryElement(), gc.addStyledText(translate("sd.table", "This element is included in summaries"), "\u03A3", null, null, null, false)); checkForNoChange(element.getIsSummaryElement(), gc.addStyledText(translate("sd.table", "This element is included in summaries"), "\u03A3", null, null, null, false));
} }
if (element != null && (hasNonBaseConstraints(element.getConstraint()) || hasNonBaseConditions(element.getCondition()))) { if (element != null && (hasNonBaseConstraints(element.getConstraint()) || hasNonBaseConditions(element.getCondition()))) {
gc.addStyledText(translate("sd.table", "This element has or is affected by some invariants ("+listConstraintsAndConditions(element)+")"), "I", null, null, null, false); Piece p = gc.addText("I");
p.setHint(translate("sd.table", "This element has or is affected by some invariants ("+listConstraintsAndConditions(element)+")"));
p.addStyle(CONSTRAINT_STYLE);
p.setReference(context.getSpecUrl()+"conformance-rules.html#constraints");
} }
ExtensionContext extDefn = null; ExtensionContext extDefn = null;