JavaCompletionProposal[] proposals= collector.getResults();
IJavaCompletionProposal[] proposals= collector.getJavaCompletionProposals();
	public void testSetterCompletion1() 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 writer;\n");		buf.append("    se//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);			codeComplete(cu, offset, collector);			JavaCompletionProposal[] proposals= collector.getResults();			JavaCompletionProposal proposal= null;			for (int i= 0; i < proposals.length; i++) {				if (proposals[i].getDisplayString().startsWith("setWriter")) {					proposal= proposals[i];				}			}			assertNotNull("no proposal for setWriter()", proposal);			IDocument doc= JavaUI.getDocumentProvider().getDocument(part.getEditorInput());			proposal.apply(doc);			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 writer;\n");			buf.append("    /**\n");			buf.append("     * @param writer The writer to set.\n");			buf.append("     */\n");			buf.append("    public void setWriter(BufferedWriter writer) {\n");			buf.append("        this.writer = writer;\n");			buf.append("    }//here\n");			buf.append("}\n");			assertEqualString(doc.get(), buf.toString());		} finally {			part.getSite().getPage().closeAllEditors(false);		}	}