public class CompletionItem
extends java.lang.Object
| Constructor and Description |
|---|
CompletionItem() |
CompletionItem(java.lang.String label) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<TextEdit> |
getAdditionalTextEdits()
An optional array of additional text edits that are applied when
selecting this completion.
|
Command |
getCommand()
An optional command that is executed *after* inserting this completion.
|
java.util.List<java.lang.String> |
getCommitCharacters()
An optional set of characters that when pressed while this completion is active will accept it first and
then type that character.
|
java.lang.Object |
getData()
A data entry field that is preserved on a completion item between a completion and a completion resolve request.
|
java.lang.Boolean |
getDeprecated()
Deprecated.
Use
tags instead if supported. |
java.lang.String |
getDetail()
A human-readable string with additional information about this item, like type or symbol information.
|
org.eclipse.lsp4j.jsonrpc.messages.Either<java.lang.String,MarkupContent> |
getDocumentation()
A human-readable string that represents a doc-comment.
|
java.lang.String |
getFilterText()
A string that should be used when filtering a set of completion items.
|
java.lang.String |
getInsertText()
A string that should be inserted a document when selecting this completion.
|
InsertTextFormat |
getInsertTextFormat()
The format of the insert text.
|
InsertTextMode |
getInsertTextMode()
How whitespace and indentation is handled during completion item
insertion.
|
CompletionItemKind |
getKind()
The kind of this completion item.
|
java.lang.String |
getLabel()
The label of this completion item.
|
java.lang.Boolean |
getPreselect()
Select this item when showing.
|
java.lang.String |
getSortText()
A string that should be used when comparing this item with other items.
|
java.util.List<CompletionItemTag> |
getTags()
Tags for this completion item.
|
org.eclipse.lsp4j.jsonrpc.messages.Either<TextEdit,InsertReplaceEdit> |
getTextEdit()
An edit which is applied to a document when selecting this completion.
|
int |
hashCode() |
void |
setAdditionalTextEdits(java.util.List<TextEdit> additionalTextEdits)
An optional array of additional text edits that are applied when
selecting this completion.
|
void |
setCommand(Command command)
An optional command that is executed *after* inserting this completion.
|
void |
setCommitCharacters(java.util.List<java.lang.String> commitCharacters)
An optional set of characters that when pressed while this completion is active will accept it first and
then type that character.
|
void |
setData(java.lang.Object data)
A data entry field that is preserved on a completion item between a completion and a completion resolve request.
|
void |
setDeprecated(java.lang.Boolean deprecated)
Deprecated.
Use
tags instead if supported. |
void |
setDetail(java.lang.String detail)
A human-readable string with additional information about this item, like type or symbol information.
|
void |
setDocumentation(org.eclipse.lsp4j.jsonrpc.messages.Either<java.lang.String,MarkupContent> documentation)
A human-readable string that represents a doc-comment.
|
void |
setDocumentation(MarkupContent documentation) |
void |
setDocumentation(java.lang.String documentation) |
void |
setFilterText(java.lang.String filterText)
A string that should be used when filtering a set of completion items.
|
void |
setInsertText(java.lang.String insertText)
A string that should be inserted a document when selecting this completion.
|
void |
setInsertTextFormat(InsertTextFormat insertTextFormat)
The format of the insert text.
|
void |
setInsertTextMode(InsertTextMode insertTextMode)
How whitespace and indentation is handled during completion item
insertion.
|
void |
setKind(CompletionItemKind kind)
The kind of this completion item.
|
void |
setLabel(java.lang.String label)
The label of this completion item.
|
void |
setPreselect(java.lang.Boolean preselect)
Select this item when showing.
|
void |
setSortText(java.lang.String sortText)
A string that should be used when comparing this item with other items.
|
void |
setTags(java.util.List<CompletionItemTag> tags)
Tags for this completion item.
|
void |
setTextEdit(org.eclipse.lsp4j.jsonrpc.messages.Either<TextEdit,InsertReplaceEdit> textEdit)
An edit which is applied to a document when selecting this completion.
|
java.lang.String |
toString() |
public CompletionItem()
public CompletionItem(java.lang.String label)
@Pure public java.lang.String getLabel()
public void setLabel(java.lang.String label)
@Pure public CompletionItemKind getKind()
public void setKind(CompletionItemKind kind)
@Pure public java.util.List<CompletionItemTag> getTags()
public void setTags(java.util.List<CompletionItemTag> tags)
@Pure public java.lang.String getDetail()
public void setDetail(java.lang.String detail)
@Pure public org.eclipse.lsp4j.jsonrpc.messages.Either<java.lang.String,MarkupContent> getDocumentation()
public void setDocumentation(org.eclipse.lsp4j.jsonrpc.messages.Either<java.lang.String,MarkupContent> documentation)
public void setDocumentation(java.lang.String documentation)
public void setDocumentation(MarkupContent documentation)
@Pure @Deprecated public java.lang.Boolean getDeprecated()
tags instead if supported.@Deprecated public void setDeprecated(java.lang.Boolean deprecated)
tags instead if supported.@Pure public java.lang.Boolean getPreselect()
public void setPreselect(java.lang.Boolean preselect)
@Pure public java.lang.String getSortText()
public void setSortText(java.lang.String sortText)
@Pure public java.lang.String getFilterText()
public void setFilterText(java.lang.String filterText)
@Pure public java.lang.String getInsertText()
public void setInsertText(java.lang.String insertText)
@Pure public InsertTextFormat getInsertTextFormat()
insertText property
and the newText property of a provided textEdit.public void setInsertTextFormat(InsertTextFormat insertTextFormat)
insertText property
and the newText property of a provided textEdit.@Pure public InsertTextMode getInsertTextMode()
public void setInsertTextMode(InsertTextMode insertTextMode)
@Pure public org.eclipse.lsp4j.jsonrpc.messages.Either<TextEdit,InsertReplaceEdit> getTextEdit()
insertText is ignored.
*Note:* The range of the edit must be a single line range and it must
contain the position at which completion has been requested.
Most editors support two different operations when accepting a completion
item. One is to insert a completion text and the other is to replace an
existing text with a completion text. Since this can usually not be
predetermined by a server it can report both ranges. Clients need to
signal support for InsertReplaceEdits via the
CompletionItemCapabilities.insertReplaceSupport client capability
property.
*Note 1:* The text edit's range as well as both ranges from an insert
replace edit must be a [single line] and they must contain the position
at which completion has been requested.
*Note 2:* If an InsertReplaceEdit is returned the edit's insert range
must be a prefix of the edit's replace range, that means it must be
contained and starting at the same position.
Since 3.16.0 additional type InsertReplaceEditpublic void setTextEdit(org.eclipse.lsp4j.jsonrpc.messages.Either<TextEdit,InsertReplaceEdit> textEdit)
insertText is ignored.
*Note:* The range of the edit must be a single line range and it must
contain the position at which completion has been requested.
Most editors support two different operations when accepting a completion
item. One is to insert a completion text and the other is to replace an
existing text with a completion text. Since this can usually not be
predetermined by a server it can report both ranges. Clients need to
signal support for InsertReplaceEdits via the
CompletionItemCapabilities.insertReplaceSupport client capability
property.
*Note 1:* The text edit's range as well as both ranges from an insert
replace edit must be a [single line] and they must contain the position
at which completion has been requested.
*Note 2:* If an InsertReplaceEdit is returned the edit's insert range
must be a prefix of the edit's replace range, that means it must be
contained and starting at the same position.
Since 3.16.0 additional type InsertReplaceEdit@Pure public java.util.List<TextEdit> getAdditionalTextEdits()
public void setAdditionalTextEdits(java.util.List<TextEdit> additionalTextEdits)
@Pure public java.util.List<java.lang.String> getCommitCharacters()
length=1 and that superfluous
characters will be ignored.public void setCommitCharacters(java.util.List<java.lang.String> commitCharacters)
length=1 and that superfluous
characters will be ignored.@Pure public Command getCommand()
public void setCommand(Command command)
@Pure public java.lang.Object getData()
public void setData(java.lang.Object data)
@Pure public java.lang.String toString()
toString in class java.lang.Object@Pure public boolean equals(java.lang.Object obj)
equals in class java.lang.Object@Pure public int hashCode()
hashCode in class java.lang.Object