private boolean addLocalDeclarations(ASTNode node, int flags, IBindingRequestor requestor) { return addLocalDeclarations(node, node.getStartPosition(), flags, requestor); }
private boolean addLocalDeclarations(ASTNode node, int flags, IBindingRequestor requestor) { return addLocalDeclarations(node, node.getStartPosition(), flags, requestor); }
private boolean addLocalDeclarations(ASTNode node, int flags, IBindingRequestor requestor) { return addLocalDeclarations(node, node.getStartPosition(), flags, requestor); }
private boolean addOuterDeclarationsForLocalType(ITypeBinding localBinding, int flags, IBindingRequestor requestor) { ASTNode node= fRoot.findDeclaringNode(localBinding); if (node == null) { return false; } if (node instanceof AbstractTypeDeclaration || node instanceof AnonymousClassDeclaration) { if (addLocalDeclarations(node.getParent(), flags, requestor)) return true; ITypeBinding parentTypeBinding= Bindings.getBindingOfParentType(node.getParent()); if (parentTypeBinding != null) { if (addTypeDeclarations(parentTypeBinding, flags, requestor)) return true; } } return false; }
private boolean addOuterDeclarationsForLocalType(ITypeBinding localBinding, int flags, IBindingRequestor requestor) { ASTNode node= fRoot.findDeclaringNode(localBinding); if (node == null) { return false; } if (node instanceof AbstractTypeDeclaration || node instanceof AnonymousClassDeclaration) { if (addLocalDeclarations(node.getParent(), flags, requestor)) return true; ITypeBinding parentTypeBinding= Bindings.getBindingOfParentType(node.getParent()); if (parentTypeBinding != null) { if (addTypeDeclarations(parentTypeBinding, flags, requestor)) return true; } } return false; }
private boolean addOuterDeclarationsForLocalType(ITypeBinding localBinding, int flags, IBindingRequestor requestor) { ASTNode node= fRoot.findDeclaringNode(localBinding); if (node == null) { return false; } if (node instanceof AbstractTypeDeclaration || node instanceof AnonymousClassDeclaration) { if (addLocalDeclarations(node.getParent(), flags, requestor)) return true; ITypeBinding parentTypeBinding= Bindings.getBindingOfParentType(node.getParent()); if (parentTypeBinding != null) { if (addTypeDeclarations(parentTypeBinding, flags, requestor)) return true; } } return false; }
public IBinding[] getDeclarationsInScope(int offset, int flags) { org.eclipse.jdt.core.dom.NodeFinder finder= new org.eclipse.jdt.core.dom.NodeFinder(fRoot, offset, 0); ASTNode node= finder.getCoveringNode(); if (node == null) { return NO_BINDING; } if (node instanceof SimpleName) { return getDeclarationsInScope((SimpleName) node, flags); } try { ITypeBinding binding= Bindings.getBindingOfParentType(node); DefaultBindingRequestor requestor= new DefaultBindingRequestor(binding, flags); addLocalDeclarations(node, offset, flags, requestor); if (binding != null) { addTypeDeclarations(binding, flags, requestor); } List<IBinding> result= requestor.getResult(); return result.toArray(new IBinding[result.size()]); } finally { clearLists(); } }
public IBinding[] getDeclarationsInScope(int offset, int flags) { org.eclipse.jdt.core.dom.NodeFinder finder= new org.eclipse.jdt.core.dom.NodeFinder(fRoot, offset, 0); ASTNode node= finder.getCoveringNode(); if (node == null) { return NO_BINDING; } if (node instanceof SimpleName) { return getDeclarationsInScope((SimpleName) node, flags); } try { ITypeBinding binding= Bindings.getBindingOfParentType(node); DefaultBindingRequestor requestor= new DefaultBindingRequestor(binding, flags); addLocalDeclarations(node, offset, flags, requestor); if (binding != null) { addTypeDeclarations(binding, flags, requestor); } List<IBinding> result= requestor.getResult(); return result.toArray(new IBinding[result.size()]); } finally { clearLists(); } }
public IBinding[] getDeclarationsInScope(int offset, int flags) { NodeFinder finder= new NodeFinder(offset, 0); fRoot.accept(finder); ASTNode node= finder.getCoveringNode(); if (node == null) { return NO_BINDING; } if (node instanceof SimpleName) { return getDeclarationsInScope((SimpleName) node, flags); } try { ITypeBinding binding= Bindings.getBindingOfParentType(node); DefaultBindingRequestor requestor= new DefaultBindingRequestor(binding, flags); addLocalDeclarations(node, offset, flags, requestor); if (binding != null) { addTypeDeclarations(binding, flags, requestor); } List result= requestor.getResult(); return (IBinding[]) result.toArray(new IBinding[result.size()]); } finally { clearLists(); } }
public IBinding[] getDeclarationsInScope(SimpleName selector, int flags) { try { // special case for switch on enum if (selector.getLocationInParent() == SwitchCase.EXPRESSION_PROPERTY) { ITypeBinding binding= ((SwitchStatement) selector.getParent().getParent()).getExpression().resolveTypeBinding(); if (binding != null && binding.isEnum()) { return getEnumContants(binding); } } ITypeBinding parentTypeBinding= Bindings.getBindingOfParentType(selector); if (parentTypeBinding != null) { ITypeBinding binding= getQualifier(selector); DefaultBindingRequestor requestor= new DefaultBindingRequestor(parentTypeBinding, flags); if (binding == null) { addLocalDeclarations(selector, flags, requestor); addTypeDeclarations(parentTypeBinding, flags, requestor); } else { addInherited(binding, flags, requestor); } List<IBinding> result= requestor.getResult(); return result.toArray(new IBinding[result.size()]); } return NO_BINDING; } finally { clearLists(); } }
public IBinding[] getDeclarationsInScope(SimpleName selector, int flags) { try { // special case for switch on enum if (selector.getLocationInParent() == SwitchCase.EXPRESSION_PROPERTY) { ITypeBinding binding= ((SwitchStatement) selector.getParent().getParent()).getExpression().resolveTypeBinding(); if (binding != null && binding.isEnum()) { return getEnumContants(binding); } } ITypeBinding parentTypeBinding= Bindings.getBindingOfParentType(selector); if (parentTypeBinding != null) { ITypeBinding binding= getQualifier(selector); DefaultBindingRequestor requestor= new DefaultBindingRequestor(parentTypeBinding, flags); if (binding == null) { addLocalDeclarations(selector, flags, requestor); addTypeDeclarations(parentTypeBinding, flags, requestor); } else { addInherited(binding, flags, requestor); } List<IBinding> result= requestor.getResult(); return result.toArray(new IBinding[result.size()]); } return NO_BINDING; } finally { clearLists(); } }
public IBinding[] getDeclarationsInScope(SimpleName selector, int flags) { try { // special case for switch on enum if (selector.getLocationInParent() == SwitchCase.EXPRESSION_PROPERTY) { ITypeBinding binding= ((SwitchStatement) selector.getParent().getParent()).getExpression().resolveTypeBinding(); if (binding != null && binding.isEnum()) { return getEnumContants(binding); } } ITypeBinding parentTypeBinding= Bindings.getBindingOfParentType(selector); if (parentTypeBinding != null) { ITypeBinding binding= getQualifier(selector); DefaultBindingRequestor requestor= new DefaultBindingRequestor(parentTypeBinding, flags); if (binding == null) { addLocalDeclarations(selector, flags, requestor); addTypeDeclarations(parentTypeBinding, flags, requestor); } else { addInherited(binding, flags, requestor); } List result= requestor.getResult(); return (IBinding[]) result.toArray(new IBinding[result.size()]); } return NO_BINDING; } finally { clearLists(); } }
SearchRequestor requestor= new SearchRequestor(declaration, parentTypeBinding, flags); if (binding == null) { addLocalDeclarations(selector, flags, requestor); if (requestor.found()) return requestor.isVisible();
SearchRequestor requestor= new SearchRequestor(declaration, parentTypeBinding, flags); if (binding == null) { addLocalDeclarations(selector, flags, requestor); if (requestor.found()) return requestor.isVisible();
SearchRequestor requestor= new SearchRequestor(declaration, parentTypeBinding, flags); if (binding == null) { addLocalDeclarations(selector, flags, requestor); if (requestor.found()) return requestor.isVisible();