return super.getProposals(contents, position);
}
};
proposalProvider.setFiltering(true);
final ContentProposalAdapter adapter = new ContentProposalAdapter(control, contentAdapter, proposalProvider, activationKey, null);
adapter.setPropagateKeys(true);
adapter.setAutoActivationDelay(1500);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_INSERT);
/* Apply Proposals */
if (values != null)
applyAutoCompleteProposals(values, proposalProvider, adapter, autoActivate);
/*
* TODO: This is a hack but there doesnt seem to be any API to set the size
* of the popup to match the actual size of the Text widget being used.
*/
control.getDisplay().timerExec(100, new Runnable() {
public void run() {
if (!control.isDisposed()) {
adapter.setPopupSize(new Point(control.getSize().x, 120));
}
}
});
return Pair.create(proposalProvider, adapter);