Bug 84998 [api] Make ResultCollector API
Eclipse 3.0.1 In our application we provide code assist to our own Java editor. In order to be consistent with the JDT Java editor we need to provide the same look and feel for code assist (icons, ordering, display string, etc...). Currently the only way we can get that to work is using the internal class ResultCollector. Since ResultCollector is basically an implementation of ICompletionRequestor, would it be possible to make it API or at least provide the functionality to people implementing code assist for Java-like editors?
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposal.java
*/
	public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) {
		String string= getReplacementString();
		int pos= string.indexOf('(');
		if (pos > 0)
			return string.subSequence(0, pos);
		else
			return string;
	}
	/**
	 * Sets the replacement string.
	 * @param replacementString The replacement string to set
	 */
	public void setReplacementString(String replacementString) {
		fReplacementString= replacementString;
	}
	/**
	 * Sets the image.
	 * @param image The image to set
	 */
	public void setImage(Image image) {
		fImage= image;
	}
	/*
	 * @see ICompletionProposalExtension#isValidFor(IDocument, int)
	 */
	public boolean isValidFor(IDocument document, int offset) {
		return validate(document, offset, null);
	}
	/*