类org.eclipse.ui.fieldassist.ContentAssistCommandAdapter源码实例Demo

下面列出了怎么用org.eclipse.ui.fieldassist.ContentAssistCommandAdapter的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: tracecompass   文件: TimeGraphFindDialog.java
/**
 * 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;
}
 
源代码2 项目: 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 );
}
 
源代码3 项目: EasyShell   文件: CommandDataDialog.java
private ContentProposalAdapter addContentAssistExtended(Text textControl) {
    char[] autoActivationCharacters = new char[] { '$', '{' };
    Map<String, String> proposals = new LinkedHashMap<String, String>();
    // add own variables
    proposals.putAll(Variable.getVariableInfoMap());
    // add eclipse variables
    proposals.putAll(Variable.getEclipseVariableInfoMap());
    ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(textControl, new CommandVariableContentAdapter(),
            new CommandVariableContentProposalProvider(proposals), null,
            autoActivationCharacters, true);
    adapter.setPropagateKeys(false);
    adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
    return adapter;
}
 
源代码4 项目: EasyShell   文件: MenuDataDialog.java
private ContentProposalAdapter addContentAssistExtended(Text textControl) {
    char[] autoActivationCharacters = new char[] { '$', '{' };
    Map<String, String> proposals = new LinkedHashMap<String, String>();
    // add internal variables
    proposals.putAll(Variable.getInternalVariableInfoMap());
    ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(textControl, new CommandVariableContentAdapter(),
            new CommandVariableContentProposalProvider(proposals), null,
            autoActivationCharacters, true);
    adapter.setPropagateKeys(false);
    adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
    return adapter;
}
 
 类所在包
 同包方法