Class ListBindableCatalogEntriesCommand

java.lang.Object
org.eclipse.lemminx.extensions.contentmodel.commands.ListBindableCatalogEntriesCommand
All Implemented Interfaces:
IXMLCommandService.IDelegateCommandHandler

public class ListBindableCatalogEntriesCommand extends Object implements IXMLCommandService.IDelegateCommandHandler
XML Command "xml.catalog.entries.bindable" to list all bindable catalog entries across all registered catalogs.

Traverses each registered XML catalog (including nextCatalog references), collecting <public>, <system>, and <uri> entries. Each entry is returned as a BindableCatalogEntry with its resolved target URI and detected grammar type (xsd, dtd, rng, rnc).

Use case: the vscode-xml extension calls this command to populate the catalog binding quick pick, letting the user choose which catalog entry to associate with the current XML file.

  • Field Details

  • Constructor Details

    • ListBindableCatalogEntriesCommand

      public ListBindableCatalogEntriesCommand(ContentModelManager contentModelManager)
  • Method Details

    • executeCommand

      public Object executeCommand(org.eclipse.lsp4j.ExecuteCommandParams params, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) throws Exception
      Description copied from interface: IXMLCommandService.IDelegateCommandHandler
      Executes a command. The return value can be either a direct result object, or a CompletableFuture for asynchronous commands (e.g. when downloading a remote resource). When a CompletableFuture is returned, the framework will resolve it before sending the response to the client.
      Specified by:
      executeCommand in interface IXMLCommandService.IDelegateCommandHandler
      Parameters:
      params - command execution parameters
      sharedSettings - the shared settings.
      cancelChecker - check if cancel has been requested
      Returns:
      the result of the command, or a CompletableFuture that resolves to the result for async commands
      Throws:
      Exception - the unhandled exception will be wrapped in org.eclipse.lsp4j.jsonrpc.ResponseErrorException and be wired back to the JSON-RPC protocol caller