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

Bug 326377

Summary: [content assist] Content assist for abstract class instantiation adds semicolon at wrong place
Product: [Eclipse Project] JDT Reporter: Benno Baumgartner <benno.baumgartner>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: All   
OS: All   
Whiteboard:

Description Benno Baumgartner CLA 2010-09-28 03:30:53 EDT
I20100915-2024

Given:
public class E02 {

	public static abstract class Bar {
		public abstract void doBar();
	}

	public void foo() {
		addBar(new Bar|)
	}

	public void addBar(Bar bar) {

	}

}
1. Cursor where the '|' is
2. Control space
3. Select E02.Bar proposal
IS:
		addBar(new Bar() {
			
			@Override
			public void doBar() {
			}
		};)
Should:
		addBar(new Bar() {
			
			@Override
			public void doBar() {
			}
		});

I think this might be a regression: I've never had that before.
Comment 1 Dani Megert CLA 2010-09-28 10:43:25 EDT
>I think this might be a regression: I've never had that before.
Yep, that's right.

Fixed in HEAD (AnonymousTypeCompletionProposal and added test to CodeCompletionTest).
Available in builds >= N20100928-2000.