Community
Participate
Working Groups
If the quick fix context is within a constructor, it would be nice to provide an option to make the generated field a final field. This is best explained with an example: ---------------------------------------------------- public class Test { public Test() { this.couldBeFinal = 3; // Quick-fixing this only offers generating a non-final field // Some users may prefer a final field here } public void notConstructor() { this.cannotBeFinal = 4; // In this case, of course, final fields are not possible } } ---------------------------------------------------- Note, that I have found a related issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176877 When a new field is assigned to the constructor argument value, then, only final fields can be generated. For instance: ---------------------------------------------------- public class Test { public Test(int willBeFinal) { // Quick-fixing "willBeFinal" will generate a final field and // a corresponding assignment } } ----------------------------------------------------
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
I would definitely still love this. In most of my classes, my fields are final, and it will be a long time until I can use records.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.