PsiType (@NotNull String className, @NotNull Project project) { ApplicationManager.getApplication().assertReadAccessAllowed(); try { if (getArrayClass(className) != null) { return JavaPsiFacade.getElementFactory(project).createTypeFromText(className, null); } if (project.isDefault()) { return null; } PsiClass aClass = findClass(className, project, GlobalSearchScope.allScope(project)); if (aClass != null) { return PsiTypesUtil.getClassType(aClass); } } catch (IncorrectOperationException ignored) { } return null; }