net.jakubholy.jedit.autocomplete
Interface ITextAutoCompletionPopup

All Known Implementing Classes:
CompletionPopup

public interface ITextAutoCompletionPopup

A pop-up window to display a list of available completions, react to user input and insert a selected completion.

The purpose of this interface is to decouple the AutoComplete plugin class using the pop-up and the actual pop-up implementation based on the current jEdit API.


Method Summary
 void dispose()
          Hide the popup & cease to grab the key input.
 void setWord(java.lang.String word)
          Set the prefix being completed.
 boolean showCompletions(net.jakubholy.jedit.autocomplete.Completion[] completions)
          Display/update a popup with the given completions.
 

Method Detail

showCompletions

boolean showCompletions(net.jakubholy.jedit.autocomplete.Completion[] completions)
Display/update a popup with the given completions.

Parameters:
completions - The completions to set; if empty => dispose.
Returns:
Returns true if the operation succeeded (== valid completions).

dispose

void dispose()
Hide the popup & cease to grab the key input.


setWord

void setWord(java.lang.String word)
Set the prefix being completed. We need it for positioning the pop-up and for inserting only the missing part of a completion (e.g. only 'phant' for prefix 'ele' and completion 'elephant').