private void createFilterContentAssist(Combo filterCombo, Label helpLabel) { // Create the find content assist field ComboContentAdapter contentAdapter= new ComboContentAdapter(); FindReplaceDocumentAdapterContentProposalProvider findProposer= new FindReplaceDocumentAdapterContentProposalProvider(true); mContentAssistFindField = new ContentAssistCommandAdapter( filterCombo, contentAdapter, findProposer, null, new char[] {'\\', '[', '('}, true); mContentAssistFindField.setEnabled(false); GridData gd= (GridData)filterCombo.getLayoutData(); FieldDecoration dec= FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL); Rectangle bounds = dec.getImage().getBounds(); gd.horizontalIndent= bounds.width; ((GridData)helpLabel.getLayoutData()).horizontalIndent = bounds.width; }
private void installPatternContentAssist() { ContentProposalAdapter contentAssist = new ContentAssistCommandAdapter( patternText, new TextContentAdapter(), new FindReplaceDocumentAdapterContentProposalProvider( true ), CONTENT_ASSIST_PROPOSALS, new char[]{ '\\', '[', '(' }, true ); contentAssist.setEnabled( true ); }