proposal= (CUCorrectionProposal) proposals.get(2); preview= proposal.getCompilationUnitChange().getPreviewContent();  buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E {\n"); buf.append("    float vec= 1.0;\n"); buf.append("}\n"); assertEqualString(preview, buf.toString());
	public void testPrimitiveTypeInFieldDecl() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    floot vec= 1.0;\n");		buf.append("}\n");		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);				CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);		IProblem[] problems= astRoot.getProblems();		assertNumberOf("problems", problems.length, 1);				ProblemPosition problemPos= new ProblemPosition(problems[0], cu);		assertTrue("Problem type not marked with lightbulb", JavaCorrectionProcessor.hasCorrections(problemPos.getId()));		ArrayList proposals= new ArrayList();				JavaCorrectionProcessor.collectCorrections(problemPos,  proposals);		assertNumberOf("proposals", proposals.size(), 5);		assertCorrectLabels(proposals);				CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);		String preview= proposal.getCompilationUnitChange().getPreviewContent();				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    double vec= 1.0;\n");		buf.append("}\n");		assertEqualString(preview, buf.toString());				proposal= (CUCorrectionProposal) proposals.get(1);		preview= proposal.getCompilationUnitChange().getPreviewContent();				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    Float vec= 1.0;\n");		buf.append("}\n");		assertEqualString(preview, buf.toString());				proposal= (CUCorrectionProposal) proposals.get(2);		preview= proposal.getCompilationUnitChange().getPreviewContent();				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    float vec= 1.0;\n");		buf.append("}\n");		assertEqualString(preview, buf.toString());				NewCUCompletionUsingWizardProposal newCUWizard= (NewCUCompletionUsingWizardProposal) proposals.get(3);		newCUWizard.setShowDialog(false);		newCUWizard.apply(null);				ICompilationUnit newCU= pack1.getCompilationUnit("floot.java");		assertTrue("Nothing created", newCU.exists());				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("\n");		buf.append("public class floot {\n");		buf.append("\n");		buf.append("}\n");		assertEqualStringIgnoreDelim(newCU.getSource(), buf.toString());		newCU.delete(true, null);		newCUWizard= (NewCUCompletionUsingWizardProposal) proposals.get(4);		newCUWizard.setShowDialog(false);		newCUWizard.apply(null);				newCU= pack1.getCompilationUnit("floot.java");		assertTrue("Nothing created", newCU.exists());				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("\n");				buf.append("public interface floot {\n");		buf.append("\n");		buf.append("}\n");		assertEqualStringIgnoreDelim(newCU.getSource(), buf.toString());		}