void ClangIpcServer::requestHighlighting(const RequestHighlightingMessage &message) { TIME_SCOPE_DURATION("ClangIpcServer::requestHighlighting"); try { auto translationUnit = translationUnits.translationUnit(message.fileContainer().filePath(), message.fileContainer().projectPartId()); client()->highlightingChanged(HighlightingChangedMessage(translationUnit.fileContainer(), translationUnit.highlightingInformations().toHighlightingMarksContainers(), translationUnit.skippedSourceRanges().toSourceRangeContainers())); } catch (const TranslationUnitDoesNotExistException &exception) { client()->translationUnitDoesNotExist(TranslationUnitDoesNotExistMessage(exception.fileContainer())); } catch (const ProjectPartDoNotExistException &exception) { client()->projectPartsDoNotExist(ProjectPartsDoNotExistMessage(exception.projectPartIds())); } catch (const std::exception &exception) { qWarning() << "Error in ClangIpcServer::requestHighlighting:" << exception.what(); } }
void ClangCodeModelServer::requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message) { TIME_SCOPE_DURATION("ClangCodeModelServer::requestDocumentAnnotations"); try { auto translationUnit = translationUnits.translationUnit(message.fileContainer().filePath(), message.fileContainer().projectPartId()); client()->documentAnnotationsChanged(DocumentAnnotationsChangedMessage(translationUnit.fileContainer(), translationUnit.mainFileDiagnostics(), translationUnit.highlightingMarks().toHighlightingMarksContainers(), translationUnit.skippedSourceRanges().toSourceRangeContainers())); } catch (const TranslationUnitDoesNotExistException &exception) { client()->translationUnitDoesNotExist(TranslationUnitDoesNotExistMessage(exception.fileContainer())); } catch (const ProjectPartDoNotExistException &exception) { client()->projectPartsDoNotExist(ProjectPartsDoNotExistMessage(exception.projectPartIds())); } catch (const std::exception &exception) { qWarning() << "Error in ClangCodeModelServer::requestDocumentAnnotations:" << exception.what(); } }