public class CodeCompletion
- Object
- CodeCompletion
A single code completion proposal returned by a
CodeCompletionProvider and shown in the
CodeEditor completion popup.Constructors
public CodeCompletion(String text) | Creates a completion whose displayed and inserted text are identical. |
public CodeCompletion(String displayText, String insertText) | Creates a completion with distinct display and insertion text. |
Methods
public String getDisplayText() | The text shown to the user in the completion popup. |
public String getInsertText() | The text inserted into the editor when this completion is accepted. |
public String getType() | An optional category used to badge / icon the entry, e.g. "method", "keyword", "variable", "class", "snippet". |
public CodeCompletion setType(String type) | Sets the completion category. |
public String getDetail() | Optional secondary detail (e.g. a method signature or return type) shown alongside the entry. |
public CodeCompletion setDetail(String detail) | Sets the optional secondary detail. |
Inherited methods
Constructor details
CodeCompletion
public CodeCompletion(String text)Creates a completion whose displayed and inserted text are identical.
Parameters
textString- the text shown in the popup and inserted when chosen
CodeCompletion
public CodeCompletion(String displayText, String insertText)Creates a completion with distinct display and insertion text.
Parameters
displayTextString- the text shown in the completion popup
insertTextString- the text inserted into the editor when this completion is chosen
Method details
getDisplayText
public String getDisplayText()The text shown to the user in the completion popup.
getInsertText
public String getInsertText()The text inserted into the editor when this completion is accepted.
getType
public String getType()An optional category used to badge / icon the entry, e.g.
"method", "keyword",
"variable", "class", "snippet".setType
public CodeCompletion setType(String type)Sets the completion category. Returns this for chaining.
Parameters
typeString- the completion category
getDetail
public String getDetail()Optional secondary detail (e.g. a method signature or return type) shown alongside the entry.
setDetail
public CodeCompletion setDetail(String detail)Sets the optional secondary detail. Returns this for chaining.
Parameters
detailString- the detail string