Class RNCSnippetRegistryLoader
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.completion.RNCSnippetRegistryLoader
- All Implemented Interfaces:
ISnippetRegistryLoader
Loads RNC-specific code snippets from the bundled JSON resource file.
Use case: when the user triggers completion in an RNC file, built-in snippets (e.g., a full grammar skeleton, common patterns) are available alongside keyword and define completions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the language id and null otherwise.voidload(SnippetRegistry registry) Register snippets in the given snippet registry.
-
Constructor Details
-
RNCSnippetRegistryLoader
public RNCSnippetRegistryLoader()
-
-
Method Details
-
getLanguageId
Description copied from interface:ISnippetRegistryLoaderReturns the language id and null otherwise.- Specified by:
getLanguageIdin interfaceISnippetRegistryLoader- Returns:
- the language id and null otherwise.
-
load
Description copied from interface:ISnippetRegistryLoaderRegister snippets in the given snippet registry.- Specified by:
loadin interfaceISnippetRegistryLoader- Parameters:
registry-- Throws:
Exception
-