Community
Participate
Working Groups
Hi all. Four a course project I have developed a plugin that helps manage the concern of object cloning in Java, using Eclipse. The plugin consists of two parts: 1. An Eclipse builder that detects four different code smells w.r.t. cloning: 1. Returning null from clone() 2. Never calling super.clone(). 3. Implementing clone() but not Clooneable or vice versa. 4. In a Java 5 project, not using the covariant return type for clone(). 2. A code generator very similar in style to "generate hashCode()/equals()" that allows to generate correct clone methods with selective deep copy of fields that have as declared type a reference type that also implements Cloneable. You can download the plugin and a report plus slides about it at the attached URL. My question is whether you would consider integrating this functionality into the main Eclipse build stream. I deliberately tried to make the implementation as consistent as possible with the current implementation similar features in Eclipse. The flip-side for me is that because of that I use a lot of internal APIs. Hence, integration into Eclipse would be very desirable from my point of view. This bug is about integration of the checking part (bullet 1.) into JDT Core. Bug 182327 describes the integration of the code generation UI (bullet 2.) into JDT UI. Thanks in advance!
Hey again. I was just wondering if this is going to make it into the 3.4 release. Can you tell? Thanks!
Sorry this is not on the plan for 3.4. A good quality patch with corresponding JUnit tests is still welcome though.
Eric, is there still some interest in contributing a patch with the mentioned features?
Hi Benjamin. Generally yes. I just wonder how much the APIs changed in the meantime. Also I am a bit tied-up right now. What would be your time frame for this?