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/dialogs/NewProjectTestSetup.java
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.resources.IFolder;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.CoreUtility;
import org.eclipse.jdt.testplugin.JavaProjectHelper;
import org.eclipse.jdt.testplugin.TestOptions;
public class NewProjectTestSetup extends TestSetup {
    public static final String WORKSPACE_PROJECT= "WorkspaceProject";
    public static final String WORKSPACE_PROJECT_SRC= "WorkspaceProjectWithSourceAndInFolder";
    
    public static IJavaProject getProject(String projectName, String binFolderName) throws CoreException {
        return JavaProjectHelper.createJavaProject(projectName, binFolderName);
    }
    
    public static IClasspathEntry[] getDefaultClasspath() {
        return PreferenceConstants.getDefaultJRELibrary();
    }
    
    private IJavaProject fWorkspaceProject;
    private IJavaProject fWorkspaceProjectWithSrc;
    private IJavaProject fExternalProject;
    private boolean fAutobuilding;
    
    public NewProjectTestSetup(Test test) {