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

Bug 39360

Summary: Constructor generation
Product: [Eclipse Project] JDT Reporter: Jesper Nordenberg <jesper>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Jesper Nordenberg CLA 2003-06-26 05:41:40 EDT
It would be nice if Eclipse could generate a constructor for a class. For
example, if I have the following class:

class Test {
  private int x;
  private String text;
  private int size;
}

and I select generate constructor, I will get a dialog where I choose which
fields I want to initialize in the constructor and which super class constructor
I want to call. If I choose the fields 'x' and 'text', I will get this constructor:

class Test {
  private int x;
  private String text;
  private int size;

  public Test(int x, String text) {
    this.x = x;
    this.text = text;
  }
}

IntelliJ IDEA has this very useful feature.
Comment 1 Dirk Baeumer CLA 2003-06-26 06:34:14 EDT

*** This bug has been marked as a duplicate of 10733 ***