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
IPackageFragment pack2= fSourceFolder.createPackageFragment("test2", false, null);
		buf= new StringBuffer();
		buf.append("package test2;\n");
		buf.append("public class E2 {}\n");
		pack2.createCompilationUnit("E2.java", buf.toString(), false, null);
		buf= new StringBuffer();
		buf.append("package test2;\n");
		buf.append("public class E3 {\n");
		buf.append("    public E2[] array;\n");
		buf.append("}\n");
		pack2.createCompilationUnit("E3.java", buf.toString(), false, null);
		
		CleanUpRefactoring refactoring= new CleanUpRefactoring();
		refactoring.addCompilationUnit(cu1);
		
		ICleanUp cleanUp= new Java50CleanUp(Java50CleanUp.CONVERT_FOR_LOOP_TO_ENHANCED_FOR_LOOP);
		refactoring.addCleanUp(cleanUp);
		
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("import test2.E3;\n");
		buf.append("public class E1 {\n");
		buf.append("    public void foo() {\n");
		buf.append("        E2 e2= new E2();\n");
		buf.append("        e2.foo();\n");
		buf.append("        E3 e3= new E3();\n");
		buf.append("        for (test2.E2 element : e3.array) {\n");
		buf.append("            System.out.println(1);\n");
		buf.append("        }\n");
		buf.append("    }\n");