MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
processor.setProblemId(ProblemIDsXML.MissingEndTag);
processor.setAdditionalFixInfo(additionalFixInfo);
message.setAttribute(QUICKASSISTPROCESSOR, processor);
AnnotationInfo info = new AnnotationInfo(message);
((IncrementalReporter) reporter).addAnnotationInfo(this, info);
}
else {
reporter.addMessage(this, message);
}
}
}
}
else {
IStructuredDocumentRegion startRegion = xmlNode.getStartStructuredDocumentRegion();
if (startRegion == null || startRegion.isDeleted()) {
// analyze the tag (check self closing)
ITextRegionList regions = endRegion.getRegions();
ITextRegion r = null;
int start = sdRegion.getStart();
int length = sdRegion.getTextLength();
for (int i = 0; i < regions.size(); i++) {
r = regions.get(i);
if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
tagName = sdRegion.getText(r);
start = sdRegion.getStartOffset(r);
length = r.getTextLength();
}
}
if (tagName != null) {
Object[] args = {tagName};
String messageText = NLS.bind(XMLUIMessages.Missing_start_tag_, args);
int lineNumber = getLineNumber(start);
IMessage message = new LocalizedMessage(SEVERITY_MISSING_START_TAG, messageText);
message.setOffset(start);
message.setLength(length);
message.setLineNo(lineNumber);
if (reporter instanceof IncrementalReporter) {
Object[] additionalFixInfo = getStartEndFixInfo(xmlNode, tagName, r);
MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
processor.setProblemId(ProblemIDsXML.MissingStartTag);
processor.setAdditionalFixInfo(additionalFixInfo);
message.setAttribute(QUICKASSISTPROCESSOR, processor);
AnnotationInfo info = new AnnotationInfo(message);
((IncrementalReporter) reporter).addAnnotationInfo(this, info);
}
else {
reporter.addMessage(this, message);