Collection<VirtualFile> (@NotNull final PatchBaseDirectoryDetector directoryDetector, @NotNull final String fileName) { Collection<VirtualFile> files = ReadAction.compute(() -> directoryDetector.findFiles(fileName)); final File shelfResourcesDirectory = ShelveChangesManager.getInstance(myProject).getShelfResourcesDirectory(); return ContainerUtil.filter(files, file -> !FileUtil.isAncestor(shelfResourcesDirectory, VfsUtilCore.virtualToIoFile(file), false)); }