public static boolean isInGeneratedCode(@NotNull VirtualFile file, @NotNull Project project) {
    return ProjectFileIndex.getInstance(project).isInGeneratedSources(file);
  }
public static boolean isInGeneratedCode(@NotNull VirtualFile file, @NotNull Project project)