Class XMLCatalogDiagnosticsParticipant

java.lang.Object
org.eclipse.lemminx.extensions.catalog.participants.XMLCatalogDiagnosticsParticipant
All Implemented Interfaces:
IDiagnosticsParticipant

public class XMLCatalogDiagnosticsParticipant extends Object implements IDiagnosticsParticipant
Validates XML catalog documents:
  • Reports an error when the uri attribute points to a file that does not exist on disk.
  • Reports a warning (or hint when DiagnosticTag.Unnecessary is supported) on the <catalog> root element when the catalog file is not registered in xml.catalogs.
  • Reports a warning (or hint when DiagnosticTag.Unnecessary is 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 in xml.catalogs.
  • Constructor Details

  • 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: IDiagnosticsParticipant
      Validate the given XML document.
      Specified by:
      doDiagnostics in interface IDiagnosticsParticipant
      Parameters:
      xmlDocument - XML document to validate.
      diagnostics - list to populate with errors, warnings, etc
      validationSettings - the validation settings.
      cancelChecker - used to stop the validation when XML document changed.