Community
Participate
Working Groups
3.1 In the following code example do a code assists and after 'foo' and after 'Thread.'. The elements on 'Foo' should all be shown as deprecated. public class Foo { /** * @deprecated */ void foo1() { } /** * @deprecated */ void foo2() { } { foo Thread. } }
The completion proposals do have the deprecation flag when the @Deprecated annotation is used, but not when only the javadoc tag is present. This is true for Java 1.4 source level as well.
Works for me in I20080314-1059 for /** @deprecated */ elements, but only when they are defined in *another* compilation unit / class file. Fails when doing content assist inside the declaring CU.
Created attachment 98134 [details] Potential fix This fix should solve the problem with a very small performance loss. For the completed compilation unit - The scanner detects if a javadoc contains '@deprecated' - The parser checks deprecation only if the javadoc contains '@deprecated'. The parse starts just before '@deprecated' and stop if a deprecated tag is found.
Deferred to 3.5.
Created attachment 108189 [details] Updated patch
Released for 3.5M1. Test added CompletionTests_1_5#test0375()
Verified for 3.5M1 using I20080805-1307