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

Function main

src/tools/languageadapter/main.cpp:189–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189int main(int argc, char *argv[])
190{
191 QCoreApplication a(argc, argv);
192
193 JsonRpcCallProxy::ins().bindCreateProc(newlsp::Cxx, createCxxServ);
194 JsonRpcCallProxy::ins().bindCreateProc(newlsp::Java, createJavaServ);
195 JsonRpcCallProxy::ins().bindCreateProc(newlsp::Python, createPythonServ);
196 JsonRpcCallProxy::ins().bindCreateProc(newlsp::JS, createJSServ);
197 JsonRpcCallProxy::ins().bindFilter("selectLspServer", selectLspServer);
198
199 newlsp::ServerApplication lspServ(a);
200 QObject::connect(&lspServ, &newlsp::ServerApplication::jsonrpcMethod,
201 &JsonRpcCallProxy::ins(), &JsonRpcCallProxy::methodFilter,
202 Qt::QueuedConnection);
203
204 QObject::connect(&lspServ, &newlsp::ServerApplication::jsonrpcNotification,
205 &JsonRpcCallProxy::ins(), &JsonRpcCallProxy::notificationFilter,
206 Qt::QueuedConnection);
207 lspServ.start();
208 lspServOut << "created ServerApplication";
209
210 return a.exec();
211}

Callers

nothing calls this directly

Calls 5

connectFunction · 0.85
bindCreateProcMethod · 0.80
bindFilterMethod · 0.80
startMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected