private static PsiClass findNestedPsiClass(String name, PsiElement context, Project project) {
    final int dotIndex = name.indexOf('.');
    if (dotIndex > 0) {
      final String outerName = name.substring(0, dotIndex);
      final PsiClass outerClass = findPsiClass(outerName, parseImports((XmlFile)context.getContainingFile()), context, project);
      if (outerClass != null) {
        final List<String> nameChain = StringUtil.split(name, ".", true, false);
        final List<String> nestedNames = nameChain.subList(1, nameChain.size());
        PsiClass aClass = outerClass;
        for (String nestedName : nestedNames) {
          aClass = aClass.findInnerClassByName(nestedName, true);
          if (aClass == null) return null;
        }
        return aClass;
      }
    }
    return null;
  }
private static PsiClass findNestedPsiClass(String name, PsiElement context, Project project)