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
assertTrue(buf.toString(), false);
		}
	}
	
	public static void assertNumberOfProblems(CompilationUnit unit, int expected) {
		IProblem[] problems= unit.getProblems();
		if (problems.length != expected) {
			StringBuffer buf= new StringBuffer();
			buf.append("Wrong number of problems, is: ").append(problems.length). append(", expected: ").append(expected).append('\n');
			for (int i= 0; i < problems.length; i++) {
				buf.append(" - ").append(problems[i].getMessage()).append('\n');
			}
			assertTrue(buf.toString(), false);
		}
	}
	
	private CompilationUnit[] compile(ICompilationUnit[] units) {
		CompilationUnit[] result= new CompilationUnit[units.length];
		for (int i= 0; i < units.length; i++) {
			result[i]= compile(units[i]);
		}
		return result;
	}
	
	private CompilationUnit compile(ICompilationUnit compilationUnit) {
		CompilationUnit result= JavaPlugin.getDefault().getASTProvider().getAST(compilationUnit, ASTProvider.WAIT_YES, null);
		if (result == null) {
			
			result= ASTResolving.createQuickFixAST(compilationUnit, null);
		}