Module (@NotNull String moduleName, @NotNull Project project, @NotNull ModuleType<?> moduleType, @NotNull Path path) { Path moduleFile = path.resolve(moduleName + ModuleFileType.DOT_DEFAULT_EXTENSION); return WriteAction.computeAndWait(() -> ModuleManager.getInstance(project).newModule(moduleFile, moduleType.getId())); }