int (@NotNull final VirtualFile file) { if (file instanceof VirtualFileWithId) { return ((VirtualFileWithId)file).getId(); } throw new IllegalArgumentException("Virtual file doesn't support id: " + file + ", implementation class: " + file.getClass().getName()); }