| Summary: | Quick Fix for "Bind constructor parameter to fields" | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Lars Vogel <Lars.Vogel> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta |
| Version: | 4.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 318681 *** |
Would be great to have a quick fix for assigning all constructor argument to new or existing fields, similar to IntelliJ. public class User { public User(String firstName, String lastName) { } } Press quick fix in IntelliJ and select "Bind constructor parameter to fields" and you end up with: public class User { private final String firstName; private final String lastName; public User(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } }