txtSavePreference.setText(label.getString());
txtSavePreference.setStyleRanges(label.getStyleRanges());
}
protected StyledString createRequirementText() {
StyledString label = new StyledString();
label.append("Namespace: ");
label.append(requirement.getNamespace() + "\n", UIConstants.BOLD_STYLER);
label.append("Filter: ");
R5LabelFormatter.appendRequirementLabel(label, requirement);
label.append("\n");
for (Entry<String,String> entry : requirement.getDirectives().entrySet()) {
String key = entry.getKey();
if (!Namespace.REQUIREMENT_FILTER_DIRECTIVE.equals(key) && !Namespace.REQUIREMENT_RESOLUTION_DIRECTIVE.equals(key))
label.append(" " + key + ":=" + entry.getValue() + "\n");
}
if (Namespace.RESOLUTION_OPTIONAL.equals(requirement.getDirectives().get(Namespace.REQUIREMENT_RESOLUTION_DIRECTIVE)))
label.append("Optionally ", UIConstants.ITALIC_STYLER);
label.append("Required by Resource: ");
R5LabelFormatter.appendResourceLabel(label, requirement.getResource());
return label;
}