VirtualFile (@Nullable String url) { if (url == null) { return null; } VirtualFile file = VirtualFileManager.getInstance().findFileByUrl(url); if (file == null) { // groovy stubs may be placed in completely random directories which aren't refreshed automatically return VirtualFileManager.getInstance().refreshAndFindFileByUrl(url); } return file; }