public abstract class AbstractLSPErrorReporter
extends org.apache.xerces.impl.XMLErrorReporter
ErrorHandler gives just information of the offset where there
is an error. To improve highlight XML error, this class extends the Xerces
XML reporter to catch location, key, arguments which is helpful to adjust the
LSP range.| Constructor and Description |
|---|
AbstractLSPErrorReporter(String source,
DOMDocument xmlDocument,
List<org.eclipse.lsp4j.Diagnostic> diagnostics) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addDiagnostic(org.eclipse.lsp4j.Range adjustedRange,
String message,
org.eclipse.lsp4j.DiagnosticSeverity severity,
String key) |
String |
reportError(org.apache.xerces.xni.XMLLocator location,
String domain,
String key,
Object[] arguments,
short severity,
Exception exception) |
protected abstract org.eclipse.lsp4j.Range |
toLSPRange(org.apache.xerces.xni.XMLLocator location,
String key,
Object[] arguments,
DOMDocument document) |
getErrorHandler, getFeature, getFeatureDefault, getLocale, getMessageFormatter, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, getSAXErrorHandler, putMessageFormatter, removeMessageFormatter, reportError, reportError, reportError, reset, setDocumentLocator, setFeature, setLocale, setPropertypublic AbstractLSPErrorReporter(String source, DOMDocument xmlDocument, List<org.eclipse.lsp4j.Diagnostic> diagnostics)
public String reportError(org.apache.xerces.xni.XMLLocator location, String domain, String key, Object[] arguments, short severity, Exception exception) throws org.apache.xerces.xni.XNIException
reportError in class org.apache.xerces.impl.XMLErrorReporterorg.apache.xerces.xni.XNIExceptionpublic boolean addDiagnostic(org.eclipse.lsp4j.Range adjustedRange,
String message,
org.eclipse.lsp4j.DiagnosticSeverity severity,
String key)
protected abstract org.eclipse.lsp4j.Range toLSPRange(org.apache.xerces.xni.XMLLocator location,
String key,
Object[] arguments,
DOMDocument document)
Copyright © 2020. All rights reserved.