MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / running

Method running

src/plugins/debugger/runner/runner.cpp:147–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void Runner::running()
148{
149 if(d->isRunning) {
150 outputMsg(0, "The program is running, please try again later!", OutputPane::OutputFormat::ErrorMessage);
151 return;
152 }
153
154 LanguageService *service = dpfGetService(LanguageService);
155 if (service) {
156 auto generator = service->create<LanguageGenerator>(getActiveProjectInfo().kitName());
157 if (generator) {
158 dpfservice::ProjectInfo activeProjInfo = dpfGetService(ProjectService)->getActiveProjectInfo();
159 RunCommandInfo args = generator->getRunArguments(activeProjInfo, d->currentOpenedFilePath);
160 if (!args.runInTerminal) {
161 uiController.switchContext(tr("&Application Output"));
162
163 QtConcurrent::run([=]() {
164 execCommand(args);
165 });
166 } else {
167 uiController.switchContext(TERMINAL_TAB_TEXT);
168
169 auto terminalService = dpfGetService(TerminalService);
170 terminalService->executeCommand(args.program, args.program, args.arguments, args.workingDir, args.envs);
171 }
172 }
173 }
174}
175
176bool Runner::execCommand(const RunCommandInfo &info)
177{

Callers

nothing calls this directly

Calls 4

kitNameMethod · 0.45
getActiveProjectInfoMethod · 0.45
getRunArgumentsMethod · 0.45
executeCommandMethod · 0.45

Tested by

no test coverage detected