Condition<PsiFileSystemItem> () { return item -> { if (item instanceof PsiDirectory) return true; final VirtualFile virtualFile = PsiUtilCore.getVirtualFile(item); return virtualFile != null && acceptedExtension.equals(virtualFile.getExtension()); }; }