public @Nullable Icon substituteIcon(@NotNull Project project, @NotNull VirtualFile file) {
    if (file.isDirectory()) return null;
    // If a language was substituted in, we are going to assume it takes precedence over the platform default
    // or any FileIconProviders that might be registered. If no language was substituted in, use the platform
    // default.
    Language language = substituteLanguage(project, file);
    FileType fileType = LanguageUtil.getLanguageFileType(language);
    if (language != null && fileType == null) {
      String extension = file.getExtension();
      fileType = extension == null ? null : FileTypeRegistry.getInstance().getFileTypeByFileName(file.getNameSequence());
    }
    return fileType != null && fileType != UnknownFileType.INSTANCE ? fileType.getIcon() : null;
  }
public @Nullable Icon substituteIcon(@NotNull Project project, @NotNull VirtualFile file)