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
}
			}
		} catch (CoreException e) {
			JavaPlugin.log(e);
		}
	}
	
	/*
	 * @see ICodeCompletionRequestor#acceptVariableName
	 */
	protected void internalAcceptVariableName(char[] typePackageName, char[] typeName, char[] name, char[] completionName, int start, int end, int relevance) {
		
		StringBuffer buf= new StringBuffer();
		buf.append(name);
		if (typeName != null && typeName.length > 0) {
			buf.append(" - "); 
			buf.append(typeName);
		}
		JavaCompletionProposal proposal= createCompletion(start, end, new String(completionName), null, buf.toString(), relevance);
		proposal.setTriggerCharacters(VAR_TRIGGER);
		fVariables.add(proposal);
	}	
	
	public String getErrorMessage() {
		if (fLastProblem != null)
			return fLastProblem.getMessage();
		return ""; 
	}
	public JavaCompletionProposal[] getResults() {