java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.completion.RNCCompletionResolver

public class RNCCompletionResolver extends Object
Handles lazy resolution of completion item documentation for RNC files.

At completion time, items are created with a resolveKind in their data payload. When the client requests full documentation (via completionItem/resolve), this class loads the appropriate content based on the resolve kind.

Use case: the user selects a completion item in the editor and the client requests its full documentation — this class loads it lazily to avoid computing documentation for all items upfront.

See Also:
  • Method Details

    • resolveCompletionItem

      public static org.eclipse.lsp4j.CompletionItem resolveCompletionItem(org.eclipse.lsp4j.CompletionItem item, RNCDocument rncDocument, RNCHover hover, SharedSettings sharedSettings, IRNCDocumentProvider documentProvider, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
      Resolves the documentation for a completion item that was deferred at completion time.

      The resolveKind stored in the item's data determines what documentation to load:

      • defineRef — the full text of the referenced define
      • override — the original define text from the included file
      • keyword — the keyword documentation from the JSON registry
      • datatype — the datatype documentation from RNCDatatypeLibrary
      Parameters:
      item - the completion item to resolve.
      rncDocument - the parsed RNC document.
      hover - the hover provider (for keyword documentation).
      sharedSettings - the shared settings (for markup kind capabilities).
      cancelChecker - the cancel checker.
      Returns:
      the resolved completion item.