! * \brief configure 执行生成器的过程 * 按照生成器配置界面约定规则,实现执行过程, * 例如在cmake中,需要执行configure指令生成cache等相关文件 * 执行该函数,应当首先确保前置条件满足(配置文件已生成)。 * \param projectPath 工程路径 * \return 过程执行结果 */
| 127 | * \return 过程执行结果 |
| 128 | */ |
| 129 | bool dpfservice::ProjectGenerator::configure(const dpfservice::ProjectInfo &projectInfo) { |
| 130 | |
| 131 | // "filePath", "kitName", "language", "workspace" |
| 132 | recent.saveOpenedProject(projectInfo.kitName(), |
| 133 | projectInfo.language(), |
| 134 | projectInfo.workspaceFolder()); |
| 135 | uiController.doSwitch(MWNA_EDIT); |
| 136 | |
| 137 | uiController.switchWorkspace(MWCWT_PROJECTS); |
| 138 | |
| 139 | if (!projectInfo.workspaceFolder().isEmpty()) { |
| 140 | dpf::Event event; |
| 141 | event.setTopic(T_COLLABORATORS); |
| 142 | event.setData(D_OPEN_REPOS); |
| 143 | event.setProperty(P_WORKSPACEFOLDER, projectInfo.workspaceFolder()); |
| 144 | dpf::EventCallProxy::instance().pubEvent(event); |
| 145 | } |
| 146 | |
| 147 | Generator::started(); // emit starded |
| 148 | |
| 149 | return false; |
| 150 | } |
| 151 | |
| 152 | /*! |
| 153 | * \brief createRootItem 创建文件树路径,子类需要重载实现 |
nothing calls this directly
no test coverage detected