TextEdit edit= CodeFormatterUtil.format2(CodeFormatterUtil.K_COMPILATION_UNIT, contents, 0, "\n", null);
TextEdit edit= CodeFormatterUtil.format2(CodeFormatter.K_COMPILATION_UNIT, contents, 0, "\n", null);
	public void testCUNewAPI2() throws Exception {		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class A {\n");		buf.append("/**\n");		buf.append(" * comment\n");		buf.append(" */\n");		buf.append("    public void foo() {\n");		buf.append("    Runnable run= new Runnable() {};\n");		buf.append("    }\n");		buf.append("}\n");		String contents= buf.toString();					TextEdit edit= CodeFormatterUtil.format2(CodeFormatterUtil.K_COMPILATION_UNIT, contents, 0, "\n", null);		Document doc= new Document(contents);		edit.apply(doc);		String formatted= doc.get();						buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class A {\n");		buf.append("    /**\n");		buf.append("     * comment\n");		buf.append("     */\n");		buf.append("    public void foo() {\n");		buf.append("        Runnable run = new Runnable() {\n");		buf.append("        };\n");			buf.append("    }\n");		buf.append("}\n");		String expected= buf.toString();		assertEqualString(formatted, expected);	}		