public boolean visit(TypeDeclaration node) { if (fBinding.getKind() == IBinding.METHOD) { IFunctionBinding binding = (IFunctionBinding) fBinding; if (binding.isConstructor() && binding.getDeclaringClass() == node.resolveBinding()) { fResult.add(node.getName()); } } return true; }
public boolean visit(SimpleName node) { IBinding binding = node.resolveBinding(); if (binding == null || binding.getKind() != fBinding.getKind()) { return false; } binding = getDeclaration(binding); if (fBinding == binding) { fResult.add(node); } else if (binding.getKind() == IBinding.METHOD) { IFunctionBinding curr = (IFunctionBinding) binding; IFunctionBinding methodBinding = (IFunctionBinding) fBinding; if (methodBinding.overrides(curr) || curr.overrides(methodBinding)) { fResult.add(node); } } return false; }
public boolean visit(FunctionDeclaration node) { if (node.isConstructor() && fBinding.getKind() == IBinding.TYPE) { ASTNode typeNode = node.getParent(); if (typeNode instanceof AbstractTypeDeclaration) { if (fBinding == ((AbstractTypeDeclaration) typeNode).resolveBinding()) { fResult.add(node.getName()); } } } return true; }