@Override public void acceptSearchMatch(SearchMatch match) { if (fRequireExactMatch && (match.getAccuracy() != SearchMatch.A_ACCURATE)) { return; } if (match.isInsideDocComment()) { return; } if (match.getElement() != null && match.getElement() instanceof IMember) { IMember member = (IMember) match.getElement(); switch (member.getElementType()) { case IJavaElement.METHOD: case IJavaElement.TYPE: case IJavaElement.FIELD: case IJavaElement.INITIALIZER: fSearchResults.addMember( member, member, match.getOffset(), match.getOffset() + match.getLength()); break; } } }
/* (non-Javadoc) * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch) */ public void acceptSearchMatch(SearchMatch match) throws CoreException { if (!match.isInsideDocComment()) fMatch = new Match( match.getElement(), Match.UNIT_CHARACTER, match.getOffset(), match.getLength()); }
/* (non-Javadoc) * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch) */ public void acceptSearchMatch(SearchMatch match) throws CoreException { if (match.getAccuracy() == SearchMatch.A_ACCURATE && !match.isInsideDocComment()) { fUsed = true; } }