Class XMLCatalogDiagnosticsParticipant
java.lang.Object
org.eclipse.lemminx.extensions.catalog.participants.XMLCatalogDiagnosticsParticipant
- All Implemented Interfaces:
IDiagnosticsParticipant
Validates XML catalog documents:
- Reports an error when the
uriattribute points to a file that does not exist on disk. - Reports a warning (or hint when
DiagnosticTag.Unnecessaryis supported) on the<catalog>root element when the catalog file is not registered inxml.catalogs. - Reports a warning (or hint when
DiagnosticTag.Unnecessaryis supported) on individual<uri>,<system>, and<public>entries that are never referenced by any XML file in the workspace. This check is only performed when the workspace index scan has completed and the catalog is registered inxml.catalogs.
-
Constructor Summary
ConstructorsConstructorDescriptionXMLCatalogDiagnosticsParticipant(ContentModelManager contentModelManager, XMLExtensionsRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoDiagnostics(DOMDocument xmlDocument, List<org.eclipse.lsp4j.Diagnostic> diagnostics, XMLValidationSettings validationSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Validate the given XML document.
-
Constructor Details
-
XMLCatalogDiagnosticsParticipant
public XMLCatalogDiagnosticsParticipant(ContentModelManager contentModelManager, XMLExtensionsRegistry registry)
-
-
Method Details
-
doDiagnostics
public void doDiagnostics(DOMDocument xmlDocument, List<org.eclipse.lsp4j.Diagnostic> diagnostics, XMLValidationSettings validationSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Description copied from interface:IDiagnosticsParticipantValidate the given XML document.- Specified by:
doDiagnosticsin interfaceIDiagnosticsParticipant- Parameters:
xmlDocument- XML document to validate.diagnostics- list to populate with errors, warnings, etcvalidationSettings- the validation settings.cancelChecker- used to stop the validation when XML document changed.
-