Clang: add globalFollowSymbol to RefactoringEngine

Allows to follow outside of current TU.

Change-Id: Ieea2fd72bfdf6d60a988b40efcf2f41c5a71d045
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-10-05 09:54:21 +02:00
parent c760804102
commit 7a7123b1bc
27 changed files with 133 additions and 265 deletions

View File

@@ -28,6 +28,7 @@
#include "cpprefactoringengine.h"
#include "cppsemanticinfo.h"
#include "cpptoolsreuse.h"
#include "cppfollowsymbolundercursor.h"
#include <texteditor/texteditor.h>
@@ -99,4 +100,16 @@ void CppRefactoringEngine::findUsages(const CursorInEditor &data,
}
}
CppRefactoringEngine::Link CppRefactoringEngine::globalFollowSymbol(
const CursorInEditor &data,
const CPlusPlus::Snapshot &snapshot,
const CPlusPlus::Document::Ptr &documentFromSemanticInfo,
SymbolFinder *symbolFinder,
bool inNextSplit) const
{
FollowSymbolUnderCursor followSymbol;
return followSymbol.findLink(data, true, snapshot, documentFromSemanticInfo,
symbolFinder, inNextSplit);
}
} // namespace CppEditor