Community
Participate
Working Groups
I20050426-1700 abstract class Top { abstract int getCount(); } class Impl extends Top { final int getCount() { return 1; } } class Sub extends Impl { get//Ctrl+Space inserts: // @Override // protected void finalize() throws Throwable { // // TODO Auto-generated method stub // super.finalize(); // } } I have auto-insertion of single proposals enabled. The 'getCount()' proposal says "override method in Top".
Tom, please investigate.
The problem is twofold: - the override proposal for the final method 'getCount' should not be proposed in the first place. - OverrideCompletionProposal.updateReplacementString detects that there are no valid override candidates, but simply chooses an arbitrary overridable candidate that does not match the proposal (finalize in this case). Moving to core for the first problem. Adding Tobias for the second.
Perhaps it should be interesting to open a separated bug for JDT/UI issue. This would clarify things to know when these 2 different issues were fixed...
done, see bug 93086
Fixed first problem and test added CompletionTests#testCompletionMethodDeclaration12()
Verified in I20050510-0010 + JDT/Core v_556