protected MarkupLanguage createMarkupLanguage() throws BuildException {
if (markupLanguage == null) {
throw new BuildException(Messages.getString("MarkupTask.0")); //$NON-NLS-1$
}
try {
MarkupLanguage language = ServiceLocator.getInstance(getClass().getClassLoader()).getMarkupLanguage(
markupLanguage);
if (internalLinkPattern != null) {
language.setInternalLinkPattern(internalLinkPattern);
}
if (markupLanguageConfiguration != null) {
language.configure(markupLanguageConfiguration);
}
return language;
} catch (IllegalArgumentException e) {
throw new BuildException(e.getMessage(), e);
}