Bug 125455 [clean up] Compile error, opening bracket after //NON-NLS
Version: 3.2.0 Build id: I20060125-0800 Take JUnit source and apply all clean ups on it (5.0 level). You get compile errors. Reasons are looking like the following: if (displayString.startsWith("AllTests")) //$NON-NLS-1$ { setIcon(this.fSuiteIcon); } else { setIcon(this.fLeafIcon); } Can't tell why yet. 'Add NON NLS tag' should allways be executed after 'Add block to single statement'. May be a problem with the clean up, may also be a problem with the ast rewrite.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
buf.append("                } else {\n");
		buf.append("                    System.out.println(3);\n");
		buf.append("                }\n");
		buf.append("            } while (q);\n");
		buf.append("        } while (b);\n");
		buf.append("        do {\n");
		buf.append("            do {\n");
		buf.append("                \n");
		buf.append("            } while (q);\n");
		buf.append("        } while (b);\n");
		buf.append("    }\n");
		buf.append("}\n");
		String expected1= buf.toString();
		
		assertRefactoringResultAsExpected(refactoring, new String[] {expected1});
	}
	
	public void testCodeStyle22() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("import test2.I1;\n");
		buf.append("public class E1 {\n");
		buf.append("    public void foo() {\n");
		buf.append("        I1 i1= new I1() {\n");
		buf.append("            private static final int N= 10;\n");
		buf.append("            public void foo() {\n");
		buf.append("                System.out.println(N);\n");
		buf.append("            }\n");
		buf.append("        };\n");