VirtualFile (@NotNull PsiJavaModule module) { if (module instanceof LightJavaModule) { return ((LightJavaModule)module).getRootVirtualFile(); } else { VirtualFile file = PsiUtilCore.getVirtualFile(module); if (file == null) { throw new IllegalArgumentException("Module '" + module + "' lost its VF; file=" + module.getContainingFile() + "; valid=" + module.isValid()); } return file; } }