@Ignore("T73932936") @Test public void findClass() throws IOException { final Project project = testHelper.getFixture().getProject(); final PsiFile file = testHelper.configure("LayoutSpec.java"); ApplicationManager.getApplication() .invokeAndWait( () -> { final ComponentFinder finder = new ComponentFinder(project); final PsiClass cls = PsiTreeUtil.findChildOfType(file, PsiClass.class); ComponentGenerateService.getInstance().updateLayoutComponentAsync(cls); final PsiClass result1 = finder.findClass("Layout", GlobalSearchScope.projectScope(project)); assertThat(result1).isNull(); final PsiClass result2 = finder.findClass("Layout", ComponentScope.getInstance()); assertThat(result2).isNotNull(); }); }
@Nullable @Override public PsiClass findClass(String qualifiedName, GlobalSearchScope scope) { return findClassInternal(qualifiedName, scope, project); }
ComponentFinder extends PsiElementFinder { @Nullable @Override public PsiClass findClass(String qualifiedName, GlobalSearchScope scope) { return findClassInternal(qualifiedName, scope, project); } }
ComponentFinder extends PsiElementFinder { @Nullable @Override public PsiClass findClass(String qualifiedName, GlobalSearchScope scope) { return findClassInternal(qualifiedName, scope, project); } ComponentFinder(Project project); }
ComponentFinder extends PsiElementFinder { @Nullable @Override public PsiClass findClass(String qualifiedName, GlobalSearchScope scope) { return findClassInternal(qualifiedName, scope, project); } ComponentFinder(Project project); @Override PsiClass[] findClasses(String qualifiedName, GlobalSearchScope scope); @Nullable @Override PsiClass findClass(String qualifiedName, GlobalSearchScope scope); @Override PsiClass[] getClasses(PsiPackage psiPackage, GlobalSearchScope scope); }
ComponentFinder extends PsiElementFinder { @Nullable @Override public PsiClass findClass(String qualifiedName, GlobalSearchScope scope) { return findClassInternal(qualifiedName, scope, project); } ComponentFinder(Project project); @Override PsiClass[] findClasses(String qualifiedName, GlobalSearchScope scope); @Nullable @Override PsiClass findClass(String qualifiedName, GlobalSearchScope scope); @Override PsiClass[] getClasses(PsiPackage psiPackage, GlobalSearchScope scope);  }