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
}
		assertNotNull("no proposal for enum Natural()", proposal);
		IDocument doc= new Document(contents);
		proposal.apply(doc);
		String result= "package test1;\n" + "\n" + "enum Natural {\n" + "	ONE,\n" + "	TWO,\n" + "	THREE\n" + "}\n" + "\n" + "public class Completion {\n" + "    \n" + "    void foomethod() {\n" + "        Natural//here\n" + "    }\n" + "}\n";
		assertEqualString(doc.get(), result);
	}
	public void testGetterCompletion1() throws Exception {
		IPackageFragmentRoot sourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
		IPackageFragment pack1= sourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");
		buf.append("import java.io.BufferedWriter;\n");
		buf.append("\n");
		buf.append("public class A {\n");
		buf.append("    private BufferedWriter fWriter;\n");
		buf.append("    get//here\n");
		buf.append("}\n");
		String contents= buf.toString();
		ICompilationUnit cu= pack1.createCompilationUnit("A.java", contents, false, null);
		IEditorPart part= EditorUtility.openInEditor(cu);
		try {
			String str= "//here";
			int offset= contents.indexOf(str);
			ResultCollector collector= new ResultCollector();
			collector.reset(offset, cu.getJavaProject(), cu);
			collector.setViewer(null);
			collector.setReplacementLength(0);
			collector.setPreventEating(true);