org.eclipse.jface.fieldassist.ComboContentAdapter Java Examples
The following examples show how to use
org.eclipse.jface.fieldassist.ComboContentAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TimeGraphFindDialog.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Creates the panel where the user specifies the text to search for * * @param parent * the parent composite * @return the input panel */ private Composite createInputPanel(Composite parent) { Composite panel = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.numColumns = 2; panel.setLayout(layout); Label findLabel = new Label(panel, SWT.LEFT); findLabel.setText(Messages.TimeGraphFindDialog_FindLabel); setGridData(findLabel, SWT.LEFT, false, SWT.CENTER, false); // Create the find content assist field ComboContentAdapter contentAdapter = new ComboContentAdapter(); FindReplaceDocumentAdapterContentProposalProvider findProposer = new FindReplaceDocumentAdapterContentProposalProvider(true); fFindField = new Combo(panel, SWT.DROP_DOWN | SWT.BORDER); fContentAssistFindField = new ContentAssistCommandAdapter( fFindField, contentAdapter, findProposer, ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[0], true); setGridData(fFindField, SWT.FILL, true, SWT.CENTER, false); fFindField.addModifyListener(fFindModifyListener); return panel; }