Community
Participate
Working Groups
It would be nice to extend the quick fix for assigning a parameter to a new field, to optionally assign all parameters to new fields.
I understand what you mean, but that's one of these cases where I think we end up with too many alternative proposals. Also consider to use the 'Create constructor from fields' wizard.
Sure. However, this is the kind of thing that people coming from IntelliJ find surprising and give fuel to their argument that eclipse isn't as good - something I hear on a daily basis at work.
You have to convince me that this is a case that deserves an own quick fix proposal. What about the combination of parameters, ect (or is the idea to present a dialog?)
I think my original request above is ambiguous. The scenario that I always come across is that I want to assign all the arguments of a new constructor to new fields. To do this at present, I go to each argument in turn using a quick fix to create the field and assign it. So the quick fix would be to repeatedly apply the current quick fix to each field in turn. Would that result in too many proposals?
I guess just one 'Assign all parameters to fields' is ok.
I could have sworn I already saw/filed a similar bug, but I can't find it. My use case is this: - Write code like this, where class Container does not yet exist. void m() { new Container("Hello", 2, null); } - use quick fix to create class Container - use quick fix to create constructor Container(String, int, Object) - for each parameter, use quick fix to assign to new field 'Assign all parameters to fields' would simplify the last step.
*** This bug has been marked as a duplicate of bug 318681 ***