Bug 317497 - [content assist] Overriding content assist suggestion immediately after closing brace generates invalid code
Summary: [content assist] Overriding content assist suggestion immediately after closi...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 14:08 EDT by Remy Suen CLA
Modified: 2010-11-15 08:23 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-06-21 14:08:51 EDT
I20100603-1500

public class Test {
  public void v() {
  }//<-invoke CC here
}

Select the second option, the clone() method, and you will get...

public class Test {
  public void v() {
  }protected Object clone() throws CloneNotSupportedException {};//<-invoke CC here
}

...if you put a space first, you will get...

public class Test {
  public void v() {
  } @Override
	protected Object clone() throws CloneNotSupportedException {
		// TODO Auto-generated method stub
		return super.clone();
	}//<-invoke CC here
}
Comment 1 Dani Megert CLA 2010-11-15 08:22:57 EST
This is a bug in JDT Text. Fixed in OverrideCompletionProposal rev. 1.40.
Available in builds >= N20101115-2000.