Search in sources :

Example 1 with ContentProposalAdapter

use of org.csstudio.autocomplete.ui.content.ContentProposalAdapter in project yamcs-studio by yamcs.

the class AutoCompleteWidget method enableContentProposal.

private void enableContentProposal() {
    if (control instanceof Combo) {
        Combo combo = (Combo) control;
        provider = new AutoCompleteProposalProvider(type);
        adapter = new ContentProposalAdapter(combo, new ComboContentAdapter(), provider, getActivationKeystroke(), getAutoactivationChars());
    } else if (control instanceof Text) {
        Text text = (Text) control;
        provider = new AutoCompleteProposalProvider(type);
        adapter = new ContentProposalAdapter(text, new TextContentAdapter(), provider, getActivationKeystroke(), getAutoactivationChars());
    }
}
Also used : ComboContentAdapter(org.eclipse.jface.fieldassist.ComboContentAdapter) Combo(org.eclipse.swt.widgets.Combo) Text(org.eclipse.swt.widgets.Text) TextContentAdapter(org.eclipse.jface.fieldassist.TextContentAdapter) ContentProposalAdapter(org.csstudio.autocomplete.ui.content.ContentProposalAdapter)

Aggregations

ContentProposalAdapter (org.csstudio.autocomplete.ui.content.ContentProposalAdapter)1 ComboContentAdapter (org.eclipse.jface.fieldassist.ComboContentAdapter)1 TextContentAdapter (org.eclipse.jface.fieldassist.TextContentAdapter)1 Combo (org.eclipse.swt.widgets.Combo)1 Text (org.eclipse.swt.widgets.Text)1