| Summary: | Source code feature: Add Copy Constructor | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | markus arbeiter <markus.arbeiter> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | Achristianson, daniel_megert, kitmaxter, nicolas, r.bhaskar, register.eclipse |
| Version: | 3.1.2 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
Moving to JDT/UI Good idea. Setting to later and 'helpwanted'; we currenty don't have time for this. As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. I have been looking for this many many times. Because this bug is very old I'm using the utility class PropertyUtils from Apache. In this case: org.apache.commons.beanutils.PropertyUtils.copyProperties(this, source); I'd love to see this reopened. Still a missing feature. (In reply to andreas christianson from comment #6) > I'd love to see this reopened. Still a missing feature. The bug is marked as 'helpwanted' As soon as someone steps forward and offers to provide the feature we can reopen the bug. |
An additional feature in the Java Source Code Editor beside "Generate Constructor using Fields" could be "Generate Constructor using same class". That feature would generate an attribute assignment row for all attributes in the same class. The following example snippet (see begin/end tags) would be added to the my current class 'SampleInfo' : public class SampleInfo { private int id; private int providerline_id; // more ... ///begin /** * Copy Constructor */ public SampleInfo (SampleInfo other) { id = other.id; providerline_id = other.providerline_id; // more ... } ///end }