Bug 129115 [clean up] Qualify static fields qualifies enum constants
When applying the Cleanup Wizard with the option "Use declaring class as qualifier for static member accesses" and the sub-option "Unqualified accesses" on a class that contains an enum declaration, the produced result contains syntax errors. Try it with a simple test class: public class TestClass { enum MyEnum { STATE_1, STATE_2, STATE_3 }; } After applying the wizard with the mentioned options, the code looks as follows: public class TestClass { enum MyEnum { MyEnum.STATE_1, MyEnum.STATE_2, MyEnum.STATE_3 }; }
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
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);
		}
		return result;
	}
	
	private void setOptions(ICleanUp fix) {
		setOptions(new ICleanUp[] {fix});
	}
	
	private void setOptions(ICleanUp[] fixes) {
		Hashtable options= JavaCore.getOptions();
		for (Iterator iter= options.keySet().iterator(); iter.hasNext();) {
			String key= (String)iter.next();
			String value= (String)options.get(key);
			if ("error".equals(value) || "warning".equals(value)) {  
				options.put(key, "ignore"); 
			}
		}
		
		for (int i= 0; i < fixes.length; i++) {