Community
Participate
Working Groups
I have this class public class X { final int i; final int j; ... } This class doesn't compile. I have to tediously write the constructor and repeat all field types and names and then assignments. Scala has case classes, which work the same way, but don't have the boilerplate. It would be great if I could just auto-generate the constructor using Eclipse: public class X { final int i; final int j; ... public X(int i, int j, ...) { this.i = i; this.j = j; ... } }
I realise that these are similar issues: - https://bugs.eclipse.org/bugs/show_bug.cgi?id=80197 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=77147 But I don't think they're the same...
In fact, I just realised that this feature already exists, but not as a quick-fix option. "Create constructor from fields...". Would be great to offer that feature as a quick-fix option!
*** This bug has been marked as a duplicate of bug 345896 ***