assertNumberOf("proposals", proposals.size(), 6);
assertNumberOf("proposals", proposals.size(), 7);
	public void testVarAndTypeRef() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("import java.io.File;\n");		buf.append("public class F {\n");		buf.append("    void foo() {\n");		buf.append("        char ch= Fixe.pathSeparatorChar;\n");		buf.append("    }\n");		buf.append("}\n");		ICompilationUnit cu1= pack1.createCompilationUnit("F.java", buf.toString(), false, null);				CompilationUnit astRoot= AST.parseCompilationUnit(cu1, true);		ArrayList proposals= collectCorrections(cu1, astRoot);		assertNumberOf("proposals", proposals.size(), 6);		assertCorrectLabels(proposals);		boolean doField= true, doParam= true, doLocal= true, doInterface= true, doClass= true, doChange= true;		for (int i= 0; i < proposals.size(); i++) {			Object curr= proposals.get(i);			if (curr instanceof NewVariableCompletionProposal) {				NewVariableCompletionProposal proposal= (NewVariableCompletionProposal) proposals.get(i);				String preview= proposal.getCompilationUnitChange().getPreviewContent();					if (proposal.getVariableKind() == NewVariableCompletionProposal.FIELD) {					assertTrue("2 field proposals", doField);					doField= false;										buf= new StringBuffer();					buf.append("package test1;\n");					buf.append("import java.io.File;\n");					buf.append("public class F {\n");					buf.append("    private Object Fixe;\n");					buf.append("\n");					buf.append("    void foo() {\n");					buf.append("        char ch= Fixe.pathSeparatorChar;\n");					buf.append("    }\n");					buf.append("}\n");					assertEqualString(preview, buf.toString());				} else if (proposal.getVariableKind() == NewVariableCompletionProposal.LOCAL) {					assertTrue("2 local proposals", doLocal);					doLocal= false;										buf= new StringBuffer();					buf.append("package test1;\n");					buf.append("import java.io.File;\n");					buf.append("public class F {\n");					buf.append("    void foo() {\n");					buf.append("        Object Fixe = null;\n");										buf.append("        char ch= Fixe.pathSeparatorChar;\n");					buf.append("    }\n");					buf.append("}\n");					assertEqualString(preview, buf.toString());				} else if (proposal.getVariableKind() == NewVariableCompletionProposal.PARAM) {					assertTrue("2 param proposals", doParam);					doParam= false;										buf= new StringBuffer();					buf.append("package test1;\n");					buf.append("import java.io.File;\n");					buf.append("public class F {\n");					buf.append("    void foo(Object Fixe) {\n");					buf.append("        char ch= Fixe.pathSeparatorChar;\n");					buf.append("    }\n");					buf.append("}\n");					assertEqualString(preview, buf.toString());				} else {					assertTrue("unknown type", false);				}			} else if (curr instanceof NewCUCompletionUsingWizardProposal) {				NewCUCompletionUsingWizardProposal proposal= (NewCUCompletionUsingWizardProposal) curr;				proposal.setShowDialog(false);				proposal.apply(null);								ICompilationUnit newCU= pack1.getCompilationUnit("Fixe.java");				assertTrue("Nothing created", newCU.exists());				if (proposal.isClass()) {					assertTrue("2 class proposals", doClass);					doClass= false;					buf= new StringBuffer();					buf.append("package test1;\n");					buf.append("\n");					buf.append("public class Fixe {\n");					buf.append("\n");					buf.append("}\n");					assertEqualStringIgnoreDelim(newCU.getSource(), buf.toString());					JavaProjectHelper.performDummySearch();					newCU.delete(true, null);				} else {					assertTrue("2 interface proposals", doInterface);					doInterface= false;															buf= new StringBuffer();					buf.append("package test1;\n");					buf.append("\n");					buf.append("public interface Fixe {\n");					buf.append("\n");					buf.append("}\n");					assertEqualStringIgnoreDelim(newCU.getSource(), buf.toString());					JavaProjectHelper.performDummySearch();					newCU.delete(true, null);				}			} else {				assertTrue("2 replace proposals", doChange);				doChange= false;				CUCorrectionProposal proposal= (CUCorrectionProposal) curr;				String preview= proposal.getCompilationUnitChange().getPreviewContent();					buf= new StringBuffer();				buf.append("package test1;\n");				buf.append("import java.io.File;\n");				buf.append("public class F {\n");				buf.append("    void foo() {\n");				buf.append("        char ch= File.pathSeparatorChar;\n");				buf.append("    }\n");				buf.append("}\n");				assertEqualString(preview, buf.toString());			}		}				}