Class CodeCompletion
java.lang.Object
com.codename1.ui.CodeCompletion
A single code completion proposal returned by a
CodeCompletionProvider and shown in the
CodeEditor completion popup.-
Constructor Summary
ConstructorsConstructorDescriptionCodeCompletion(String text) Creates a completion whose displayed and inserted text are identical.CodeCompletion(String displayText, String insertText) Creates a completion with distinct display and insertion text. -
Method Summary
Modifier and TypeMethodDescriptionOptional secondary detail (e.g. a method signature or return type) shown alongside the entry.The text shown to the user in the completion popup.The text inserted into the editor when this completion is accepted.getType()An optional category used to badge / icon the entry, e.g.Sets the optional secondary detail.Sets the completion category.
-
Constructor Details
-
CodeCompletion
Creates a completion whose displayed and inserted text are identical.
Parameters
text: the text shown in the popup and inserted when chosen
-
CodeCompletion
-
-
Method Details
-
getDisplayText
The text shown to the user in the completion popup. -
getInsertText
The text inserted into the editor when this completion is accepted. -
getType
An optional category used to badge / icon the entry, e.g."method","keyword","variable","class","snippet". -
setType
Sets the completion category. Returns this for chaining.
Parameters
type: the completion category
-
getDetail
Optional secondary detail (e.g. a method signature or return type) shown alongside the entry. -
setDetail
Sets the optional secondary detail. Returns this for chaining.
Parameters
detail: the detail string
-