Class RNCHover
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.hover.RNCHover
Provides hover information for RNC (RELAX NG Compact Syntax) identifiers and
keywords.
Two types of hover are supported:
- Define hover — when hovering over a define reference, the full definition text is displayed in a fenced code block.
- Keyword hover — when hovering over an RNC keyword, detailed documentation from the RELAX NG specification is displayed, loaded from a bundled JSON resource file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.lsp4j.HoverdoHover(RNCDocument rncDocument, org.eclipse.lsp4j.Position position, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Computes hover information for the word at the given position.org.eclipse.lsp4j.MarkupContentgetKeywordDocumentation(String keyword, boolean supportsMarkdown) Returns the documentation for the given keyword as aMarkupContent, selecting Markdown or plaintext based on client capability.
-
Constructor Details
-
RNCHover
-
-
Method Details
-
getKeywordDocumentation
public org.eclipse.lsp4j.MarkupContent getKeywordDocumentation(String keyword, boolean supportsMarkdown) Returns the documentation for the given keyword as aMarkupContent, selecting Markdown or plaintext based on client capability.- Parameters:
keyword- the RNC keyword name.supportsMarkdown- whether the client supports Markdown.- Returns:
- the documentation content, or
nullif the keyword is unknown.