Community
Participate
Working Groups
Let consider following sample: public class X { public int x; public X(String str) {} public void foo(int x) {} } /** * @see X#x * @see X#X(String) * @see X#foo(int) */ public class Y { /** * @see X#x * @see X#X(String) * @see X#foo(int) */ public int y; /** * @see X#x * @see X#X(String) * @see X#foo(int) */ public void bar() {} } Now search references in project for field x, constructor X(String) or method foo(int)... In each search, I get 2 matches: one in javadoc comment of field y and one in javadoc comment of method bar(), but never in javadoc comment of class Y.
Was found using build I20031126. Due to MatchLocator while reportMatching on TypeDeclaration. We need now to scan from declarationSourceStart to sourceStart to include the possible javadoc comment...
Fixed. While report matching on type declaration, scan is now also done from the declaration source start to source start to include possible javadoc comment and report eventual match in it... Test cases added in jdt.core.tests.model.JavaSearchJavadocTests
Verified for 3.0M6