forked from qt-creator/qt-creator
ClangCodeModel: Use clangd for all "follow symbol" actions
Change-Id: I4e33342d9683c24ad6ea5fbb578a1b460790aa4d Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -23,9 +23,12 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "clangeditordocumentprocessor.h"
|
||||
#include "clangfollowsymbol.h"
|
||||
|
||||
#include "clangdclient.h"
|
||||
#include "clangeditordocumentprocessor.h"
|
||||
#include "clangmodelmanagersupport.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <cpptools/cppfollowsymbolundercursor.h>
|
||||
@@ -173,6 +176,16 @@ void ClangFollowSymbol::findLink(const CppTools::CursorInEditor &data,
|
||||
CppTools::SymbolFinder *symbolFinder,
|
||||
bool inNextSplit)
|
||||
{
|
||||
ClangdClient * const client
|
||||
= ClangModelManagerSupport::instance()->clientForFile(data.filePath());
|
||||
if (client && client->isFullyIndexed()) {
|
||||
QTC_ASSERT(client->documentOpen(data.textDocument()),
|
||||
client->openDocument(data.textDocument()));
|
||||
client->symbolSupport().findLinkAt(data.textDocument(), data.cursor(),
|
||||
std::move(processLinkCallback), resolveTarget);
|
||||
return;
|
||||
}
|
||||
|
||||
int line = 0;
|
||||
int column = 0;
|
||||
QTextCursor cursor = Utils::Text::wordStartCursor(data.cursor());
|
||||
|
Reference in New Issue
Block a user