forked from qt-creator/qt-creator
LanguageClient: cancel find link at requests on rerequest
This avoids triggering the callback if we already requested a find link at for a different position. Additionally we also cancel the request if the document changes or the cursor moves inbetween requesting the link and receiving the response. Change-Id: Iffc7b08012a649397e7ca7dfc99d314a1bbf19f7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -149,6 +149,13 @@ public:
|
||||
void addAssistProcessor(TextEditor::IAssistProcessor *processor);
|
||||
void removeAssistProcessor(TextEditor::IAssistProcessor *processor);
|
||||
SymbolSupport &symbolSupport();
|
||||
// In contrast to the findLinkAt of symbol support this find link makes sure that there is only
|
||||
// one request running at a time and cancels the running request if the document changes, cursor
|
||||
// moves or another link is requested
|
||||
void findLinkAt(TextEditor::TextDocument *document,
|
||||
const QTextCursor &cursor,
|
||||
Utils::LinkHandler callback,
|
||||
const bool resolveTarget);
|
||||
DocumentSymbolCache *documentSymbolCache();
|
||||
HoverHandler *hoverHandler();
|
||||
QList<LanguageServerProtocol::Diagnostic> diagnosticsAt(const Utils::FilePath &filePath,
|
||||
|
||||
Reference in New Issue
Block a user