Today while working on some code that uses the TemplateProposals class, I ran across this code when debugging:
/*
* @see ICompletionProposal#apply(IDocument)
*/
public final void apply(IDocument document) {
// not called anymore
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#apply(org.eclipse.jface.text.IDocument, char, int)
*/
public void apply(IDocument document, char trigger, int offset) {
// not called any longer
}
The methods above probably should be marked with the @deprecated annotation, or at least made to work by calling the appropriate new methods that they replaced. It would help adopters avoid using the class, or at least update the javadoc so that it doesn't get called at all. Not sure how long this has been in there, but it's the type of thing that can drive an adopter nuts trying to figure out why something isn't working as expected.

4 comments:
Sounds like a fine bug report.
Opened the following bug for this as suggested.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256532
but isnt it so, that implementation cannot deprecate a method or should not but it should rather be deprecated in the interface ?
If it isn't deprecated in both places, then Eclipse's doesn't mark it with the strikeout style as being deprecated. It really needs to be marked in both places.
Post a Comment