public void refresh() {
    createUI();
    if (list != null) {
      DefaultListModel<VirtualFile> model = (DefaultListModel<VirtualFile>)list.getModel();
      model.clear();
      VirtualFile root = thumbnailView.getRoot();
      if (root != null && root.isValid() && root.isDirectory()) {
        Set<VirtualFile> files = findFiles(root.getChildren());
        VirtualFile[] virtualFiles = VfsUtilCore.toVirtualFileArray(files);
        Arrays.sort(virtualFiles, VIRTUAL_FILE_COMPARATOR);

        model.ensureCapacity(model.size() + virtualFiles.length + 1);
        ThemeFilter filter = thumbnailView.getFilter();
        TagFilter[] tagFilters = thumbnailView.getTagFilters();
        for (VirtualFile virtualFile : virtualFiles) {
          if (filter == null || filter.accepts(virtualFile)) {
            if (tagFilters == null || ContainerUtil.exists(tagFilters, tagFilter -> tagFilter.accepts(virtualFile))) {
              model.addElement(virtualFile);
            }
          }
        }
        if (!model.isEmpty()) {
          list.setSelectedIndex(0);
        }
      }
      else {
        thumbnailView.setVisible(false);
      }
    }
  }
public void refresh()