IDocument htmlDocument = _cache.getHtmlEntry().getDocument();
if (htmlDocument != null) {
List<TextEdit> htmlEdits = new LinkedList<TextEdit>();
FuzzyXMLDocument xmlDocument = _cache.getHtmlEntry().getModel();
if (xmlDocument != null) {
FuzzyXMLElement xmlElement = xmlDocument.getElementByOffset(typePosition.getOffset());
if (xmlElement != null && xmlElement.hasCloseTag()) {
htmlEdits.add(new ReplaceEdit(xmlElement.getCloseTagOffset() + xmlElement.getCloseNameOffset() + 1, xmlElement.getCloseNameLength(), "wo:" + _newType));
}
}
htmlEdits.add(new ReplaceEdit(typePosition.getOffset(), typePosition.getLength(), _newType));
WodDocumentUtils.applyEdits(htmlDocument, htmlEdits);
}