Community
Participate
Working Groups
Given a deprecated class warning such as that on org.eclipse.swt.custom.TableTree introduced in 3.1M5a, an invocation such as viewer.getTableTree().getTable() is shown as invoking the deprecated getTable() method rather than the deprecated class.
When the bit set is AccDeprecatedImplicitly, we might want to check if the declaring class is set as AccDeprecated.
When a type is deprecated, all its members are implicitly considered as such. We do not distinguish whether it is directly or indirectly deprecated. What are you exactly suggesting ?
I believe that Edward meant that it is enough to report the deprecation against the type.
I meant that it would be more helpful to report the type deprecated when the type is deprecated and the method deprecated only when the method is explicitly deprecated. I was faced with a method deprecated message, but a method that was not, so I started searching round for inherited deprecation/a bug on indirected deprecation ... before finding the type deprecation.
Problem is that there may not be an explicit reference to a truly deprecated type, and we'd have to have different error messages for the different cases. /** @deprecated */ class X { class Y { void foo() {} } } class Z { static X.Y create() { ... } } class Bar { void bar() { Z.create().foo(); // deprecated though no direct ref to X } }
We will stick to current behavior, this is the first complaint we got ever.
Your decision obviously; I just find it odd that the Java generic messages have got so much more helpful as we go 3.1M3/4/5, yet here is a case where you could again be helpful. Even just including the word "implicit" in the error message for the implicit deprecation would be better than nothing. With regard to different error messages for different cases: surely that is good? A system with a single "syntax error" for all cases has never been user friendly. As a user I want to know why the method is deprecated, not just that it is. If there are multiple reasons then there are multiple messages.