| 1571 | } |
| 1572 | |
| 1573 | void 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 | |
| 1607 | MainWindow *AppWindow::windowAt(int index) |
| 1608 | { |
nothing calls this directly
no test coverage detected