read action

This commit is contained in:
Peter Gromov
2009-09-16 21:34:24 +04:00
parent e05ea7c933
commit 29f569e32a
@@ -136,7 +136,11 @@ public class AllClassesGetter {
final Set<String> qnames = new THashSet<String>();
final GlobalSearchScope scope = filterByScope ? context.getContainingFile().getResolveScope() : GlobalSearchScope.allScope(context.getProject());
final GlobalSearchScope scope = ApplicationManager.getApplication().runReadAction(new Computable<GlobalSearchScope>() {
public GlobalSearchScope compute() {
return filterByScope ? context.getContainingFile().getResolveScope() : GlobalSearchScope.allScope(context.getProject());
}
});
final PrefixMatcher prefixMatcher = set.getPrefixMatcher();
final boolean lookingForAnnotations = PsiJavaPatterns.psiElement().afterLeaf("@").accepts(context);