Bug 73586

Summary: insideDocComment not set correctly for TypeDeclarationMatch
Product: [Eclipse Project] JDT Reporter: Daniel Berg <danberg>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3 CC: srich
Version: 3.0   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Daniel Berg CLA 2004-09-09 12:38:50 EDT
We are using the SearchEngine#searchDelcarationsOfReferenceTypes(...) api and we
have our own requestor that will ignore matches inside of comments.

public void acceptSearchMatch(SearchMatch match) throws CoreException {
 if(match.getAccuracy() == SearchMatch.A_ACCURATE && !match.isInsideDocComment())
    result.add(match.getElement());
}

The problem we are seeing is that the TypeDeclarationMatch is never getting its
insideDocComment field set when it was clearly found within a comment.

For example we have the following.

/**
 * @link some.simple.Test
 */
public interface A {
}

The search is calling our requestor's acceptSearchMatch for the
"some.simple.Test" type as a TypeDeclarationMatch.  In this example, however,
the isInsideDocComment() on the match returns false.

This used to work on an older version of the 3.0 code base.
Comment 1 Frederic Fusier CLA 2004-09-14 05:28:12 EDT
Your Javadoc tag is invalid!
you should write either:
/**
 * {@link some.simple.Test}
 */
or
/**
 * @see some.simple.Test
 */
and then you'll get your insideDocComment correctly set...