ContentProposalAdapter autoCompletion = new ContentProposalAdapter( this.fileName, new TextContentAdapter(), new JavaElementContentProposalProvider(), keyStroke,
ContentProposalAdapter autoCompletion = new ContentProposalAdapter( this.className, new TextContentAdapter(), new JavaElementContentProposalProvider(), keyStroke,
public ComboAutoCompleteField(Combo c) { this.combo = c; adapter = new ContentProposalAdapter(combo, new ComboContentAdapter(), getProposalProvider(), null, null); adapter.setPropagateKeys(true); adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); }
/** * Construct an AutoComplete field on the specified control, whose * completions are characterized by the specified array of Strings. * * @param control * the control for which autocomplete is desired. May not be * <code>null</code>. * @param controlContentAdapter * the <code>IControlContentAdapter</code> used to obtain and * update the control's contents. May not be <code>null</code>. * @param proposals * the array of Strings representing valid content proposals for * the field. */ public AutoCompleteField(Control control, IControlContentAdapter controlContentAdapter, String[] proposals) { proposalProvider = new SimpleContentProposalProvider(proposals); proposalProvider.setFiltering(true); adapter = new ContentProposalAdapter(control, controlContentAdapter, proposalProvider, null, null); adapter.setPropagateKeys(true); adapter .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); }
/** * Construct an AutoComplete field on the specified control, whose * completions are characterized by the specified array of Strings. * * @param control * the control for which autocomplete is desired. May not be * <code>null</code>. * @param controlContentAdapter * the <code>IControlContentAdapter</code> used to obtain and * update the control's contents. May not be <code>null</code>. * @param proposals * the array of Strings representing valid content proposals for * the field. */ public AutoCompleteField(Control control, IControlContentAdapter controlContentAdapter, String... proposals) { proposalProvider = new SimpleContentProposalProvider(proposals); proposalProvider.setFiltering(true); adapter = new ContentProposalAdapter(control, controlContentAdapter, proposalProvider, null, null); adapter.setPropagateKeys(true); adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); }
/** * Construct an AutoComplete field on the specified control, whose * completions are characterized by the specified array of Strings. * * @param control * the control for which autocomplete is desired. May not be * <code>null</code>. * @param controlContentAdapter * the <code>IControlContentAdapter</code> used to obtain and * update the control's contents. May not be <code>null</code>. * @param proposals * the array of Strings representing valid content proposals for * the field. */ public AutoCompleteField(Control control, IControlContentAdapter controlContentAdapter, String[] proposals) { proposalProvider = new SimpleContentProposalProvider(proposals); proposalProvider.setFiltering(true); adapter = new ContentProposalAdapter(control, controlContentAdapter, proposalProvider, null, null); adapter.setPropagateKeys(true); adapter .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); }
private ContentProposalAdapter addContentAssistSimple(Text textControl) { char[] autoActivationCharacters = new char[] { '$', '{' }; KeyStroke keyStroke = null; try { keyStroke = KeyStroke.getInstance("Ctrl+Space"); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } // assume that myTextControl has already been created in some way List<Variable> variables = Variable.getVisibleVariables(); String[] proposals = new String [variables.size()]; for(int i=0;i<variables.size();i++) { proposals[i] = variables.get(i).getFullVariableName(); } ContentProposalAdapter adapter = new ContentProposalAdapter( textControl , new TextContentAdapter(), new SimpleContentProposalProvider(proposals), keyStroke, autoActivationCharacters); adapter.setPropagateKeys(false); adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE); //adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); return adapter; }
ContentProposalAdapter adapter = new ContentProposalAdapter(textField, new TextContentAdapter(), cp, stroke, null);
ContentProposalAdapter adapter = new ContentProposalAdapter(textField, new TextContentAdapter(), cp, stroke, null);
ContentProposalAdapter adapter = new ContentProposalAdapter(textField, new TextContentAdapter(), cp, stroke, null);
ContentProposalAdapter adapter = new ContentProposalAdapter(textField, new TextContentAdapter(), cp, stroke, UIUtils.VALUE_HELP_ACTIVATIONCHARS);
ContentProposalAdapter adapter = new ContentProposalAdapter(textField, new TextContentAdapter(), cp, stroke, VALUE_HELP_ACTIVATIONCHARS);
UIText.CommitCombo_showSuggestedCommits); ContentProposalAdapter adapter = new ContentProposalAdapter(combo, new ComboContentAdapter(), new CommitContentProposalProvider(), null, null);
contextEntryDnComboCPA = new ContentProposalAdapter( contextEntryDnCombo, new ComboContentAdapter(), null, null, null ); contextEntryDnComboCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );