forked from qt-creator/qt-creator
CppEditor: Remove RefactoringEngine
Another useless indirection. Change-Id: Icfcc0704a1056d8002a674edbe74b946cb56ff27 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -27,14 +27,16 @@
|
||||
|
||||
#include "cppeditor_global.h"
|
||||
|
||||
#include "refactoringengineinterface.h"
|
||||
#include "cursorineditor.h"
|
||||
#include "projectinfo.h"
|
||||
#include "projectpart.h"
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include "usages.h"
|
||||
|
||||
#include <cplusplus/cppmodelmanagerbase.h>
|
||||
#include <coreplugin/find/ifindfilter.h>
|
||||
#include <coreplugin/locator/ilocatorfilter.h>
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include <utils/link.h>
|
||||
|
||||
#include <QFuture>
|
||||
#include <QObject>
|
||||
@@ -62,6 +64,7 @@ class CppIndexingSupport;
|
||||
class CppLocatorData;
|
||||
class FollowSymbolUnderCursor;
|
||||
class ModelManagerSupportProvider;
|
||||
class ModelManagerSupport;
|
||||
class SymbolFinder;
|
||||
class WorkingCopy;
|
||||
|
||||
@@ -73,15 +76,7 @@ class CppModelManagerPrivate;
|
||||
|
||||
namespace Tests { class ModelManagerTestHelper; }
|
||||
|
||||
enum class RefactoringEngineType : int
|
||||
{
|
||||
BuiltIn = 0,
|
||||
ClangCodeModel = 1,
|
||||
ClangRefactoring = 2
|
||||
};
|
||||
|
||||
class CPPEDITOR_EXPORT CppModelManager final : public CPlusPlus::CppModelManagerBase,
|
||||
public RefactoringEngineInterface
|
||||
class CPPEDITOR_EXPORT CppModelManager final : public CPlusPlus::CppModelManagerBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -156,14 +151,6 @@ public:
|
||||
|
||||
QList<int> references(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context);
|
||||
|
||||
void startLocalRenaming(const CursorInEditor &data,
|
||||
const ProjectPart *projectPart,
|
||||
RenameCallback &&renameSymbolsCallback) final;
|
||||
void globalRename(const CursorInEditor &data, UsagesCallback &&renameCallback,
|
||||
const QString &replacement) final;
|
||||
void findUsages(const CursorInEditor &data,
|
||||
UsagesCallback &&showUsagesCallback) const final;
|
||||
|
||||
bool positionRequiresSignal(const QString &filePath, const QByteArray &content,
|
||||
int position) const;
|
||||
|
||||
@@ -183,10 +170,22 @@ public:
|
||||
TextEditor::TextDocument *baseTextDocument) const;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() const;
|
||||
static FollowSymbolUnderCursor &builtinFollowSymbol();
|
||||
void followSymbol(const CursorInEditor &data, Utils::ProcessLinkCallback &&processLinkCallback,
|
||||
bool resolveTarget, bool inNextSplit);
|
||||
void switchDeclDef(const CursorInEditor &data,
|
||||
Utils::ProcessLinkCallback &&processLinkCallback);
|
||||
|
||||
enum class Backend { Builtin, Best };
|
||||
static void followSymbol(const CursorInEditor &data,
|
||||
Utils::ProcessLinkCallback &&processLinkCallback,
|
||||
bool resolveTarget, bool inNextSplit, Backend backend = Backend::Best);
|
||||
static void switchDeclDef(const CursorInEditor &data,
|
||||
Utils::ProcessLinkCallback &&processLinkCallback,
|
||||
Backend backend = Backend::Best);
|
||||
static void startLocalRenaming(const CursorInEditor &data, const ProjectPart *projectPart,
|
||||
RenameCallback &&renameSymbolsCallback,
|
||||
Backend backend = Backend::Best);
|
||||
static void globalRename(const CursorInEditor &data, UsagesCallback &&renameCallback,
|
||||
const QString &replacement, Backend backend = Backend::Best);
|
||||
static void findUsages(const CursorInEditor &data, UsagesCallback &&showUsagesCallback,
|
||||
Backend backend = Backend::Best);
|
||||
|
||||
static Core::ILocatorFilter *createAuxiliaryCurrentDocumentFilter();
|
||||
|
||||
std::unique_ptr<AbstractOverviewModel> createOverviewModel() const;
|
||||
@@ -214,11 +213,6 @@ public:
|
||||
static QString configurationFileName();
|
||||
static QString editorConfigurationFileName();
|
||||
|
||||
static void addRefactoringEngine(RefactoringEngineType type,
|
||||
RefactoringEngineInterface *refactoringEngine);
|
||||
static void removeRefactoringEngine(RefactoringEngineType type);
|
||||
static RefactoringEngineInterface *builtinRefactoringEngine();
|
||||
|
||||
void setLocatorFilter(std::unique_ptr<Core::ILocatorFilter> &&filter);
|
||||
void setClassesFilter(std::unique_ptr<Core::ILocatorFilter> &&filter);
|
||||
void setIncludesFilter(std::unique_ptr<Core::ILocatorFilter> &&filter);
|
||||
@@ -292,6 +286,8 @@ private:
|
||||
|
||||
WorkingCopy buildWorkingCopyList();
|
||||
|
||||
ModelManagerSupport *modelManagerSupport(Backend backend) const;
|
||||
|
||||
void ensureUpdated();
|
||||
QStringList internalProjectFiles() const;
|
||||
ProjectExplorer::HeaderPaths internalHeaderPaths() const;
|
||||
|
||||
Reference in New Issue
Block a user