VirtualFile (@NotNull Module module, String srcPath) { VirtualFile dummyRoot = VirtualFileManager.getInstance().findFileByUrl("temp:///"); assert dummyRoot != null; dummyRoot.refresh(false, false); VirtualFile srcRoot = doCreateSourceRoot(dummyRoot, srcPath); registerSourceRoot(module.getProject(), srcRoot); return srcRoot; }