SourceFolder (@NotNull Module module, @NotNull VirtualFile vDir, boolean testSource) { Ref<SourceFolder> result = Ref.create(); ModuleRootModificationUtil.updateModel(module, model -> result.set(model.addContentEntry(vDir).addSourceFolder(vDir, testSource))); return result.get(); }