Class AbstractReferencedGrammarLSPErrorReporter

    • 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)
        Create the LSP range from the SAX error.
        Specified by:
        toLSPRange in class AbstractLSPErrorReporter
        Parameters:
        location -
        key -
        arguments -
        document -
        message - the Xerces error message.
        diagnosticSeverity - the the Xerces severity.
        fatalError - true if Xerces report the error as fatal and false otherwise.
        Returns:
        the LSP range from the SAX error.
      • fillReferencedGrammarDiagnostic

        protected void fillReferencedGrammarDiagnostic​(org.apache.xerces.xni.XMLLocator location,
                                                       String key,
                                                       Object[] arguments,
                                                       String message,
                                                       org.eclipse.lsp4j.DiagnosticSeverity diagnosticSeverity,
                                                       boolean fatalError,
                                                       URIResolverExtensionManager resolverExtensionManager,
                                                       XMLSyntaxErrorCode syntaxCode,
                                                       XMLSchemaErrorCode schemaErrorCode,
                                                       DTDErrorCode dtdCode,
                                                       XSDErrorCode xsdCode,
                                                       RelaxNGErrorCode rngCode,
                                                       XIncludeErrorCode xIncludeCode,
                                                       String grammarURI)
        Create a diagnostic root where XSD, DTD which have the error if needed and attach the error as related information if LSP client support it.
        Parameters:
        location - the Xerces location.
        key - the Xerces error key
        arguments - the Xerces error arguments
        message - the Xerces error message
        diagnosticSeverity - the the Xerces severity
        fatalError -
        resolverExtensionManager - the resolver
        syntaxCode - the Syntax error code and null otherwise.
        dtdCode - the DTD error code and null otherwise.
        xsdCode - the XSD error code and null otherwise.
        rngCode - the RelaxNG error code and null otherwise.
        grammarURI - the referenced grammar URI.
      • endReport

        public void endReport()
      • toLSPRange

        protected abstract 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)
      • getReferencedGrammarRange

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