@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)); }
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(); } }); }
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(); } }); }
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)); }
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)); }
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)); }
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)); }
public static Query<PyFunction> search(PyFunction function, boolean checkDeep) { if (function.getContainingClass() == null) return EmptyQuery.getEmptyQuery(); return INSTANCE.createUniqueResultsQuery(new SearchParameters(function, checkDeep)); }