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
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("public class E {\n");
		buf.append("    private class EInner {\n");
		buf.append("        public int inner(int i) {\n");
		buf.append("        }\n");
		buf.append("    }\n");
		buf.append("    private int fField1;\n");
		buf.append("    private int fField2;\n");
		buf.append("    public void foo1() {\n");
		buf.append("        fField1 = fField2;\n");
		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 foo1(int i) {\n");
		buf.append("    }\n");
		buf.append("}");
		String expected= buf.toString();
		
		assertEqualString(string, expected);
		assertAllBindings(astRoot);	
	}
	
	public void testPartialCU3() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);