public static @Nullable Icon getIconIfExcluded(@NotNull Project project, @NotNull VirtualFile vFile) {
    if (!Registry.is("ide.hide.excluded.files")) {
      boolean ignored = ProjectRootManager.getInstance(project).getFileIndex().isExcluded(vFile);
      if (ignored) {
        return AllIcons.Modules.ExcludeRoot;
      }
    }
    return null;
  }
public static @Nullable Icon getIconIfExcluded(@NotNull Project project, @NotNull VirtualFile vFile)