void () { createUI(); if (list != null) { DefaultListModel model = (DefaultListModel) 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 || Arrays.stream(tagFilters).anyMatch( tagFilter -> tagFilter.accepts(virtualFile))) { model.addElement(virtualFile); } } } if (model.size() > 0) { list.setSelectedIndex(0); } } else { thumbnailView.setVisible(false); } } }