private static @NotNull PsiFile getOriginalFile(@NotNull PsiClass aClass) {
    PsiFile file = aClass.getContainingFile();
    if (file == null) {
      PsiUtilCore.ensureValid(aClass);
      throw new IllegalStateException("No containing file for " + aClass.getLanguage() + " " + aClass.getClass());
    }
    return file.getOriginalFile();
  }
private static @NotNull PsiFile getOriginalFile(@NotNull PsiClass aClass)