boolean (FileChooserDescriptor descriptor, VirtualFile[] files) { for (VirtualFile file : files) { if (!descriptor.isFileSelectable(file) || !descriptor.isFileVisible(file, true)) { return false; } } return true; }