Indicate that adding of the items to this result set
will likely need a long time so the resulting number of items
and their visual size should be estimated so that
the completion infrastructure can estimate the size
of the popup window and display the items added subsequently
without changing its bound extensively.

Method Detail

setTitle

Set title that will be assigned to the completion popup window.
It's only relevant to set the title when providing completion items
for CompletionProvider.COMPLETION_QUERY_TYPE.
If there will be multiple completion providers setting this property
for the given mime-type then only the first one
(according to the xml-layer registration order)
will be taken into account.

setAnchorOffset

public void setAnchorOffset(int anchorOffset)

Set the document offset to which the returned completion items
or documentation or tooltip should be anchored.
If there will be multiple completion providers setting this property
for the given mime-type then only the first one
(according to the xml-layer registration order)
will be taken into account.

addItem

Add the completion item to this result set.
This method can be called multiple times until
all the items have been added to this result set.
After the adding is completed @link #finish()} must be called to confirm
that the result set will no longer be modified.

Parameters:

item - non-null completion item.

Returns:

true if adding of the items can continue
or false if there is already too many items
to be practical to display in the listbox so subsequent
adding should preferably be discontinued.

addAllItems

Add the collection of the completion items to this result set.
This method can be called multiple times until
all the items have been added to this result set.
After the adding is completed @link #finish()} must be called to confirm
that the result set will no longer be modified.

Parameters:

items - collection of items to be added.

Returns:

true if adding of the items can continue
or false if there is already too many items
to be practical to display in the listbox so subsequent
adding should preferably be discontinued.

estimateItems

Indicate that adding of the items to this result set
will likely need a long time so the resulting number of items
and their visual size should be estimated so that
the completion infrastructure can estimate the size
of the popup window and display the items added subsequently
without changing its bound extensively.
Without calling of this method the completion infrastructure
will wait until CompletionResultSet.finish() gets called on this result set
before displaying any of the items added to this result set.

estimatedItemCount - estimated number of the items that will
be added to this result set by CompletionResultSet.addItem(CompletionItem).
If the estimate is significantly lower than the reality then
the vertical scrollbar granularity may be decreased or the vertical
scrollbar can be removed completely once the result set is finished.
If the estimate is significantly higher than the reality then
the vertical scrollbar granularity may be increased
once the result set is finished.

text - the text that will be directly prepend to the "Press 'Ctrl-Space' Again for All Items"
message in the completion popup. The text should end with a separator (e.g. space, semicolon and space, etc.)
that will separate it from the rest of the displayed message. null can be passed
to revert any previous setting of the text.

setWaitText

Set the explicit value displayed in a label when the completion results
do not get computed during a certain timeout (e.g. 250ms).
If not set explicitly the completion infrastructure will use
the default text.

Parameters:

waitText - description of what the query computation
is currently (doing or waiting for).
After previous explicit setting null can be passed
to restore using of the default text.