VirtualFile (@Nullable ContentRevision revision) { if (revision == null) return null; FilePath filePath = revision.getFile(); if (filePath.isNonLocal() || filePath.isDirectory()) return null; return filePath.getVirtualFile(); }