Package org.eclipse.lsp4j
Class CompletionList
- java.lang.Object
-
- org.eclipse.lsp4j.CompletionList
-
public class CompletionList extends java.lang.Object
Represents a collection of completion items to be presented in the editor.
-
-
Constructor Summary
Constructors Constructor Description CompletionList()
CompletionList(boolean isIncomplete, java.util.List<CompletionItem> items)
CompletionList(boolean isIncomplete, java.util.List<CompletionItem> items, CompletionItemDefaults itemDefaults)
CompletionList(java.util.List<CompletionItem> items)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
CompletionItemDefaults
getItemDefaults()
In many cases the items of an actual completion result share the same value for properties likeCompletionItem.commitCharacters
or the range of a text edit.java.util.List<CompletionItem>
getItems()
The completion items.int
hashCode()
boolean
isIncomplete()
This list is not complete.void
setIsIncomplete(boolean isIncomplete)
This list is not complete.void
setItemDefaults(CompletionItemDefaults itemDefaults)
In many cases the items of an actual completion result share the same value for properties likeCompletionItem.commitCharacters
or the range of a text edit.void
setItems(java.util.List<CompletionItem> items)
The completion items.java.lang.String
toString()
-
-
-
Constructor Detail
-
CompletionList
public CompletionList()
-
CompletionList
public CompletionList(java.util.List<CompletionItem> items)
-
CompletionList
public CompletionList(boolean isIncomplete, java.util.List<CompletionItem> items)
-
CompletionList
public CompletionList(boolean isIncomplete, java.util.List<CompletionItem> items, CompletionItemDefaults itemDefaults)
-
-
Method Detail
-
isIncomplete
public boolean isIncomplete()
This list is not complete. Further typing should result in recomputing this list.
-
setIsIncomplete
public void setIsIncomplete(boolean isIncomplete)
This list is not complete. Further typing should result in recomputing this list.
-
getItems
public java.util.List<CompletionItem> getItems()
The completion items.
-
setItems
public void setItems(java.util.List<CompletionItem> items)
The completion items.
-
getItemDefaults
public CompletionItemDefaults getItemDefaults()
In many cases the items of an actual completion result share the same value for properties likeCompletionItem.commitCharacters
or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value.If a completion list specifies a default value and a completion item also specifies a corresponding value the one from the item is used.
Servers are only allowed to return default values if the client signals support for this via the
CompletionListCapabilities.itemDefaults
capability.Since 3.17.0
-
setItemDefaults
public void setItemDefaults(CompletionItemDefaults itemDefaults)
In many cases the items of an actual completion result share the same value for properties likeCompletionItem.commitCharacters
or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value.If a completion list specifies a default value and a completion item also specifies a corresponding value the one from the item is used.
Servers are only allowed to return default values if the client signals support for this via the
CompletionListCapabilities.itemDefaults
capability.Since 3.17.0
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-