Community
Participate
Working Groups
HEAD. org.eclipse.jdt.core.tests.compiler.regression.Deprecated15Test.test002() org.eclipse.jdt.core.tests.compiler.regression.DeprecatedTest.test015() org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test1347() are some tests that show that when the compiler wants to report that type X is deprecated in a type reference of the form: X.Inner.InnerMost We actually identify the full type reference. i.e instead of saying X.Inner.InnerMost ^ we end up saying X.Inner.InnerMost ^^^^^^^^^^^^^^^^^ See the patch attached to bug#292364 comment#4 for a proposed fix. (the portions relevant to bug#292364 itself should be ignored) Also see comment#6 for a test patch that shows the outstanding issues with that patch. Since this issue of type highlighting is orthogonal to the original issue bug#292364 intended to address, it is being spwaned off as a separe issue. Ayush, please start with the patch in bug#292364 comment#4 and address concerns raised by bug#292364 comment#6.
Ayush, please investigate - Thanks!
Created attachment 150810 [details] proposed fix v0.5 + regression tests a few changes have been carried over from the patch in https://bugs.eclipse.org/bugs/show_bug.cgi?id=292364#c4. These changes fix the problem in the case of deprecated type error reporting. To fix the javadoc side of the same problem, the method ProblemReporter#javadocDeprecatedType is fixed. Regarding the problems reported in comment 6 of bug 292364: >- Sometimes instead of reporting IProblem.JavadocUsingDeprecatedType, > we incorrectly report IProblem.UsingDeprecatedType Fixed. > -IProblem.JavadocUsingDeprecatedType reporting continues to fail to > demarcate partial types in messages. ProblemReporter#javadocDeprecatedType fixed. Added regression test JavadocBugsTest.testBug292510(). >-We also need to inspect the code to see if there are other places > we should be using nodeSourceEnd(null, location), instead of > location.sourceEnd Fixed : a)ProblemReporter#staticMemberOfParameterizedType - GenericTypeTest.test0290(), GenericTypeTest.test0755() remastered to reflect changes. b)ProblemReporter#incorrectArityForParameterizedType - GenericTypeTest.test1457() remastered to reflect changes. c)ProblemReporter#parameterizedMemberTypeMissingArguments - GenericTypeTest.test0289() remastered to reflect the change.
I don't understand why a modifier is used as an index in: ProblemReporter#public void javadocDeprecatedType(TypeBinding type, ASTNode location, int modifiers) { I believe we should pass a new int argument that would be the index and keep the modifiers as before. Could you please clarify that point, Ayushman ? Thanks.
Created attachment 150858 [details] proposed fix with correction + regression tests oops! my bad. I passed the index in the modifiers argument. Corrected the fix and created a new method with an added argument.
I'll release the latest patch as soon as all tests are run.
Released for 3.6M4. Regression tests have been updated. Thanks, Ayushman.
Verified for 3.6M4 using Build id: I20091207-1800