static private
  @NotNull
  String getFQTypeName(@NotNull PsiJavaCodeReferenceElement ref) {
    while (ref.getParent() != null && ref.getParent() instanceof PsiJavaCodeReferenceElement) {
      ref = (PsiJavaCodeReferenceElement)ref.getParent();
    }
    String name = ref.getCanonicalText();
    PsiFile file = ref.getContainingFile();
    if (!(file instanceof PsiJavaFile javaFile)) {
      return name;
    }
    String suffix = "." + name;
    PsiImportList importList = javaFile.getImportList();
    if (importList != null) {
      for (PsiImportStatement importStatement : importList.getImportStatements()) {
        String qualifiedName = importStatement.getQualifiedName();
        if (qualifiedName != null && (qualifiedName.endsWith(suffix) || qualifiedName.equals(name))) {
          return qualifiedName;
        }
      }
    }
    return name;
  }
static private
  @NotNull
  String getFQTypeName(@NotNull PsiJavaCodeReferenceElement ref)