Examples of ContentAssistCommandAdapter


Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

   
    // Create the find content assist field
    ComboContentAdapter contentAdapter= new ComboContentAdapter();
    RegExContentProposalProvider findProposer= new RegExContentProposalProvider(true);
    fFindField= new Combo(panel, SWT.DROP_DOWN | SWT.BORDER);
    fContentAssistFindField= new ContentAssistCommandAdapter(
        fFindField,
        contentAdapter,
        findProposer,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
        new char[] {'\\', '[', '('},
        true);
    setGridData(fFindField, SWT.FILL, true, SWT.CENTER, false);
    addDecorationMargin(fFindField);
    fFindField.addModifyListener(fFindModifyListener);

    fReplaceLabel= new Label(panel, SWT.LEFT);
    fReplaceLabel.setText(EditorMessages.FindReplace_Replace_label);
    setGridData(fReplaceLabel, SWT.LEFT, false, SWT.CENTER, false);

    // Create the replace content assist field
    RegExContentProposalProvider replaceProposer= new RegExContentProposalProvider(false);
    fReplaceField= new Combo(panel, SWT.DROP_DOWN | SWT.BORDER);
    fContentAssistReplaceField= new ContentAssistCommandAdapter(
        fReplaceField,
        contentAdapter, replaceProposer,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
        new char[] {'$'},
        true);
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

          sa.toArray(result);

          return result;
        }
      };
      ContentAssistCommandAdapter contentAssistCommandAdapter = new ContentAssistCommandAdapter(
          ts, controlContentAdapter, proposalProvider, null, null);
      contentAssistCommandAdapter
          .setProposalAcceptanceStyle(ContentAssistCommandAdapter.PROPOSAL_REPLACE);
      contentAssistCommandAdapter.setAutoActivationCharacters(null);
      ts.addSelectionListener(new SelectionListener() {

        public void widgetSelected(SelectionEvent e) {

        }
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

    Map<String, String> persons = getAttributeMapper().getOptions(getTaskAttribute());
   
    contentProposalProvider = new RedminePersonProposalProvider(getModel().getTask(), getTaskAttribute().getTaskData(), persons);
    ILabelProvider labelPropsalProvider = new RedminePersonProposalLabelProvider();
   
    ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(text,
        new TextContentAdapter(), contentProposalProvider,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[0], true);
   
    adapter.setLabelProvider(labelPropsalProvider);
    adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
   
  }
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

    // 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);
    addDecorationMargin(fFindField);
    fFindField.addModifyListener(fFindModifyListener);

    fReplaceLabel= new Label(panel, SWT.LEFT);
    fReplaceLabel.setText(EditorMessages.FindReplace_Replace_label);
    setGridData(fReplaceLabel, SWT.LEFT, false, SWT.CENTER, false);

    // Create the replace content assist field
    FindReplaceDocumentAdapterContentProposalProvider replaceProposer= new FindReplaceDocumentAdapterContentProposalProvider(false);
    fReplaceField= new Combo(panel, SWT.DROP_DOWN | SWT.BORDER);
    fContentAssistReplaceField= new ContentAssistCommandAdapter(
        fReplaceField,
        contentAdapter, replaceProposer,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
        new char[0],
        true);
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

    VariableManager variableManager = Activator.getPluginContext()
        .getVariableManager();
    Map<String, String> variableNamesWithDescription = variableManager
        .getNamesWithDescriptions();
    proposals.putAll(variableNamesWithDescription);
    new ContentAssistCommandAdapter(text, new TextContentAdapter(),
        new StartExplorerContentProposalProvider(proposals), null,
        new char[] { '$' }, true);
  }
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

    // instead of moving within autocompletion list (Mac 10.4&10.5, Eclipse
    // 3.4)
    final Combo combo = new Combo(parent, SWT.DROP_DOWN);
    final ControlDecoration decoration = new ControlDecoration(combo,
        SWT.BOTTOM | SWT.LEFT);
    final ContentAssistCommandAdapter proposal = new ContentAssistCommandAdapter(
        combo, new ComboContentAdapter(), proposalProvider, null, null,
        true);
    proposal
        .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
    if (listener != null)
      proposal.addContentProposalListener(listener);
    return decoration;
  }
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

  private CellEditor createRefCellEditor(final Table table,
      final IContentProposalProvider proposalProvider) {
    final CellEditor cellEditor = new TextCellEditor(table);

    final Text text = (Text) cellEditor.getControl();
    final ContentAssistCommandAdapter assist = new ContentAssistCommandAdapter(
        text, new TextContentAdapter(), proposalProvider, null, null,
        true);
    assist
        .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);

    return cellEditor;
  }
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

    patternCombo.setLayoutData(data);

    ComboContentAdapter contentAdapter = new ComboContentAdapter();
    FindReplaceDocumentAdapterContentProposalProvider findProposer = new FindReplaceDocumentAdapterContentProposalProvider(
        true);
    patternFieldContentAssist = new ContentAssistCommandAdapter(
        patternCombo, contentAdapter, findProposer,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
        new char[0], true);
    patternFieldContentAssist.setEnabled(false);
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

    fPattern.setLayoutData(data);

    ComboContentAdapter contentAdapter = new ComboContentAdapter();
    FindReplaceDocumentAdapterContentProposalProvider findProposer = new FindReplaceDocumentAdapterContentProposalProvider(
        true);
    fPatterFieldContentAssist = new ContentAssistCommandAdapter(fPattern, contentAdapter,
        findProposer, ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[0], true);
    fPatterFieldContentAssist.setEnabled(fIsRegExSearch);

    fIsCaseSensitiveCheckbox = new Button(group, SWT.CHECK);
    fIsCaseSensitiveCheckbox.setText("&Case sensitive");
View Full Code Here

Examples of org.eclipse.ui.fieldassist.ContentAssistCommandAdapter

        } catch (Throwable e) {
            //just ignore it if we don't succeed
        }

        try {
            fTextFieldContentAssist = new ContentAssistCommandAdapter(fTextField, contentAdapter, replaceProposer,
                    ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[] { '$', '\\' }, true);
        } catch (Throwable e) {
            // Not available in eclipse 3.2
            fTextFieldContentAssist = new ContentAssistCommandAdapter(fTextField, contentAdapter, replaceProposer,
                    ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[] { '$', '\\' });
        }

        new Label(result, SWT.NONE);
        fReplaceWithRegex = new Button(result, SWT.CHECK);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.