public class ClassImportCompletionItem extends DefaultCompletionItem
Constructor and Description |
---|
ClassImportCompletionItem(java.lang.String text,
int offset,
java.lang.String complete,
java.lang.String label,
java.lang.String link,
int sortPriority,
javax.swing.ImageIcon icon,
java.lang.String pkg,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
defaultAction(javax.swing.text.JTextComponent jTextComponent)
Gets invoked when user presses
VK_ENTER key
or when she double-clicks on this item with the mouse cursor. |
boolean |
instantSubstitution(javax.swing.text.JTextComponent jTextComponent)
When enabled for the item the instant substitution should process the item
in the same way like when the item is displayed and Enter key gets pressed
by the user.
|
createDocumentationTask, createToolTipTask, error, getComplete, getInsertPrefix, getPreferredWidth, getSortPriority, getSortText, processKeyEvent, render, setReferenceOnly, substituteText
public ClassImportCompletionItem(java.lang.String text, int offset, java.lang.String complete, java.lang.String label, java.lang.String link, int sortPriority, javax.swing.ImageIcon icon, java.lang.String pkg, java.lang.String name)
public void defaultAction(javax.swing.text.JTextComponent jTextComponent)
CompletionItem
VK_ENTER
key
or when she double-clicks on this item with the mouse cursor.
defaultAction
in interface CompletionItem
defaultAction
in class DefaultCompletionItem
jTextComponent
- non-null text component for which the completion was invoked.public boolean instantSubstitution(javax.swing.text.JTextComponent jTextComponent)
CompletionItem
CompletionItem.defaultAction(JTextComponent)
if necessary.
instantSubstitution
in interface CompletionItem
instantSubstitution
in class DefaultCompletionItem
jTextComponent
- non-null text component for which the completion was invoked.true
if the instant substitution was successfully done.
false
means that the instant substitution should not be done
for this item and the completion item should normally be displayed.