Bug 104495 [source manipulation] Constructor Using Fields should check all fields by default
3.1 for value type classes like class A{ private final int length; private final int width; private final String name; } it would be useful to have a quick fix to create a constructor to init all those fields. Ie. public A(int length, String name, int width) { this.length = length; this.name = name; this.width = width; } there's a separate source action for that but it's a little heavyweight for this. At least, a quick fix to *open* the 'Create Constructor using fields' could be offered (pre-select the field checkboxes then, please)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/GenerateConstructorUsingFieldsContentProvider.java
import org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil;
import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
public class GenerateConstructorUsingFieldsContentProvider implements ITreeContentProvider {
	private static final Object[] EMPTY= new Object[0];
	private List fFields= new ArrayList();
	private List fSelected= new ArrayList();
	private ITypeBinding fType= null;
	private final CompilationUnit fUnit;
	public GenerateConstructorUsingFieldsContentProvider(IType type, List fields, List selected) throws JavaModelException {
		RefactoringASTParser parser= new RefactoringASTParser(AST.JLS3);
		fUnit= parser.parse(type.getCompilationUnit(), true);
		AbstractTypeDeclaration declaration= (AbstractTypeDeclaration) ASTNodes.getParent(NodeFinder.perform(fUnit, type.getNameRange()), AbstractTypeDeclaration.class);
		if (declaration != null) {
			fType= declaration.resolveBinding();
			if (fType != null) {
				IField field= null;
				for (Iterator iterator= fields.iterator(); iterator.hasNext();) {
					field= (IField) iterator.next();
					VariableDeclarationFragment fragment= ASTNodeSearchUtil.getFieldDeclarationFragmentNode(field, fUnit);
					if (fragment != null) {
						IVariableBinding binding= fragment.resolveBinding();
						if (binding != null)
							fFields.add(binding);
					}
				}
				for (Iterator iterator= selected.iterator(); iterator.hasNext();) {
					field= (IField) iterator.next();
					VariableDeclarationFragment fragment= ASTNodeSearchUtil.getFieldDeclarationFragmentNode(field, fUnit);
					if (fragment != null) {
						IVariableBinding binding= fragment.resolveBinding();