Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] testing content assist on a text field

Thanks for bringing this discussion here.

On 09/29/2014 11:02 AM, Lorenzo Bettini wrote:
from what I understand there's no way of testing the content assist on a
Text field, is it?
The concept of "content assist" doesn't exist in SWT (it's generally implemented with listeners and new Shells), so it's not available in SWTBot.
However, since content assist is a core part of most editors, it is available on SWTBotEditor.

This would be useful to test content assist on a Text field that you can
add with a org.eclipse.jface.fieldassist.ContentProposalAdapter, e.g.,

new ContentProposalAdapter
	(text, new TextContentAdapter(),
		new SimpleContentProposalProvider(...),
		keyStroke,
		null);
I believe it's a good idea to provide a utility method to deal with content assist for plain SWT fields. Not sure it should be directly added to the SWTText class, but having it around would be nice.

--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top