Java 类com.intellij.util.EmptyQuery 实例源码

项目:consulo-dotnet    文件:TypeInheritorsSearch.java   
@NotNull
public static Query<DotNetTypeDeclaration> search(@NotNull final DotNetTypeDeclaration typeDeclaration,
        @NotNull SearchScope scope,
        final boolean checkDeep,
        final boolean checkInheritance,
        Function<DotNetTypeDeclaration, DotNetTypeDeclaration> transformer)
{
    String vmQName = ApplicationManager.getApplication().runReadAction(new Computable<String>()
    {
        @Override
        public String compute()
        {
            if(typeDeclaration.hasModifier(DotNetModifier.SEALED))
            {
                return null;
            }
            return typeDeclaration.getVmQName();
        }
    });
    if(vmQName == null)
    {
        return EmptyQuery.getEmptyQuery();
    }
    return search(new SearchParameters(typeDeclaration.getProject(), vmQName, scope, checkDeep, checkInheritance, transformer));
}
项目:consulo-java    文件:FunctionalExpressionSearch.java   
public static Query<PsiFunctionalExpression> search(@NotNull final PsiMethod psiMethod, @NotNull final SearchScope scope)
{
    return ApplicationManager.getApplication().runReadAction(new Computable<Query<PsiFunctionalExpression>>()
    {
        @Override
        public Query<PsiFunctionalExpression> compute()
        {
            if(!psiMethod.hasModifierProperty(PsiModifier.STATIC) && !psiMethod.hasModifierProperty(PsiModifier.DEFAULT))
            {
                final PsiClass containingClass = psiMethod.getContainingClass();
                if(containingClass != null)
                {
                    return INSTANCE.createUniqueResultsQuery(new SearchParameters(containingClass, scope));
                }
            }

            return EmptyQuery.getEmptyQuery();
        }
    });
}
项目:intellij-ce-playground    文件:FunctionalExpressionSearch.java   
public static Query<PsiFunctionalExpression> search(@NotNull final PsiMethod psiMethod, @NotNull final SearchScope scope) {
  return ApplicationManager.getApplication().runReadAction(new Computable<Query<PsiFunctionalExpression>>() {
    @Override
    public Query<PsiFunctionalExpression> compute() {
      if (!psiMethod.hasModifierProperty(PsiModifier.STATIC) && !psiMethod.hasModifierProperty(PsiModifier.DEFAULT)) {
        final PsiClass containingClass = psiMethod.getContainingClass();
        if (containingClass != null) {
          return INSTANCE.createUniqueResultsQuery(new SearchParameters(containingClass, scope));
        }
      }

      return EmptyQuery.getEmptyQuery();
    }
  });
}
项目:intellij-ce-playground    文件:OverridingMethodsSearch.java   
public static Query<PsiMethod> search(final PsiMethod method, SearchScope scope, final boolean checkDeep) {
  if (ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
    @Override
    public Boolean compute() {
      return cannotBeOverriden(method);
    }
  })) return EmptyQuery.getEmptyQuery(); // Optimization
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(method, scope, checkDeep));
}
项目:tools-idea    文件:OverridingMethodsSearch.java   
public static Query<PsiMethod> search(final PsiMethod method, SearchScope scope, final boolean checkDeep) {
  if (ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
    @Override
    public Boolean compute() {
      return cannotBeOverriden(method);
    }
  })) return EmptyQuery.getEmptyQuery(); // Optimization
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(method, scope, checkDeep));
}
项目:intellij-haxe    文件:HaxeMethodsSearch.java   
public static Query<PsiMethod> search(final PsiMethod method, SearchScope scope, final boolean checkDeep, HaxeHierarchyTimeoutHandler timeoutHandler) {
  if (ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
    @Override
    public Boolean compute() {
      return cannotBeOverriden(method);
    }
  })) return EmptyQuery.getEmptyQuery(); // Optimization
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(method, scope, checkDeep));
}
项目:consulo-java    文件:AllOverridingMethodsSearch.java   
public static Query<Pair<PsiMethod, PsiMethod>> search(final PsiClass aClass, SearchScope scope)
{
    if(aClass.hasModifierProperty(PsiModifier.FINAL))
    {
        return EmptyQuery.getEmptyQuery(); // Optimization
    }
    return INSTANCE.createUniqueResultsQuery(new SearchParameters(aClass, scope));
}
项目:consulo-java    文件:OverridingMethodsSearch.java   
public static Query<PsiMethod> search(final PsiMethod method, SearchScope scope, final boolean checkDeep) {
  if (ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
    @Override
    public Boolean compute() {
      return cannotBeOverriden(method);
    }
  })) return EmptyQuery.getEmptyQuery(); // Optimization
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(method, scope, checkDeep));
}
项目:intellij-ce-playground    文件:AllOverridingMethodsSearch.java   
public static Query<Pair<PsiMethod, PsiMethod>> search(final PsiClass aClass, SearchScope scope) {
  if (aClass.hasModifierProperty(PsiModifier.FINAL)) return EmptyQuery.getEmptyQuery(); // Optimization
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(aClass, scope));
}
项目:intellij-ce-playground    文件:PyOverridingMethodsSearch.java   
public static Query<PyFunction> search(PyFunction function, boolean checkDeep) {
  if (function.getContainingClass() == null) return EmptyQuery.getEmptyQuery();
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(function, checkDeep));
}
项目:tools-idea    文件:AllOverridingMethodsSearch.java   
public static Query<Pair<PsiMethod, PsiMethod>> search(final PsiClass aClass, SearchScope scope) {
  if (aClass.hasModifierProperty(PsiModifier.FINAL)) return EmptyQuery.getEmptyQuery(); // Optimization
  return INSTANCE.createUniqueResultsQuery(new SearchParameters(aClass, scope));
}