Java 类com.intellij.psi.impl.ResolveScopeManager 实例源码

项目:intellij-ce-playground    文件:PsiLiteralExpressionImpl.java   
@Override
public PsiType getType() {
  final IElementType type = getLiteralElementType();
  if (type == JavaTokenType.INTEGER_LITERAL) {
    return PsiType.INT;
  }
  if (type == JavaTokenType.LONG_LITERAL) {
    return PsiType.LONG;
  }
  if (type == JavaTokenType.FLOAT_LITERAL) {
    return PsiType.FLOAT;
  }
  if (type == JavaTokenType.DOUBLE_LITERAL) {
    return PsiType.DOUBLE;
  }
  if (type == JavaTokenType.CHARACTER_LITERAL) {
    return PsiType.CHAR;
  }
  if (type == JavaTokenType.STRING_LITERAL) {
    PsiManagerEx manager = getManager();
    GlobalSearchScope resolveScope = ResolveScopeManager.getElementResolveScope(this);
    return PsiType.getJavaLangString(manager, resolveScope);
  }
  if (type == JavaTokenType.TRUE_KEYWORD || type == JavaTokenType.FALSE_KEYWORD) {
    return PsiType.BOOLEAN;
  }
  if (type == JavaTokenType.NULL_KEYWORD) {
    return PsiType.NULL;
  }
  return null;
}
项目:intellij-ce-playground    文件:GrPrivateFieldScopeEnlarger.java   
@Override
public SearchScope getAdditionalUseScope(@NotNull PsiElement element) {
  if (element instanceof PsiField && ((PsiField)element).hasModifierProperty(PsiModifier.PRIVATE)) {
    final GlobalSearchScope maximalUseScope = ResolveScopeManager.getElementUseScope(element);
    return new GrSourceFilterScope(maximalUseScope);
  }

  return null;
}
项目:intellij-ce-playground    文件:GrFieldImpl.java   
@Override
@NotNull
public SearchScope getUseScope() {
  if (isProperty()) {
    return ResolveScopeManager.getElementUseScope(this); //maximal scope
  }
  return PsiImplUtil.getMemberUseScope(this);
}
项目:tools-idea    文件:PsiLiteralExpressionImpl.java   
@Override
public PsiType getType() {
  final IElementType type = getLiteralElementType();
  if (type == JavaTokenType.INTEGER_LITERAL) {
    return PsiType.INT;
  }
  if (type == JavaTokenType.LONG_LITERAL) {
    return PsiType.LONG;
  }
  if (type == JavaTokenType.FLOAT_LITERAL) {
    return PsiType.FLOAT;
  }
  if (type == JavaTokenType.DOUBLE_LITERAL) {
    return PsiType.DOUBLE;
  }
  if (type == JavaTokenType.CHARACTER_LITERAL) {
    return PsiType.CHAR;
  }
  if (type == JavaTokenType.STRING_LITERAL) {
    PsiManagerEx manager = getManager();
    GlobalSearchScope resolveScope = ResolveScopeManager.getElementResolveScope(this);
    return PsiType.getJavaLangString(manager, resolveScope);
  }
  if (type == JavaTokenType.TRUE_KEYWORD || type == JavaTokenType.FALSE_KEYWORD) {
    return PsiType.BOOLEAN;
  }
  if (type == JavaTokenType.NULL_KEYWORD) {
    return PsiType.NULL;
  }
  return null;
}
项目:tools-idea    文件:GrPrivateFieldScopeEnlarger.java   
@Override
public SearchScope getAdditionalUseScope(@NotNull PsiElement element) {
  if (element instanceof PsiField && ((PsiField)element).hasModifierProperty(PsiModifier.PRIVATE)) {
    final GlobalSearchScope maximalUseScope = ResolveScopeManager.getElementUseScope(element);
    return new GrSourceFilterScope(maximalUseScope);
  }

  return null;
}
项目:tools-idea    文件:GrFieldImpl.java   
@NotNull
public SearchScope getUseScope() {
  if (isProperty()) {
    return ResolveScopeManager.getElementUseScope(this); //maximal scope
  }
  return PsiImplUtil.getMemberUseScope(this);
}
项目:intellij-xquery    文件:XQueryPsiImplUtil.java   
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);
}
项目:consulo-java    文件:PsiLocalVariableImpl.java   
@Override
@NotNull
public SearchScope getUseScope() {
  final PsiElement parentElement = getParent();
  if (parentElement instanceof PsiDeclarationStatement) {
    return new LocalSearchScope(parentElement.getParent());
  }
  else {
    return ResolveScopeManager.getElementUseScope(this);
  }
}
项目:consulo-java    文件:PsiLiteralExpressionImpl.java   
@Override
public PsiType getType()
{
    final IElementType type = getLiteralElementType();
    if(type == JavaTokenType.INTEGER_LITERAL)
    {
        return PsiType.INT;
    }
    if(type == JavaTokenType.LONG_LITERAL)
    {
        return PsiType.LONG;
    }
    if(type == JavaTokenType.FLOAT_LITERAL)
    {
        return PsiType.FLOAT;
    }
    if(type == JavaTokenType.DOUBLE_LITERAL)
    {
        return PsiType.DOUBLE;
    }
    if(type == JavaTokenType.CHARACTER_LITERAL)
    {
        return PsiType.CHAR;
    }
    if(type == JavaTokenType.STRING_LITERAL)
    {
        PsiManagerEx manager = getManager();
        GlobalSearchScope resolveScope = ResolveScopeManager.getElementResolveScope(this);
        return PsiType.getJavaLangString(manager, resolveScope);
    }
    if(type == JavaTokenType.TRUE_KEYWORD || type == JavaTokenType.FALSE_KEYWORD)
    {
        return PsiType.BOOLEAN;
    }
    if(type == JavaTokenType.NULL_KEYWORD)
    {
        return PsiType.NULL;
    }
    return null;
}
项目:intellij-ce-playground    文件:OwnBufferLeafPsiElement.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:intellij-ce-playground    文件:OwnBufferLeafPsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:intellij-ce-playground    文件:LazyParseablePsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:intellij-ce-playground    文件:CompositePsiElement.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:intellij-ce-playground    文件:CompositePsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:intellij-ce-playground    文件:LeafPsiElement.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:intellij-ce-playground    文件:LeafPsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:intellij-ce-playground    文件:PsiElementBase.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:intellij-ce-playground    文件:PsiElementBase.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:intellij-ce-playground    文件:GrLightField.java   
@NotNull
@Override
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:tools-idea    文件:LazyParseablePsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:tools-idea    文件:CompositePsiElement.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:tools-idea    文件:CompositePsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:tools-idea    文件:LeafPsiElement.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:tools-idea    文件:LeafPsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:tools-idea    文件:PsiElementBase.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:tools-idea    文件:PsiElementBase.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:tools-idea    文件:OwnBufferLeafPsiElement.java   
@Override
@NotNull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:tools-idea    文件:OwnBufferLeafPsiElement.java   
@Override
@NotNull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:tools-idea    文件:GrLightField.java   
@NotNull
@Override
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:consulo    文件:LazyParseablePsiElement.java   
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:consulo    文件:CompositePsiElement.java   
@Override
@Nonnull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:consulo    文件:CompositePsiElement.java   
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:consulo    文件:LeafPsiElement.java   
@Override
@Nonnull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:consulo    文件:LeafPsiElement.java   
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:consulo    文件:PsiElementBase.java   
@Override
@Nonnull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:consulo    文件:PsiElementBase.java   
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}
项目:consulo    文件:OwnBufferLeafPsiElement.java   
@Override
@Nonnull
public GlobalSearchScope getResolveScope() {
  return ResolveScopeManager.getElementResolveScope(this);
}
项目:consulo    文件:OwnBufferLeafPsiElement.java   
@Override
@Nonnull
public SearchScope getUseScope() {
  return ResolveScopeManager.getElementUseScope(this);
}