Bug 90434 - [code manipulation] Source/Generate Constructor Using Fields: Does not work in all cases
Summary: [code manipulation] Source/Generate Constructor Using Fields: Does not work i...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Tobias Widmer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 08:12 EDT by Steffen Conradt CLA
Modified: 2005-05-09 04:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Conradt CLA 2005-04-06 08:12:13 EDT
In some cases the Command shows the error message: "There are no constructors 
from the superclass which may be used."

Reproduce:
1. Create a new class with a Standard Constructor.
2. Create some attributes.
3. Try to create a new constructor using the "Generate Constructor Using Fields" 
command.
--> Error message
Comment 1 Dirk Baeumer CLA 2005-04-06 17:10:47 EDT
Steffen, which build are you using. 

Tobias, please verify if reproducable otherwise close as works for me.
Comment 2 Steffen Conradt CLA 2005-04-07 05:46:18 EDT
Hi,

I used Version: 3.1.0 (M6)
Build id: I20050401-1645

and the following code:

public class Test
{
    String testString;

    public Test()
    {
        super();
        // TODO implementation of constructor for Test
    }
}
Comment 3 domak CLA 2005-05-06 10:48:25 EDT
On build 3.1M6 I20050401-1645, it doesnt work like in the previous versions : it
only keep the last part of the variable name as you can see in the sample bellow
 (I didn't find the way to change this in the template code).

	private Date dateCalul_;
	private String fluxInfileName_;
	private String fluxOutFileName_;

	
	/**
	 * @param calul
	 * @param name
	 * @param name
	 */
	public FluxFilterBatch(Date calul, String name, String name) {
		super();
		// TODO Auto-generated constructor stub
		dateCalul_ = calul;
		fluxInfileName_ = name;
		fluxOutFileName_ = name;
	}
Comment 4 Tobias Widmer CLA 2005-05-09 04:10:12 EDT
This has been fixed in newer i builds