Class RNCCompletionRequest
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.AbstractRNCRequest
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.completion.RNCCompletionRequest
- All Implemented Interfaces:
ISharedSettingsRequest
Encapsulates all context needed to compute RNC completion items.
Created once per completion request, this class resolves the cursor offset,
document text, line separator, and replacement range. It also exposes client
capabilities (snippet support, trigger-suggest, markdown) via
ISharedSettingsRequest.
Use case: RNCCompletions.doComplete(org.eclipse.lemminx.extensions.relaxng.grammar.rnc.RNCDocument, org.eclipse.lsp4j.Position, org.eclipse.lemminx.settings.SharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker) creates a request and passes it
to the various collect* methods, avoiding the need to thread
individual parameters through every call.
-
Constructor Summary
ConstructorsConstructorDescriptionRNCCompletionRequest(RNCDocument rncDocument, org.eclipse.lsp4j.Position position, SharedSettings sharedSettings) Creates a new completion request. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSupportMarkupKind(String kind) Returnstrueif the client can support the given Markup kind for documentation andfalseotherwise.intorg.eclipse.lsp4j.RangebooleanbooleanMethods inherited from class org.eclipse.lemminx.extensions.relaxng.grammar.rnc.AbstractRNCRequest
getRNCDocument, getSharedSettings, getText, getTextDocument
-
Constructor Details
-
Method Details
-
getOffset
public int getOffset()- Overrides:
getOffsetin classAbstractRNCRequest
-
getLineSeparator
-
getReplaceRange
public org.eclipse.lsp4j.Range getReplaceRange() -
isSnippetsSupported
public boolean isSnippetsSupported()- Overrides:
isSnippetsSupportedin classAbstractRNCRequest
-
isTriggerSuggestSupported
public boolean isTriggerSuggestSupported() -
canSupportMarkupKind
Description copied from interface:ISharedSettingsRequestReturnstrueif the client can support the given Markup kind for documentation andfalseotherwise.- Parameters:
kind- the markup kind- Returns:
trueif the client can support the given Markup kind for documentation andfalseotherwise.
-