public abstract class SideKickCompletion
extends java.lang.Object
This is a wrapper around a collection of possible completions, with callbacks for inserting and displaying the completions in a popup menu.
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
items |
protected java.lang.String |
text |
protected org.gjt.sp.jedit.textarea.JEditTextArea |
textArea |
protected org.gjt.sp.jedit.View |
view |
Constructor and Description |
---|
SideKickCompletion()
Deprecated.
Use the other constructor instead.
|
SideKickCompletion(org.gjt.sp.jedit.View view,
java.lang.String text) |
SideKickCompletion(org.gjt.sp.jedit.View view,
java.lang.String text,
java.util.List items) |
SideKickCompletion(org.gjt.sp.jedit.View view,
java.lang.String text,
java.lang.Object[] items) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(int index) |
java.lang.String |
getCompletionDescription(int index) |
javax.swing.ListCellRenderer |
getRenderer() |
int |
getTokenLength()
The length of the text being completed (popup will be positioned there).
|
boolean |
handleKeystroke(int selectedIndex,
char keyChar) |
void |
insert(int index) |
boolean |
isCompletionSelectable(int index)
Deprecated.
Do not return false from this method. Unselectable completion
is not useful.
|
int |
size() |
boolean |
updateInPlace(org.gjt.sp.jedit.EditPane editPane,
int caret) |
protected org.gjt.sp.jedit.View view
protected org.gjt.sp.jedit.textarea.JEditTextArea textArea
protected java.lang.String text
protected java.util.List items
public SideKickCompletion()
public SideKickCompletion(org.gjt.sp.jedit.View view, java.lang.String text)
public SideKickCompletion(org.gjt.sp.jedit.View view, java.lang.String text, java.util.List items)
items
- - a list of strings containing the possible completions.public SideKickCompletion(org.gjt.sp.jedit.View view, java.lang.String text, java.lang.Object[] items)
public int size()
public java.lang.Object get(int index)
public java.lang.String getCompletionDescription(int index)
@Deprecated public boolean isCompletionSelectable(int index)
public boolean updateInPlace(org.gjt.sp.jedit.EditPane editPane, int caret)
public javax.swing.ListCellRenderer getRenderer()
public void insert(int index)
public int getTokenLength()
public boolean handleKeystroke(int selectedIndex, char keyChar)
selectedIndex
- The index of the selected completion.keyChar
- the character typed by the user.