private static PsiFile getTopLevelFileInBaseLanguage(@NotNull PsiElement element, @NotNull Project project) {
    PsiFile file = InjectedLanguageManager.getInstance(project).getTopLevelFile(element);
    FileViewProvider viewProvider = file.getViewProvider();
    return viewProvider.getPsi(viewProvider.getBaseLanguage());
  }
private static PsiFile getTopLevelFileInBaseLanguage(@NotNull PsiElement element, @NotNull Project project)