Java Code Examples for com.intellij.psi.impl.ResolveScopeManager#getElementUseScope()

The following examples show how to use com.intellij.psi.impl.ResolveScopeManager#getElementUseScope() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XQueryPsiImplUtil.java    From intellij-xquery with Apache License 2.0 5 votes vote down vote up
public static SearchScope getUseScope(XQueryVarName element) {
    XQueryFunctionDecl function = PsiTreeUtil.getParentOfType(element, XQueryFunctionDecl.class, true);
    if (function != null) {
        return new LocalSearchScope(function);
    }
    XQueryQueryBody queryBody = PsiTreeUtil.getParentOfType(element, XQueryQueryBody.class, true);
    if (queryBody != null) {
        return new LocalSearchScope(queryBody);
    }
    return ResolveScopeManager.getElementUseScope(element);
}
 
Example 2
Source File: LazyParseablePsiElement.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
 
Example 3
Source File: CompositePsiElement.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
 
Example 4
Source File: LeafPsiElement.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
 
Example 5
Source File: PsiElementBase.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
 
Example 6
Source File: OwnBufferLeafPsiElement.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}