Java 类org.eclipse.jface.text.FindReplaceDocumentAdapterContentProposalProvider 实例源码

项目:eclipsensis    文件:NSISCommandView.java   
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;
}
项目:eclipse-extras    文件:DynamicWorkingSetPage.java   
private void installPatternContentAssist() {
  ContentProposalAdapter contentAssist = new ContentAssistCommandAdapter(
    patternText,
    new TextContentAdapter(),
    new FindReplaceDocumentAdapterContentProposalProvider( true ),
    CONTENT_ASSIST_PROPOSALS,
    new char[]{ '\\', '[', '(' },
    true );
  contentAssist.setEnabled( true );
}