2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
#include "cppeditor_global.h"
|
2022-04-29 16:52:48 +02:00
|
|
|
#include "cursorineditor.h"
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2022-04-25 13:37:58 +02:00
|
|
|
#include <utils/link.h>
|
|
|
|
|
|
2015-05-08 15:48:17 +02:00
|
|
|
#include <QSharedPointer>
|
2013-09-04 18:15:08 +02:00
|
|
|
#include <QString>
|
|
|
|
|
|
2018-02-02 13:01:07 +01:00
|
|
|
#include <memory>
|
|
|
|
|
|
2018-01-11 17:06:26 +01:00
|
|
|
namespace TextEditor {
|
|
|
|
|
class TextDocument;
|
|
|
|
|
class BaseHoverHandler;
|
|
|
|
|
} // namespace TextEditor
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
namespace CppEditor {
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2014-08-19 15:59:29 +02:00
|
|
|
class BaseEditorDocumentProcessor;
|
2013-09-04 18:15:08 +02:00
|
|
|
class CppCompletionAssistProvider;
|
2022-04-29 16:52:48 +02:00
|
|
|
class ProjectPart;
|
2017-09-26 16:00:30 +02:00
|
|
|
class RefactoringEngineInterface;
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
class CPPEDITOR_EXPORT ModelManagerSupport
|
2013-09-04 18:15:08 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2015-05-08 15:48:17 +02:00
|
|
|
using Ptr = QSharedPointer<ModelManagerSupport>;
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2015-05-08 15:48:17 +02:00
|
|
|
public:
|
|
|
|
|
virtual ~ModelManagerSupport() = 0;
|
2013-09-04 18:15:08 +02:00
|
|
|
|
2018-01-11 16:46:45 +01:00
|
|
|
virtual BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
2014-09-22 18:43:31 +02:00
|
|
|
TextEditor::TextDocument *baseTextDocument) = 0;
|
2022-05-10 17:21:59 +02:00
|
|
|
virtual bool usesClangd(const TextEditor::TextDocument *) const { return false; }
|
2022-04-25 13:37:58 +02:00
|
|
|
|
|
|
|
|
virtual void followSymbol(const CursorInEditor &data,
|
2022-06-03 15:17:33 +02:00
|
|
|
const Utils::LinkHandler &processLinkCallback,
|
2022-04-25 13:37:58 +02:00
|
|
|
bool resolveTarget, bool inNextSplit) = 0;
|
2022-09-26 12:59:22 +02:00
|
|
|
virtual void followSymbolToType(const CursorInEditor &data,
|
|
|
|
|
const Utils::LinkHandler &processLinkCallback,
|
|
|
|
|
bool inNextSplit) = 0;
|
2022-04-25 13:37:58 +02:00
|
|
|
virtual void switchDeclDef(const CursorInEditor &data,
|
2022-06-03 15:17:33 +02:00
|
|
|
const Utils::LinkHandler &processLinkCallback) = 0;
|
2022-04-29 16:52:48 +02:00
|
|
|
virtual void startLocalRenaming(const CursorInEditor &data,
|
|
|
|
|
const ProjectPart *projectPart,
|
|
|
|
|
RenameCallback &&renameSymbolsCallback) = 0;
|
2022-06-02 00:23:11 +02:00
|
|
|
virtual void globalRename(const CursorInEditor &data, const QString &replacement) = 0;
|
2022-06-02 00:42:28 +02:00
|
|
|
virtual void findUsages(const CursorInEditor &data) const = 0;
|
2022-05-18 15:16:40 +02:00
|
|
|
virtual void switchHeaderSource(const Utils::FilePath &filePath, bool inNextSplit) = 0;
|
2013-09-04 18:15:08 +02:00
|
|
|
};
|
|
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
} // CppEditor namespace
|