VirtualFile (@Nullable File file) { if (file == null) return null; final LocalFileSystem lfs = LocalFileSystem.getInstance(); VirtualFile result = lfs.findFileByIoFile(file); if (result == null) { result = lfs.refreshAndFindFileByIoFile(file); } return result; }