Community
Participate
Working Groups
3.1 you always get false for SearchMatch.isInDocComment in the requstor in SearchEngine.searchDeclarationsOfReferencedTypes because the declaration of the refefrenced type is of course not in javadoc. However, how do I search for types referenced in the given element but *not* in the javadoc of the given element. There seems to be no way.
It's not possible to use this flag in this peculiar case. This is a limitation of this API which comes from the fact that only the first found reference is used to report the declaration. So, in following example: /** * @see Ref */ public class Test { public Ref ref; } class Ref {} SearchEngine returns a match but cannot set the isInDocComment flag as there's another reference which is not in a javadoc comment... But there's a way to do what you're expecting... Disable the javadoc comment support of the compiler before performing the search using the IJavaProject.setOption(String, String). The corresponding option is: JavaCore.COMPILER_DOC_COMMENT_SUPPORT and the value to disable it is: JavaCore.DISABLED. Then SearchEngine will not look into the Javadoc comments and no type declaration will be reported if there's only references in Javadoc comment. Close as WONTFIX
Verified for 3.4M1 using build I20070802-0800.