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/ResultCollector.java
}
	protected IJavaCompletionProposal createFieldProposal(CompletionProposal proposal) {
		String completion= String.valueOf(proposal.getCompletion());
		int start= proposal.getReplaceStart();
		int length= getLength(start, proposal.getReplaceEnd());
		String label= fLabelProvider.createLabelWithTypeAndDeclaration(proposal);
		Image image= getImage(fLabelProvider.createFieldImageDescriptor(proposal));
		int relevance= proposal.getRelevance();
		JavaCompletionProposal javaProposal= new JavaCompletionProposal(completion, start, length, image, label, relevance, fTextViewer);
		javaProposal.setProposalInfo(new FieldProposalInfo(fJavaProject, proposal));
		javaProposal.setTriggerCharacters(VAR_TRIGGER);
		
		return javaProposal;
	}
	
	private void acceptAnonymousType(CompletionProposal proposal) {
		IJavaCompletionProposal uiProposal= createAnonymousTypeProposal(proposal);
		if (uiProposal != null)
			fTypes.add(uiProposal);
	}
	protected IJavaCompletionProposal createAnonymousTypeProposal(CompletionProposal proposal) {
		if (fCompilationUnit == null)
			return null;
		
		String declaringType= SignatureUtil.stripSignatureToFQN(String.valueOf(proposal.getDeclarationSignature()));
		String completion= String.valueOf(proposal.getCompletion());
		int start= proposal.getReplaceStart();
		int length= getLength(start, proposal.getReplaceEnd());
		int relevance= proposal.getRelevance();