return;
}
if (match.getElement() != null
&& match.getElement() instanceof IMember) {
IMember member = (IMember) match.getElement();
if (SKIP_BINARY && member.isBinary()) {
log("Skipping binary member " + member);
return;
}
// match.get
if (member.getCompilationUnit() == null) {
logError("No compilation unit for " + member);
if (!SKIP_NOT_SOURCE) {
fSearchResults.addCaller(null, null,
match.getResource(), member);
}
return;
}
CompilationUnit cuNode = retrieveCompilationUnit(member.getCompilationUnit());
ASTNode node = ASTNodeSearchUtil.getAstNode(match, cuNode);
Expression expr = null;
if (node != null) {
if (node instanceof MethodInvocation) {
expr = (MethodInvocation) node;
} else if (node.getParent() instanceof MethodInvocation) {
expr = (MethodInvocation) node.getParent();
} else if (node instanceof ClassInstanceCreation) {
expr = (ClassInstanceCreation) node;
} else if (node.getParent() instanceof ClassInstanceCreation) {
expr = (ClassInstanceCreation) node.getParent();
} else {
System.err.println("Unknown match type: " + node
+ " of type " + node.getClass());
try {
System.err
.println("MethodReferencesSearchRequestor: Skipping node that appears in the search: "
+ node
+ " of type "
+ node.getClass()
+ " at line "
+ member.getCorrespondingResource()
+ ":"
+ cuNode.getLineNumber(node
.getStartPosition()));
} catch (JavaModelException e) {
log(e.getMessage(), e);