String wodErrorsInHtmlSeverity = Activator.getDefault().getPluginPreferences().getString(PreferenceConstants.WOD_ERRORS_IN_HTML_SEVERITY_KEY);
if (!PreferenceConstants.IGNORE.equals(wodErrorsInHtmlSeverity)) {
// We create HTML markers for WOD problems so that you can have the
// wod view closed and still see errors
if (createHtmlMarkers && wodProblem instanceof IWodElementProblem) {
IWodElement element = ((IWodElementProblem) wodProblem).getElement();
if (element != null) {
List<HtmlElementName> htmlElementNames = htmlElementCache.getHtmlElementNames(element.getElementName());
if (htmlElementNames != null) {
for (HtmlElementName htmlElementName : htmlElementNames) {
int lineNumber = WodHtmlUtils.getLineAtOffset(cache.getHtmlEntry().getContents(), htmlElementName.getStartOffset());
WodElementProblem htmlProblem = new WodElementProblem(element, "In the WOD, " + wodProblem.getMessage(), new Position(htmlElementName.getStartOffset(), htmlElementName.getEndOffset() - htmlElementName.getStartOffset() + 1), lineNumber, wodProblem.isWarning() || PreferenceConstants.WARNING.equals(wodErrorsInHtmlSeverity));
WodModelUtils.createMarker(htmlFile, htmlProblem);