|
org.netbeans.modules.editor.completion/1 1.6.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompletionTask
The inteface of a task performing a code completion query.
The support class
AsyncCompletionTask
can be used for convenience when the task requires an asynchronous evaluation.
CompletionProvider
Method Summary | |
---|---|
void |
cancel()
Called by the code completion infrastructure to cancel the task. |
void |
query(CompletionResultSet resultSet)
Called by the code completion infrastructure to ask the task to do a query and return the results through the given completion listener. |
void |
refresh(CompletionResultSet resultSet)
Called by the code completion infrastructure to inform the task about changes in the corresponding document. |
Method Detail |
---|
void query(CompletionResultSet resultSet)
This method is always called in AWT thread but it may reschedule its processing into another thread and fire the given listener once the computing is finished.
resultSet
- non-null result set to which the results
of the query must be added.void refresh(CompletionResultSet resultSet)
query()
was invoked
but it may also be invoked BEFORE the query()
in case
the user types even before the query()
was called by the infrastructure. In such
case the resultSet
parameter will be null
.
query()
or refresh()
.
This method is always called in AWT thread but it may reschedule its processing into another thread and fire the given listener once the computing is finished.
resultSet
- non-null result set to which the results
of the refreshing must be added.
query()
was not invoked yet and user has typed a character. In this case
the provider may hide the completion
by using Completion.get().hideAll()
if the typed character is inappropriate e.g. ";" for java completion.void cancel()
This method may potentially be called from any thread.
|
org.netbeans.modules.editor.completion/1 1.6.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |