Package org.eclipse.lemminx.extensions.xsd.participants.diagnostics

## 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 SAX `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.

### 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`

### Fields inherited from class org.apache.xerces.impl.XMLErrorReporter

`CONTINUE_AFTER_FATAL_ERROR, ERROR_HANDLER, fContinueAfterFatalError, fDefaultErrorHandler, fErrorHandler, fLocale, fLocator, fMessageFormatters, SEVERITY_ERROR, SEVERITY_FATAL_ERROR, SEVERITY_WARNING`

### Constructor Summary

Constructors
`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
`protected org.eclipse.lsp4j.Range` `getReferencedGrammarRange​(String grammarURI)`
`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)`

### 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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:
  `toLSPRange` in class `AbstractReferencedGrammarLSPErrorReporter`

#### getReferencedGrammarRange

    protected org.eclipse.lsp4j.Range getReferencedGrammarRange​(String grammarURI)

Specified by:
  `getReferencedGrammarRange` in class `AbstractReferencedGrammarLSPErrorReporter`