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

Bug 494266

Summary: [quick fix] Create class from constructor call with actual constructor
Product: [Eclipse Project] JDT Reporter: Lukas Eder <lukas.eder>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: noopur_gupta
Version: 4.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Lukas Eder CLA 2016-05-23 04:30:27 EDT
I have the following code:

----------------------------------------
public class Test {
    void method() {
        new Something("abc");
    }
}
----------------------------------------

Currently, there is no class "Something". The quick fix suggests creating the class "Something", but it would be nice if there is already a constructor stub in it, which matches the signature of my code. Or at least to have that option in the "create class" dialog.

Current workaround: After class creation, go back to "Test" and quick fix again using "Create constructor Something(String)"
Comment 1 Noopur Gupta CLA 2016-06-10 05:11:04 EDT

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