Bug 200762 [FieldAssist] SimpleContentProposalProvider filters out exact matches
Build ID: I20070625-1500 Steps To Reproduce: 1. Trigger content assist on a field that uses org.eclipse.jface.fieldassist.AutoCompleteField with SimpleContentProposalProvider 2. If one of the choices is 'foo' and another is 'foobar', typing 'foo' in the field will remove it from the list of proposals leaving 'foobar' selected. If the user presses the enter key, foobar is placed in the field instead of 'foo'. More information: To fix the problem, change line 70: From: if (proposals[i].length() > contents.length() To: if (proposals[i].length() >= contents.length()
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/SimpleContentProposalProvider.java
* always the specified array of Objects.
	 * 
	 * @param proposals
	 *            the array of Strings to be returned whenever proposals are
	 *            requested.
	 */
	public SimpleContentProposalProvider(String[] proposals) {
		super();
		this.proposals = proposals;
	}
	/**
	 * Return an array of Objects representing the valid content proposals for a
	 * field. Ignore the current contents of the field.
	 * 
	 * @param contents
	 *            the current contents of the field (only consulted if filtering
	 *            is set to <code>true</code>)
	 * @param position
	 *            the current cursor position within the field (ignored)
	 * @return the array of Objects that represent valid proposals for the field
	 *         given its current content.
	 */
	public IContentProposal[] getProposals(String contents, int position) {
		if (filterProposals) {
			ArrayList list = new ArrayList();
			for (int i = 0; i < proposals.length; i++) {
				if (proposals[i].length() > contents.length()
						&& proposals[i].substring(0, contents.length())
								.equalsIgnoreCase(contents)) {
					list.add(makeContentProposal(proposals[i]));