Using eclipse, I want to see a warning as soon as any of my methods used are marked as @Deprecated. A method call is correctly deleted if this is the case, but eclipse does not give a warning if the method comes from the same class. See screenshot below.

For better playback, I also provided the code in text form:
public class MainClass {
public static void main(String[] args) {
MainClass.foo();
MemberClass.foo();
OtherClass.foo();
}
@Deprecated
public static void foo() {
return;
}
private static class MemberClass {
@Deprecated
protected static void foo() {
return;
}
}
}
public class OtherClass {
@Deprecated
public static void foo() {
return;
}
}
If only OtherClass.foo()generates a warning. What for? How can i fix this?
Enable project specific settings disconnectedWindow→ Preferences→ Java→ Compiler→ Errors/Warnings→ Deprecated and restricted APIif it is fully set to Warning, as can be seen from the figure above.
Note: Does Eclipse not display an obsolete warning? not