Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333367

Summary: Generate delegate methods with a prefix based on the field name
Product: [Eclipse Project] JDT Reporter: David Byrne <davidribyrne>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: amj87.iitr, davidribyrne, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description David Byrne CLA 2010-12-31 13:51:41 EST
Build Identifier: M20100909-0800

Support generating delegate methods with a prefix based on the field name. For example:

public class blah
{
  private List<String> countries;
  private List<String> cities;
}

The proposed feature would allow the user to create delegate methods such as these:

public void addCity(String city)
public void addCountry(String country)
public void clearCities()
public void clearCountires()


I realize that the name parsing & generation would be difficult, but this would be a great feature, even if some manual corrections were required.

Thanks,
David Byrne

Reproducible: Always
Comment 1 Ayushman Jain CLA 2011-01-06 01:54:08 EST
Moving to JDT/UI for comment.
Comment 2 Markus Keller CLA 2011-01-06 05:57:51 EST
This looks like a use case that would better be implemented using EMF or other modeling tools. We have no plans to add an action that only generates delegate method stubs without any useful implementation.