Bug 288804 [FieldAssist] [JFace] ContentProposalAdapter needs new setFocus() method
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729) Build Identifier: I20090611-1540 Please implement a public setFocus() method for ContentProposalAdapter. Is needed to set the focus to the control manually. Reproducible: Always
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
/*
	 * Return whether a proposal popup should remain open.
	 * If it was autoactivated by specific characters, and 
	 * none of those characters remain, then it should not remain
	 * open.  This method should not be used to determine
	 * whether autoactivation has occurred or should occur, only whether
	 * the circumstances would dictate that a popup remain open.
	 */
	private boolean shouldPopupRemainOpen() {
		
		if (autoActivateString == null || autoActivateString.length() == 0)
			return true;
		String content = getControlContentAdapter().getControlContents(getControl());
		for (int i=0; i<autoActivateString.length(); i++) {
			if (content.indexOf(autoActivateString.charAt(i)) >= 0)
				return true;
		}
		return false;
	}
	
	/*
	 * Return whether this adapter is configured for autoactivation, by
	 * specific characters or by any characters.
	 */
	private boolean allowsAutoActivate() {
		return (autoActivateString != null && autoActivateString.length() > 0) 
		  || (autoActivateString == null && triggerKeyStroke == null);    
	}
}