MCPcopy Create free account
hub / github.com/cpeditor/cpeditor / reAttachLanguageServer

Method reAttachLanguageServer

src/appwindow.cpp:1573–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1571}
1572
1573void AppWindow::reAttachLanguageServer(MainWindow *window)
1574{
1575 window->getEditor()->clearSquiggle();
1576 lspTimerCpp->stop();
1577 lspTimerJava->stop();
1578 lspTimerPython->stop();
1579
1580 if (cppServer->isDocumentOpen())
1581 cppServer->closeDocument();
1582 if (javaServer->isDocumentOpen())
1583 javaServer->closeDocument();
1584 if (pythonServer->isDocumentOpen())
1585 pythonServer->closeDocument();
1586
1587 if (window->getLanguage() == "C++")
1588 {
1589 cppServer->openDocument(window->filePathOrTmpPath(), window->getEditor(), window->getLogger());
1590 cppServer->requestLinting();
1591 lspTimerCpp->start();
1592 }
1593 else if (window->getLanguage() == "Java")
1594 {
1595 javaServer->openDocument(window->filePathOrTmpPath(), window->getEditor(), window->getLogger());
1596 javaServer->requestLinting();
1597 lspTimerJava->start();
1598 }
1599 else if (window->getLanguage() == "Python")
1600 {
1601 pythonServer->openDocument(window->filePathOrTmpPath(), window->getEditor(), window->getLogger());
1602 pythonServer->requestLinting();
1603 lspTimerPython->start();
1604 }
1605}
1606
1607MainWindow *AppWindow::windowAt(int index)
1608{

Callers

nothing calls this directly

Calls 11

clearSquiggleMethod · 0.80
getEditorMethod · 0.80
stopMethod · 0.80
isDocumentOpenMethod · 0.80
closeDocumentMethod · 0.80
getLanguageMethod · 0.80
openDocumentMethod · 0.80
filePathOrTmpPathMethod · 0.80
getLoggerMethod · 0.80
requestLintingMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected