Class LSPErrorReporterForRNC
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.validator.LSPErrorReporterForRNC
- All Implemented Interfaces:
ErrorHandler
Bridges Jing's SAX
ErrorHandler to LSP Diagnostic objects.
When Jing validates an RNC schema via CompactParseable, it reports
errors through SAX's ErrorHandler interface (line/column based).
This class converts those SAX errors into LSP diagnostics with proper
ranges, error codes, and severity levels.
Use case: Jing reports "reference to undefined pattern" at line 5,
column 12. This reporter maps the error message to
RNCErrorCode.UndefinedPattern, uses RNCPositionUtils to
select the word at that position, and produces a diagnostic that highlights
the undefined identifier.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLSPErrorReporterForRNC(TextDocument document, List<org.eclipse.lsp4j.Diagnostic> diagnostics, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoid
-
Constructor Details
-
LSPErrorReporterForRNC
public LSPErrorReporterForRNC(TextDocument document, List<org.eclipse.lsp4j.Diagnostic> diagnostics, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
-
-
Method Details
-
warning
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-
error
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-