Package org.eclipse.lemminx.services
Class ResolveCompletionItemRequest
- java.lang.Object
-
- org.eclipse.lemminx.services.ResolveCompletionItemRequest
-
- All Implemented Interfaces:
ICompletionItemResolverRequest,IComponentProvider,ISharedSettingsRequest
public class ResolveCompletionItemRequest extends Object implements ICompletionItemResolverRequest
Implementation ofICompletionItemResolverRequest
-
-
Constructor Summary
Constructors Constructor Description ResolveCompletionItemRequest(org.eclipse.lsp4j.CompletionItem unresolved, DOMDocument document, IComponentProvider componentProvider, SharedSettings sharedSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanSupportMarkupKind(String kind)Returnstrueif the client can support the given Markup kind for documentation andfalseotherwise.IntegergetCompletionOffset()Returns the completion offset coming from the completion item data and null otherwise.<T> TgetComponent(Class clazz)Returns the component class instance from the given class and null otherwise.StringgetDataProperty(String fieldName)Returns the value of a field from the supplementary data attached to the request as a string.BooleangetDataPropertyAsBoolean(String fieldName)Returns the value of a field from the supplementary data attached to the request as an boolean, or null if the field is not an boolean.IntegergetDataPropertyAsInt(String fieldName)Returns the value of a field from the supplementary data attached to the request as an integer, or null if the field is not an integer.DOMDocumentgetDocument()Returns the DOM document.StringgetParticipantId()Returns the id of the participant that can resolve the request.SharedSettingsgetSharedSettings()Returns the sharedSettings instanceorg.eclipse.lsp4j.CompletionItemgetUnresolved()Returns the unresolved completion item.booleanisResolveAdditionalTextEditsSupported()Returns true if the editor supports delayed resolution of additionalTextEdits and false otherwise.booleanisResolveDocumentationSupported()Returns true if the editor supports delayed resolution of documentation and false otherwise.
-
-
-
Constructor Detail
-
ResolveCompletionItemRequest
public ResolveCompletionItemRequest(org.eclipse.lsp4j.CompletionItem unresolved, DOMDocument document, IComponentProvider componentProvider, SharedSettings sharedSettings)
-
-
Method Detail
-
getUnresolved
public org.eclipse.lsp4j.CompletionItem getUnresolved()
Description copied from interface:ICompletionItemResolverRequestReturns the unresolved completion item.- Specified by:
getUnresolvedin interfaceICompletionItemResolverRequest- Returns:
- the unresolved completion item
-
getParticipantId
public String getParticipantId()
Description copied from interface:ICompletionItemResolverRequestReturns the id of the participant that can resolve the request.- Specified by:
getParticipantIdin interfaceICompletionItemResolverRequest- Returns:
- the id of the participant that can resolve the request
-
getDataProperty
public String getDataProperty(String fieldName)
Description copied from interface:ICompletionItemResolverRequestReturns the value of a field from the supplementary data attached to the request as a string.- Specified by:
getDataPropertyin interfaceICompletionItemResolverRequest- Parameters:
fieldName- the name of the field to retrieve the data from- Returns:
- the value of a field from the supplementary data attached to the request as a string
-
canSupportMarkupKind
public boolean canSupportMarkupKind(String kind)
Description copied from interface:ISharedSettingsRequestReturnstrueif the client can support the given Markup kind for documentation andfalseotherwise.- Specified by:
canSupportMarkupKindin interfaceISharedSettingsRequest- Parameters:
kind- the markup kind- Returns:
trueif the client can support the given Markup kind for documentation andfalseotherwise.
-
getDataPropertyAsInt
public Integer getDataPropertyAsInt(String fieldName)
Description copied from interface:ICompletionItemResolverRequestReturns the value of a field from the supplementary data attached to the request as an integer, or null if the field is not an integer.- Specified by:
getDataPropertyAsIntin interfaceICompletionItemResolverRequest- Parameters:
fieldName- the name of the field to retrieve the data from- Returns:
- the value of a field from the supplementary data attached to the request as an integer, or null if the field is not an integer
-
getDataPropertyAsBoolean
public Boolean getDataPropertyAsBoolean(String fieldName)
Description copied from interface:ICompletionItemResolverRequestReturns the value of a field from the supplementary data attached to the request as an boolean, or null if the field is not an boolean.- Specified by:
getDataPropertyAsBooleanin interfaceICompletionItemResolverRequest- Returns:
- the value of a field from the supplementary data attached to the request as an boolean, or null if the field is not an boolean
-
getComponent
public <T> T getComponent(Class clazz)
Description copied from interface:IComponentProviderReturns the component class instance from the given class and null otherwise.- Specified by:
getComponentin interfaceIComponentProvider- Parameters:
clazz- class of the component.- Returns:
- the component class instance from the given class and null otherwise.
-
getDocument
public DOMDocument getDocument()
Description copied from interface:ICompletionItemResolverRequestReturns the DOM document.- Specified by:
getDocumentin interfaceICompletionItemResolverRequest- Returns:
- the DOM document
-
getSharedSettings
public SharedSettings getSharedSettings()
Description copied from interface:ISharedSettingsRequestReturns the sharedSettings instance- Specified by:
getSharedSettingsin interfaceISharedSettingsRequest- Returns:
- the sharedSettings instance
-
isResolveDocumentationSupported
public boolean isResolveDocumentationSupported()
Description copied from interface:ICompletionItemResolverRequestReturns true if the editor supports delayed resolution of documentation and false otherwise.- Specified by:
isResolveDocumentationSupportedin interfaceICompletionItemResolverRequest
-
isResolveAdditionalTextEditsSupported
public boolean isResolveAdditionalTextEditsSupported()
Description copied from interface:ICompletionItemResolverRequestReturns true if the editor supports delayed resolution of additionalTextEdits and false otherwise.- Specified by:
isResolveAdditionalTextEditsSupportedin interfaceICompletionItemResolverRequest
-
getCompletionOffset
public Integer getCompletionOffset()
Description copied from interface:ICompletionItemResolverRequestReturns the completion offset coming from the completion item data and null otherwise.- Specified by:
getCompletionOffsetin interfaceICompletionItemResolverRequest- Returns:
- the completion offset coming from the completion item data and null otherwise.
-
-