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/ASTNodesInsertTest.java
buf.append("    }\n");
		buf.append("}\n");
		ICompilationUnit compilationUnit= pack1.createCompilationUnit("E.java", buf.toString(), false, null);		
		
		CompilationUnit astRoot= createAST(compilationUnit);
		TypeDeclaration typeDecl= (TypeDeclaration) astRoot.types().get(0);
		List bodyDecls= typeDecl.bodyDeclarations();
		
		AST ast = astRoot.getAST();
		BodyDeclaration declaration= createNewField(ast, Modifier.PRIVATE);
		int insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);
		assertEquals(2, insertionIndex); 
		
		declaration= createNewField(ast, Modifier.STATIC);
		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);
		assertEquals(2, insertionIndex); 
	
		declaration= createNewField(ast, Modifier.STATIC | Modifier.FINAL);
		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);
		assertEquals(2, insertionIndex); 
		
		declaration= createNewMethod(ast, Modifier.PRIVATE, false);
		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);
		assertEquals(3, insertionIndex); 
		
		declaration= createNewMethod(ast, Modifier.STATIC, false);
		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);
		assertEquals(2, insertionIndex); 
		
		declaration= createNewMethod(ast, 0, true);