Class RNCDocumentLinks
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.documentlink.RNCDocumentLinks
Provides document links for RNC (RELAX NG Compact Syntax) documents.
Scans the AST for file reference nodes (include and
external declarations) and produces clickable
DocumentLinks that allow the user to navigate to the
referenced file.
Use case: the user Ctrl-clicks an include URI like
include "common.rnc" and the editor opens common.rnc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.eclipse.lsp4j.DocumentLink> findDocumentLinks(RNCDocument rncDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Finds all document links in the given RNC document by resolving file reference URIs fromincludeandexternaldeclarations.
-
Constructor Details
-
RNCDocumentLinks
public RNCDocumentLinks()
-
-
Method Details
-
findDocumentLinks
public List<org.eclipse.lsp4j.DocumentLink> findDocumentLinks(RNCDocument rncDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Finds all document links in the given RNC document by resolving file reference URIs fromincludeandexternaldeclarations.- Parameters:
rncDocument- the parsed RNC document containing file references.cancelChecker- used to abort computation if the document changes.- Returns:
- a list of
DocumentLinkobjects, one per file reference.
-