Community
Participate
Working Groups
Build Identifier: M20110909-1335 In some circumstances, missing types are not automatically imported and this makes code assist fail when trying to anonymously ovverride a class and override one of its methods. Reproducible: Always Steps to Reproduce: 1. Consider the following classes: package test3; public class OtherClass1 { } --- package test3; public class OtherClass2 { } 2. now consider the following: package test2; public class BaseClass<T> { public void baseMethod(T param) { } } 3. then write this: package test2; public class Test { private void myMethod() { final ThirdClass tc = new ThirdClass(); tc.thirdMethod(| } } 4. go to "|" and type: new BC| <= invoke code assist 5. choose BaseClass() 6. the following will be added: "new BaseClass<OtherClass1>()"; please note that OtherClass1 has not been imported and is underlined 7. go after "new BaseClass<OtherClass1>()", add an opening "{" and a closing "}", then put the cursor between them and hit "return", so that you have: tc.thirdMethod(new BaseClass<OtherClass1>(){ | } 8. when at "|" hit ctrl+space and choose to override baseMethod; you get: tc.thirdMethod(new BaseClass<OtherClass1>(){ public void baseMethod(OtherClass1 param) {}; } instead of: tc.thirdMethod(new BaseClass<OtherClass1>(){ @Override public void baseMethod(OtherClass1 param) { // TODO Stub di metodo generato automaticamente super.baseMethod(param); } }
Will investigate, time permitting.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.