private static Icon createOrFindBetterIcon(VirtualFile file, boolean useIconLoader) throws IOException {
    if (useIconLoader) {
      return IconLoader.findIcon(new File(file.getPath()).toURI().toURL());
    }
    if (StringUtil.equalsIgnoreCase(file.getExtension(), "svg")) {
      var svg = SVGLoader.load(file.getInputStream(), 1.0f);
      return new ImageIcon(svg);
    }
    return new ImageIcon(file.contentsToByteArray());
  }
private static Icon createOrFindBetterIcon(VirtualFile file, boolean useIconLoader)