Bug 244961

Summary: [assist] Overriding a method in an enum causes content assist to lose parameter names (regression from Eclipse 3.3)
Product: [Eclipse Project] JDT Reporter: Mauro Molinari <mauromol>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, srikanth_sankaran
Version: 3.4   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mauro Molinari CLA 2008-08-22 10:32:26 EDT
1. create a Java Project
2. create the following enumeration:

public enum A
{
	A1
	{

	},
	A2;

	public void a(int a)
	{
	}
}

3. on line 5 (inside the body for A1) press Ctrl+Space to invoke code assist in order to override method a(int)

EXPECTED BEHAVIOUR:
A1
{
	@Override
	public void a(int a)
	{
	  // TODO Stub di metodo generato automaticamente
	  super.a(a);
	}
},

OBSERVED BEHAVIOUR:
A1
{
	@Override
	public void a(int arg0)
	{
	  // TODO Stub di metodo generato automaticamente
	  super.a(arg0);
	}
},

In other words, the parameter name ("a") is lost.
This didn't occur in Eclipse 3.3.
Comment 1 David Audel CLA 2009-04-15 10:11:10 EDT
I reproduce the bug in 3.4 but i do not reproduce the bug in I20090407-1430 (3.5)

This bug is fixed in a previous 3.5 build. I close this bug as WORKSFORME.
Comment 2 Srikanth Sankaran CLA 2009-04-28 05:52:14 EDT
Verified for 3.5M7 using I20090426-2000