String delim = new Document().getLegalLineDelimiters()[0];
List contexts = new ArrayList();
for (Iterator it = registry.contextTypes(); it.hasNext();) {
TemplateContextType type = (TemplateContextType) it.next();
if (type.getId().equals("javadoc")) //$NON-NLS-1$
contexts.add(new String[] { type.getId(), type.getName(),
"/**" + delim }); //$NON-NLS-1$
else
contexts.add(0,
new String[] { type.getId(), type.getName(), "" }); //$NON-NLS-1$
}
fContextTypes = (String[][]) contexts.toArray(new String[contexts
.size()][]);
fValidationStatus = new StatusInfo();
fContextTypeRegistry = registry;
TemplateContextType type = fContextTypeRegistry.getContextType(template
.getContextTypeId());
fTemplateProcessor.setContextType(type);
}