ElementList<ISapphireDocumentationTopicDef> topics = def.getTopics();
final int length = topics.size();
this.topics = new IHelpResource[length];
for( int i = 0, n = length; i < n; i++ ) {
final ISapphireDocumentationTopicDef topic = topics.get(i);
this.topics[i] = new IHelpResource() {
public String getHref() {
return topic.getHref().text();
}
public String getLabel() {
String label = topic.getLabel().localized();
if (label != null) {
return LabelTransformer.transform( label, CapitalizationType.TITLE_STYLE, false );
}
return label;
}