|
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 |
java.lang.Object org.netbeans.spi.editor.completion.support.AsyncCompletionTask
public final class AsyncCompletionTask
Asynchronous completion task allowing asynchronous query execution
through AsyncCompletionQuery
.
This is a final class and all the logic must be defined
in an implementation of AsyncCompletionQuery
that must
be passed to constructor of this task.
AsyncCompletionQuery
Constructor Summary | |
---|---|
AsyncCompletionTask(AsyncCompletionQuery query)
Constructor for the case when there is no valid component which can happen when creating task for documentation or tooltip computation. |
|
AsyncCompletionTask(AsyncCompletionQuery query,
JTextComponent component)
Construct asynchronous task for the given component. |
Method Summary | |
---|---|
void |
cancel()
Called by completion infrastructure to cancel the running task. |
void |
query(CompletionResultSet resultSet)
Called by completion infrastructure in AWT thread to populate the given result set with data. |
void |
refresh(CompletionResultSet resultSet)
Called by completion infrastructure in AWT thread once there is a change in the component (caret position changes or document gets modified). |
void |
run()
This method will be run() from the RequestProcessor during performing of the query. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AsyncCompletionTask(AsyncCompletionQuery query, JTextComponent component)
query
- non-null query implementation.component
- text component to operate with. The completion infrastructure
will cancel the task if the component or its associated document would change.
public AsyncCompletionTask(AsyncCompletionQuery query)
query
- non-null query implementation.Method Detail |
---|
public void query(CompletionResultSet resultSet)
query
in interface CompletionTask
resultSet
- non-null result set to which the results
of the query must be added.public void refresh(CompletionResultSet resultSet)
refresh
in interface CompletionTask
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.public void cancel()
cancel
in interface CompletionTask
public void run()
public String toString()
|
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 |