Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Use AutoCompleteField and ContentProposalAdapter
Use AutoCompleteField and ContentProposalAdapter [message #915910] Tue, 18 September 2012 03:52
budili Missing name is currently offline budili Missing name
Messages: 64
Registered: May 2010
Member
Hello,

I want to use the AutoCompleteField and ContentProposalAdapter for my textfield.
The ContentProposalAdapter to show alle entries (about Ctrl+Space) and the AutoCompleteField for auto completion, when the user type in the textfield.

If I use both of them I have some problems, e.g. if I open the proposal about the shortcut (ctrl+space) and select an item, so the proposal will be opened again and show me my selected item. It is possible to deactivate this?

Here's the code:
try
        {
            final KeyStroke keyStroke = KeyStroke.getInstance("Ctrl+Space"); //$NON-NLS-1$
            contentAdapter = new ContentProposalAdapter(text, new TextContentAdapter(), new SimpleContentProposalProvider(textInput), keyStroke, null);
        }
        catch (final ParseException exception)
        {
            LOGGER.debug(exception);
        }
        autoCompleteField = new AutoCompleteField(text, new TextContentAdapter(), textInput);



Some ideas?
Previous Topic:TreeViewer, TreeEditor & HyperLink
Next Topic:toolbar does not wrap
Goto Forum:
  


Current Time: Tue Jul 29 03:00:44 EDT 2014

Powered by FUDForum. Page generated in 0.01679 seconds