Class LSPErrorReporterForXSD
- java.lang.Object
-
- org.apache.xerces.impl.XMLErrorReporter
-
- org.eclipse.lemminx.extensions.xerces.AbstractLSPErrorReporter
-
- org.eclipse.lemminx.extensions.xerces.AbstractReferencedGrammarLSPErrorReporter
-
- org.eclipse.lemminx.extensions.xsd.participants.diagnostics.LSPErrorReporterForXSD
-
- All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLComponent
public class LSPErrorReporterForXSD extends AbstractReferencedGrammarLSPErrorReporter
The SAXErrorHandlergives 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.
-
-
Field Summary
-
Fields inherited from class org.eclipse.lemminx.extensions.xerces.AbstractReferencedGrammarLSPErrorReporter
contentModelManager
-
Fields inherited from class org.eclipse.lemminx.extensions.xerces.AbstractLSPErrorReporter
NO_RANGE
-
-
Constructor Summary
Constructors Constructor Description LSPErrorReporterForXSD(DOMDocument xmlDocument, List<org.eclipse.lsp4j.Diagnostic> diagnostics, ContentModelManager contentModelManager, boolean hasRelatedInformation, Map<String,ReferencedGrammarDiagnosticsInfo> referencedGrammarDiagnosticsInfoCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.lsp4j.RangegetReferencedGrammarRange(String grammarURI)protected org.eclipse.lsp4j.RangetoLSPRange(org.apache.xerces.xni.XMLLocator location, String key, Object[] arguments, String message, org.eclipse.lsp4j.DiagnosticSeverity diagnosticSeverity, boolean fatalError, DOMDocument document, String documentOrGrammarURI, boolean errorForDocument)-
Methods inherited from class org.eclipse.lemminx.extensions.xerces.AbstractReferencedGrammarLSPErrorReporter
endReport, fillReferencedGrammarDiagnostic, getCode, getMessage, getSeverity, toLSPRange
-
Methods inherited from class org.eclipse.lemminx.extensions.xerces.AbstractLSPErrorReporter
addDiagnostic, createDefaultRange, getDOMDocument, initializeReporter, initializeReporter, isIgnoreFatalError, reportError, setCurrentError
-
Methods inherited from class org.apache.xerces.impl.XMLErrorReporter
getErrorHandler, getFeature, getFeatureDefault, getLocale, getMessageFormatter, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, getSAXErrorHandler, putMessageFormatter, removeMessageFormatter, reportError, reportError, reportError, reset, setDocumentLocator, setFeature, setLocale, setProperty
-
-
-
-
Constructor Detail
-
LSPErrorReporterForXSD
public LSPErrorReporterForXSD(DOMDocument xmlDocument, List<org.eclipse.lsp4j.Diagnostic> diagnostics, ContentModelManager contentModelManager, boolean hasRelatedInformation, Map<String,ReferencedGrammarDiagnosticsInfo> referencedGrammarDiagnosticsInfoCache)
-
-
Method Detail
-
toLSPRange
protected org.eclipse.lsp4j.Range toLSPRange(org.apache.xerces.xni.XMLLocator location, String key, Object[] arguments, String message, org.eclipse.lsp4j.DiagnosticSeverity diagnosticSeverity, boolean fatalError, DOMDocument document, String documentOrGrammarURI, boolean errorForDocument)- Specified by:
toLSPRangein classAbstractReferencedGrammarLSPErrorReporter
-
getReferencedGrammarRange
protected org.eclipse.lsp4j.Range getReferencedGrammarRange(String grammarURI)
- Specified by:
getReferencedGrammarRangein classAbstractReferencedGrammarLSPErrorReporter
-
-