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
}
		}
		return length;
	}
	
	protected final Image getImage(ImageDescriptor descriptor) {
		return (descriptor == null) ? null : fRegistry.get(descriptor);
	}
	
	private void acceptAnnotationAttributeReference(CompletionProposal proposal) {
		IJavaCompletionProposal uiProposal= createAnnotationAttributeReferenceProposal(proposal);
		if (uiProposal != null)
			fMethods.add(uiProposal);
	}
	protected IJavaCompletionProposal createAnnotationAttributeReferenceProposal(CompletionProposal proposal) {
		String displayString= fLabelProvider.createLabel(proposal);
		ImageDescriptor descriptor= fLabelProvider.createImageDescriptor(proposal);
		String completion= String.valueOf(proposal.getCompletion());
		return new JavaCompletionProposal(completion, proposal.getReplaceStart(), getLength(proposal.getReplaceStart(), proposal.getReplaceEnd()), getImage(descriptor), displayString, proposal.getRelevance(), fTextViewer);
	}
	
	/**
	 * Specifies the context of the code assist operation.
	 * @param codeAssistOffset The Offset at which the code assist will be called.
	 * Used to modify the offsets of the created proposals. ('Non Eating')
	 * @param contextOffset The offset at which the context presumable start or -1.
	 * @param jproject The Java project to which the underlying source belongs.
	 * Needed to find types referred.
	 * @param cu The compilation unit that is edited. Used to add import statements.
	 * Can be <code>null</code> if no import statements should be added.