Bug 86465 ResultCollector made non-extendable in 3.1M5a
I know ResultCollector is part of the internal API, but AFAIK it is the only entrypoint to provide Java completions in non-java files (such as JSPs, HBM.xml, etc.) without reimplementing the logic found in it. Until now it has been quite easy to adapt it for many purposes by extending it, but between 3.1M4 and M5 the internalAcceptMethod has been made private instead of protected. I would suggest to make this method protected again or even better provide an API that could reuse the JDT completion logic.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
private final static char[] METHOD_WITH_ARGUMENTS_TRIGGERS= new char[] { '(', '-', ' ' };
	private final static char[] METHOD_TRIGGERS= new char[] { ';', ',', '.', '\t', '[', ' ' };
	private final static char[] TYPE_TRIGGERS= new char[] { '.', '\t', '[', '(', ' ' };
	private final static char[] VAR_TRIGGER= new char[] { '\t', ' ', '=', ';', '.' };
	protected IJavaProject fJavaProject;
	protected ICompilationUnit fCompilationUnit; 
	protected int fCodeAssistOffset;
	protected int fContextOffset;
	protected ITextViewer fTextViewer;
	
	private ArrayList fFields=
		new ArrayList(),
		fKeywords= new ArrayList(10), 
		fLabels= new ArrayList(10),
		fMethods= new ArrayList(),
		fModifiers= new ArrayList(10),
		fPackages= new ArrayList(),
		fTypes= new ArrayList(),
		fVariables= new ArrayList();
	private IProblem fLastProblem;	
	private ImageDescriptorRegistry fRegistry= JavaPlugin.getImageDescriptorRegistry();
	
	private ArrayList[] fResults = new ArrayList[] {
		fPackages, fLabels, fModifiers, fKeywords, fTypes, fMethods, fFields, fVariables
	};
	
	private Set fSuggestedMethodNames= new HashSet();