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

@@ -29,12 +29,15 @@
#include "cursorineditor.h"
#include "usages.h"
#include <utils/link.h>
#include <utils/fileutils.h>
#include <utils/smallstring.h>
#include <clangsupport/sourcelocationscontainer.h>
#include <clangsupport/refactoringclientinterface.h>
#include <cplusplus/CppDocument.h>
namespace TextEditor {
class TextEditorWidget;
} // namespace TextEditor
@@ -42,6 +45,7 @@ class TextEditorWidget;
namespace CppTools {
class ProjectPart;
class SymbolFinder;
enum class CallType
{
@@ -54,6 +58,7 @@ class CPPTOOLS_EXPORT RefactoringEngineInterface
{
public:
using RenameCallback = ClangBackEnd::RefactoringClientInterface::RenameCallback;
using Link = Utils::Link;
virtual ~RefactoringEngineInterface() {}
@@ -65,6 +70,11 @@ public:
const QString &replacement) = 0;
virtual void findUsages(const CppTools::CursorInEditor &data,
UsagesCallback &&showUsagesCallback) const = 0;
virtual Link globalFollowSymbol(const CursorInEditor &data,
const CPlusPlus::Snapshot &snapshot,
const CPlusPlus::Document::Ptr &documentFromSemanticInfo,
SymbolFinder *symbolFinder,
bool inNextSplit) const = 0;
virtual bool isRefactoringEngineAvailable() const { return true; }
};