Bug 82260 ResultCollector: remove dependency to internal J Core interface
I20050104-1600 Summary says it all.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CodeCompletionTest.java
ResultCollector collector= new ResultCollector();
		collector.reset(offset, cu.getJavaProject(), cu);
		collector.setViewer(null);
		collector.setReplacementLength(0);
		collector.setPreventEating(true);
		codeComplete(cu, offset, collector);
		JavaCompletionProposal[] proposals= collector.getResults();
		JavaCompletionProposal toStringProposal= null;
		for (int i= 0; i < proposals.length; i++) {
			if (proposals[i].getDisplayString().startsWith("run()")) {
				toStringProposal= proposals[i];
			}
		}
		assertNotNull("no proposal for toString()", toStringProposal);
		IDocument doc= new Document(contents);
		if (toStringProposal instanceof OverrideCompletionProposal)
			((OverrideCompletionProposal) toStringProposal).setAnnotations(false);
		toStringProposal.apply(doc);
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");
		buf.append("public class A {\n");
		buf.append("    public void foo() {\n");
		buf.append("        new Runnable() {\n");
		buf.append("            /* (non-Javadoc)\n");
		buf.append("             * @see java.lang.Runnable#run()\n");
		buf.append("             */\n");
		buf.append("            public void run() {\n");
		buf.append("                //TODO\n");
		buf.append("\n");