CustomResourceBundleState (final VirtualFileManager virtualFileManager) { final List<String> existentFiles = ContainerUtil.filter(myFileUrls, url -> virtualFileManager.findFileByUrl(url) != null); if (existentFiles.isEmpty()) { return null; } final CustomResourceBundleState customResourceBundleState = new CustomResourceBundleState(); customResourceBundleState.myFileUrls.addAll(existentFiles); customResourceBundleState.myBaseName = myBaseName; return customResourceBundleState; }