forked from qt-creator/qt-creator
Clang: Clean up some IPC names
This is long overdue since some names were simply wrong and/or misleading. Also, some of the old names were long enough to almost get crazy. The renaming starts from ClangCodeModelServerInterface and ClangCodeModelClientInterface and affects usages and related functions. For the ClangCodeModelServerInterface, categorize the messages in - messages that require a response (request*) - notification messages (the remaining ones) Change-Id: I5342ed8e0d87404ee72f3c3766fd8ef7505defb1 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -494,11 +494,11 @@ void ClangCompletionAssistProcessor::sendFileContent(const QByteArray &customFil
|
||||
const UnsavedFileContentInfo info = unsavedFileContent(customFileContent);
|
||||
|
||||
BackendCommunicator &communicator = m_interface->communicator();
|
||||
communicator.updateTranslationUnitsForEditor({{m_interface->fileName(),
|
||||
Utf8String(),
|
||||
Utf8String::fromByteArray(info.unsavedContent),
|
||||
info.isDocumentModified,
|
||||
uint(m_interface->textDocument()->revision())}});
|
||||
communicator.documentsChanged({{m_interface->fileName(),
|
||||
Utf8String(),
|
||||
Utf8String::fromByteArray(info.unsavedContent),
|
||||
info.isDocumentModified,
|
||||
uint(m_interface->textDocument()->revision())}});
|
||||
}
|
||||
namespace {
|
||||
bool shouldSendDocumentForCompletion(const QString &filePath,
|
||||
@@ -577,9 +577,13 @@ bool ClangCompletionAssistProcessor::sendCompletionRequest(int position,
|
||||
const Position cursorPosition = extractLineColumn(position);
|
||||
const Position functionNameStart = extractLineColumn(functionNameStartPosition);
|
||||
const QString projectPartId = CppTools::CppToolsBridge::projectPartIdForFile(filePath);
|
||||
communicator.completeCode(this, filePath, uint(cursorPosition.line),
|
||||
uint(cursorPosition.column), projectPartId,
|
||||
functionNameStart.line, functionNameStart.column);
|
||||
communicator.requestCompletions(this,
|
||||
filePath,
|
||||
uint(cursorPosition.line),
|
||||
uint(cursorPosition.column),
|
||||
projectPartId,
|
||||
functionNameStart.line,
|
||||
functionNameStart.column);
|
||||
setLastCompletionPosition(filePath, position);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user