Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369053 - [content assist] Completion for an anonymous inner class should not result in syntax error (missing methods)
Summary: [content assist] Completion for an anonymous inner class should not result in...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.8   Edit
Hardware: PC Linux
: P3 normal with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 05:25 EST by Lars Vogel CLA
Modified: 2012-02-06 17:37 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2012-01-19 05:25:37 EST
If I use code completion to create an anonymous inner class based on an abstract class or an interface the required methods do not get implemented. 

This results in an syntax error and I need to use Ctrl + 1 to create the required methods.

I think it would be better to generate the required methods directly. This is also how IntelliJ does it and there users seem to appreciate this.
Comment 1 Dani Megert CLA 2012-02-06 09:43:19 EST
3.8 M5.

Have:

package p;

abstract class Abstract {
	public abstract void doIt();
}

public class Testle {

	void a() {
		new Abstrac<content assist here>
	}
}

==>


package p;

abstract class Abstract {
	public abstract void doIt();
}

public class Testle {

	void a() {
		new Abstract() {
			
			@Override
			public void doIt() {
				// TODO Auto-generated method stub
				
			}
		};
	}
}
Comment 2 Lars Vogel CLA 2012-02-06 17:37:35 EST
Works for me too. Sorry for this bug.