Class RNCSymbols
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.symbols.RNCSymbols
Provides document symbols (outline) for RNC (RELAX NG Compact Syntax)
documents.
Produces a hierarchical list of DocumentSymbol objects for the
editor's Outline view and breadcrumb navigation. Top-level symbols include
namespace declarations, datatypes declarations, start assignments, define
statements, div blocks, and include directives.
Use case: the user opens the Outline panel and sees a tree of all defines and declarations in the RNC file, enabling quick navigation.
Example outline for:
namespace rng = "http://relaxng.org/ns/structure/1.0"
start = root
root = element root {
inline*
}
Produces:
- namespace rng (Package)
- start (Event)
- root → element root (Variable → Class)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.eclipse.lsp4j.DocumentSymbol> findDocumentSymbols(RNCDocument rncDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Computes hierarchical document symbols for the editor's Outline view.List<org.eclipse.lsp4j.SymbolInformation> findSymbolInformations(RNCDocument rncDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Computes flat symbol information for workspace symbol search.
-
Constructor Details
-
RNCSymbols
public RNCSymbols()
-
-
Method Details
-
findDocumentSymbols
public List<org.eclipse.lsp4j.DocumentSymbol> findDocumentSymbols(RNCDocument rncDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Computes hierarchical document symbols for the editor's Outline view.Use case: populates the Outline panel and breadcrumb bar with a tree of namespace/datatypes declarations, start, defines, includes, and nested element/attribute patterns.
- Parameters:
rncDocument- the parsed RNC document (AST).cancelChecker- used to abort computation if the document changes.- Returns:
- a list of
DocumentSymbolobjects forming a tree.
-
findSymbolInformations
public List<org.eclipse.lsp4j.SymbolInformation> findSymbolInformations(RNCDocument rncDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Computes flat symbol information for workspace symbol search.Use case: allows the user to search for RNC defines and declarations across the workspace using "Go to Symbol in Workspace" (Ctrl+T).
- Parameters:
rncDocument- the parsed RNC document (AST).cancelChecker- used to abort computation if the document changes.- Returns:
- a flat list of
SymbolInformationobjects.
-