Interface IRNCDocumentProvider
public interface IRNCDocumentProvider
Provides access to parsed
RNCDocument instances by URI.
Use case: when a language feature (completion, hover, definition, etc.) needs to access an included RNC file, this provider first checks if the file is already open in the editor (returning the in-memory version with unsaved edits) and falls back to reading from disk otherwise.
This avoids re-parsing files from disk when they are already open and ensures correct ranges when the user has unsaved modifications.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetDocument(String uri) Returns the parsedRNCDocumentfor the given URI, ornullif the document cannot be found or parsed.
-
Method Details
-
getDocument
Returns the parsedRNCDocumentfor the given URI, ornullif the document cannot be found or parsed.Implementations should check open documents first, then fall back to reading from disk.
- Parameters:
uri- the document URI (e.g."file:///path/to/schema.rnc").- Returns:
- the parsed document, or
null.
-