public abstract class AbstractReferencedGrammarLSPErrorReporter extends AbstractLSPErrorReporter
| Modifier and Type | Field and Description |
|---|---|
protected ContentModelManager |
contentModelManager |
NO_RANGE| Constructor and Description |
|---|
AbstractReferencedGrammarLSPErrorReporter(String source,
DOMDocument xmlDocument,
List<org.eclipse.lsp4j.Diagnostic> diagnostics,
ContentModelManager contentModelManager,
boolean hasRelatedInformation,
Map<String,ReferencedGrammarDiagnosticsInfo> referencedGrammarDiagnosticsInfoCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
endReport() |
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.
|
protected String |
getCode(String domain,
String key,
Object[] arguments,
Exception exception) |
protected String |
getMessage(String domain,
String key,
Object[] arguments,
Exception exception) |
protected abstract org.eclipse.lsp4j.Range |
getReferencedGrammarRange(String grammarURI) |
protected org.eclipse.lsp4j.DiagnosticSeverity |
getSeverity(String domain,
String key,
Object[] arguments,
short severity,
Exception exception) |
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.
|
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) |
addDiagnostic, createDefaultRange, getDOMDocument, initializeReporter, initializeReporter, isIgnoreFatalError, reportError, setCurrentErrorgetErrorHandler, getFeature, getFeatureDefault, getLocale, getMessageFormatter, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, getSAXErrorHandler, putMessageFormatter, removeMessageFormatter, reportError, reportError, reportError, reset, setDocumentLocator, setFeature, setLocale, setPropertyprotected final ContentModelManager contentModelManager
public AbstractReferencedGrammarLSPErrorReporter(String source, DOMDocument xmlDocument, List<org.eclipse.lsp4j.Diagnostic> diagnostics, ContentModelManager contentModelManager, boolean hasRelatedInformation, Map<String,ReferencedGrammarDiagnosticsInfo> referencedGrammarDiagnosticsInfoCache)
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)
toLSPRange in class AbstractLSPErrorReporterlocation - 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.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)
location - the Xerces location.key - the Xerces error keyarguments - the Xerces error argumentsmessage - the Xerces error messagediagnosticSeverity - the the Xerces severityfatalError - resolverExtensionManager - the resolversyntaxCode - 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.public void endReport()
protected String getMessage(String domain, String key, Object[] arguments, Exception exception)
getMessage in class AbstractLSPErrorReporterprotected org.eclipse.lsp4j.DiagnosticSeverity getSeverity(String domain, String key, Object[] arguments, short severity, Exception exception)
getSeverity in class AbstractLSPErrorReporterprotected String getCode(String domain, String key, Object[] arguments, Exception exception)
getCode in class AbstractLSPErrorReporterprotected 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)
protected abstract org.eclipse.lsp4j.Range getReferencedGrammarRange(String grammarURI)
Copyright © 2022. All rights reserved.