Bug 76530 [options] Warn about unused local variables and private members
I think we should warn about unused local variables and unused private members by default. These things are errors akin to unused imports, which we already warn about.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/PartialASTTest.java
buf.append("        if (fField1 == 0) {\n");
		buf.append("            fField2++;\n");
		buf.append("        }\n");
		buf.append("        EInner inner = new EInner();\n");
		buf.append("    }\n");
		buf.append("    public int foo2(int i) {\n");
		buf.append("        private class Local {\n");
		buf.append("            private int fField3;\n");
		buf.append("            public int local(int i) {\n");
		buf.append("                return 1;\n");
		buf.append("            }\n");
		buf.append("        }\n");
		buf.append("        Local local = new Local();\n");	
		buf.append("        return i;\n");
		buf.append("    }\n");
		buf.append("}");
		String existing= buf.toString();
		ICompilationUnit cu= pack1.createCompilationUnit("E.java", existing, false, null);
		
		int offset= existing.indexOf("private int fField3;");
		
		CompilationUnit astRoot= getPartialCompilationUnit(cu, offset);
		String string= ASTNodes.asFormattedString(astRoot, 0, String.valueOf('\n'));
		
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("import java.util.Vector;\n");
		buf.append("import java.io.IOException;\n");
		buf.append("import java.text.ParseException;\n");
		buf.append("public class E {\n");