CppEditor: Remove CppToolsBridge & friends

This redirection did nothing except to horribly obfuscate the code.
Note that most callers already accessed the model manager directly, and
some bridge functions were not called at all.

Change-Id: Ic1c728afe79bf98544da23a1955ee82d0dbde94f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-09-02 12:15:59 +02:00
parent 7761a5afbc
commit 548e19370e
20 changed files with 16 additions and 346 deletions

View File

@@ -39,7 +39,6 @@
#include <cppeditor/cppmodelmanager.h> #include <cppeditor/cppmodelmanager.h>
#include <cppeditor/editordocumenthandle.h> #include <cppeditor/editordocumenthandle.h>
#include <cppeditor/projectinfo.h> #include <cppeditor/projectinfo.h>
#include <cppeditor/cpptoolsbridge.h>
#include <texteditor/codeassist/functionhintproposal.h> #include <texteditor/codeassist/functionhintproposal.h>
#include <texteditor/codeassist/iassistprocessor.h> #include <texteditor/codeassist/iassistprocessor.h>
@@ -164,7 +163,7 @@ void removeNonCppEditors(QList<Core::IEditor*> &visibleEditors)
Utf8StringVector visibleCppEditorDocumentsFilePaths() Utf8StringVector visibleCppEditorDocumentsFilePaths()
{ {
auto visibleEditors = CppEditor::CppToolsBridge::visibleEditors(); auto visibleEditors = Core::EditorManager::visibleEditors();
removeNonCppEditors(visibleEditors); removeNonCppEditors(visibleEditors);

View File

@@ -30,8 +30,6 @@
#include "clangcompletionassistprocessor.h" #include "clangcompletionassistprocessor.h"
#include "clangeditordocumentprocessor.h" #include "clangeditordocumentprocessor.h"
#include <cppeditor/cpptoolsbridge.h>
#include <clangsupport/clangcodemodelclientmessages.h> #include <clangsupport/clangcodemodelclientmessages.h>
#include <QLoggingCategory> #include <QLoggingCategory>

View File

@@ -36,7 +36,6 @@
#include <cppeditor/cppdoxygen.h> #include <cppeditor/cppdoxygen.h>
#include <cppeditor/cppmodelmanager.h> #include <cppeditor/cppmodelmanager.h>
#include <cppeditor/cpptoolsbridge.h>
#include <cppeditor/editordocumenthandle.h> #include <cppeditor/editordocumenthandle.h>
#include <texteditor/codeassist/assistproposalitem.h> #include <texteditor/codeassist/assistproposalitem.h>

View File

@@ -42,7 +42,6 @@
#include <cppeditor/compileroptionsbuilder.h> #include <cppeditor/compileroptionsbuilder.h>
#include <cppeditor/cppcodemodelsettings.h> #include <cppeditor/cppcodemodelsettings.h>
#include <cppeditor/cppmodelmanager.h> #include <cppeditor/cppmodelmanager.h>
#include <cppeditor/cpptoolsbridge.h>
#include <cppeditor/cpptoolsreuse.h> #include <cppeditor/cpptoolsreuse.h>
#include <cppeditor/cppworkingcopy.h> #include <cppeditor/cppworkingcopy.h>
#include <cppeditor/editordocumenthandle.h> #include <cppeditor/editordocumenthandle.h>
@@ -416,9 +415,8 @@ void ClangEditorDocumentProcessor::clearDiagnosticsWithFixIts()
ClangEditorDocumentProcessor *ClangEditorDocumentProcessor::get(const QString &filePath) ClangEditorDocumentProcessor *ClangEditorDocumentProcessor::get(const QString &filePath)
{ {
auto *processor = CppEditor::CppToolsBridge::baseEditorDocumentProcessor(filePath); return qobject_cast<ClangEditorDocumentProcessor*>(
CppEditor::CppModelManager::cppEditorDocumentProcessor(filePath));
return qobject_cast<ClangEditorDocumentProcessor*>(processor);
} }
static bool isProjectPartLoadedOrIsFallback(CppEditor::ProjectPart::ConstPtr projectPart) static bool isProjectPartLoadedOrIsFallback(CppEditor::ProjectPart::ConstPtr projectPart)

View File

@@ -96,9 +96,6 @@ add_qtc_plugin(CppEditor
cppsemanticinfoupdater.cpp cppsemanticinfoupdater.h cppsemanticinfoupdater.cpp cppsemanticinfoupdater.h
cppsourceprocessor.cpp cppsourceprocessor.h cppsourceprocessor.cpp cppsourceprocessor.h
cppsymbolinfo.h cppsymbolinfo.h
cpptoolsbridge.cpp cpptoolsbridge.h
cpptoolsbridgeinterface.h
cpptoolsbridgeqtcreatorimplementation.cpp cpptoolsbridgeqtcreatorimplementation.h
cpptoolsjsextension.cpp cpptoolsjsextension.h cpptoolsjsextension.cpp cpptoolsjsextension.h
cpptoolsreuse.cpp cpptoolsreuse.h cpptoolsreuse.cpp cpptoolsreuse.h
cpptoolssettings.cpp cpptoolssettings.h cpptoolssettings.cpp cpptoolssettings.h

View File

@@ -28,7 +28,6 @@
#include "cppcodemodelsettings.h" #include "cppcodemodelsettings.h"
#include "cppeditor_utils.h" #include "cppeditor_utils.h"
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include "cpptoolsbridge.h"
#include "cpptoolsreuse.h" #include "cpptoolsreuse.h"
#include "editordocumenthandle.h" #include "editordocumenthandle.h"
@@ -104,7 +103,7 @@ void BaseEditorDocumentProcessor::runParser(QFutureInterface<void> &future,
} }
parser->update(future, updateParams); parser->update(future, updateParams);
CppToolsBridge::finishedRefreshingSourceFiles({parser->filePath()}); CppModelManager::instance()->finishedRefreshingSourceFiles({parser->filePath()});
future.setProgressValue(1); future.setProgressValue(1);
} }

View File

@@ -31,7 +31,6 @@
#include "cppeditorwidget.h" #include "cppeditorwidget.h"
#include "cppeditordocument.h" #include "cppeditordocument.h"
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include "cpptoolsbridge.h"
#include "cpptoolsreuse.h" #include "cpptoolsreuse.h"
#include "cppworkingcopy.h" #include "cppworkingcopy.h"
@@ -1539,7 +1538,7 @@ void CppCodeModelInspectorDialog::refresh()
if (editor) { if (editor) {
const QString editorFilePath = editor->document()->filePath().toString(); const QString editorFilePath = editor->document()->filePath().toString();
cppEditorDocument = cmmi->cppEditorDocument(editorFilePath); cppEditorDocument = cmmi->cppEditorDocument(editorFilePath);
if (auto documentProcessor = CppToolsBridge::baseEditorDocumentProcessor(editorFilePath)) { if (auto documentProcessor = CppModelManager::cppEditorDocumentProcessor(editorFilePath)) {
const Snapshot editorSnapshot = documentProcessor->snapshot(); const Snapshot editorSnapshot = documentProcessor->snapshot();
m_snapshotInfos->append(SnapshotInfo(editorSnapshot, SnapshotInfo::EditorSnapshot)); m_snapshotInfos->append(SnapshotInfo(editorSnapshot, SnapshotInfo::EditorSnapshot));
const QString editorSnapshotTitle const QString editorSnapshotTitle

View File

@@ -91,9 +91,6 @@ HEADERS += \
cppsemanticinfoupdater.h \ cppsemanticinfoupdater.h \
cppsourceprocessor.h \ cppsourceprocessor.h \
cppsymbolinfo.h \ cppsymbolinfo.h \
cpptoolsbridge.h \
cpptoolsbridgeinterface.h \
cpptoolsbridgeqtcreatorimplementation.h \
cpptoolsjsextension.h \ cpptoolsjsextension.h \
cpptoolsreuse.h \ cpptoolsreuse.h \
cpptoolssettings.h \ cpptoolssettings.h \
@@ -205,8 +202,6 @@ SOURCES += \
cppselectionchanger.cpp \ cppselectionchanger.cpp \
cppsemanticinfoupdater.cpp \ cppsemanticinfoupdater.cpp \
cppsourceprocessor.cpp \ cppsourceprocessor.cpp \
cpptoolsbridge.cpp \
cpptoolsbridgeqtcreatorimplementation.cpp \
cpptoolsjsextension.cpp \ cpptoolsjsextension.cpp \
cpptoolsreuse.cpp \ cpptoolsreuse.cpp \
cpptoolssettings.cpp \ cpptoolssettings.cpp \

View File

@@ -205,11 +205,6 @@ QtcPlugin {
"cppsourceprocessor.cpp", "cppsourceprocessor.cpp",
"cppsourceprocessor.h", "cppsourceprocessor.h",
"cppsymbolinfo.h", "cppsymbolinfo.h",
"cpptoolsbridge.cpp",
"cpptoolsbridge.h",
"cpptoolsbridgeinterface.h",
"cpptoolsbridgeqtcreatorimplementation.cpp",
"cpptoolsbridgeqtcreatorimplementation.h",
"cpptoolsjsextension.cpp", "cpptoolsjsextension.cpp",
"cpptoolsjsextension.h", "cpptoolsjsextension.h",
"cpptoolsreuse.cpp", "cpptoolsreuse.cpp",

View File

@@ -44,8 +44,6 @@
#include "cppquickfixes.h" #include "cppquickfixes.h"
#include "cppquickfixprojectsettingswidget.h" #include "cppquickfixprojectsettingswidget.h"
#include "cppquickfixsettingspage.h" #include "cppquickfixsettingspage.h"
#include "cpptoolsbridge.h"
#include "cpptoolsbridgeqtcreatorimplementation.h"
#include "cpptoolsreuse.h" #include "cpptoolsreuse.h"
#include "cpptoolssettings.h" #include "cpptoolssettings.h"
#include "cpptypehierarchy.h" #include "cpptypehierarchy.h"
@@ -227,8 +225,6 @@ static QHash<QString, QString> m_headerSourceMapping;
CppEditorPlugin::CppEditorPlugin() CppEditorPlugin::CppEditorPlugin()
{ {
m_instance = this; m_instance = this;
CppToolsBridge::setCppToolsBridgeImplementation(
std::make_unique<CppToolsBridgeQtCreatorImplementation>());
} }
CppEditorPlugin::~CppEditorPlugin() CppEditorPlugin::~CppEditorPlugin()

View File

@@ -33,7 +33,6 @@
#include "cppeditorplugin.h" #include "cppeditorplugin.h"
#include "cppelementevaluator.h" #include "cppelementevaluator.h"
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include "cpptoolsbridge.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/fileiconprovider.h> #include <coreplugin/fileiconprovider.h>
@@ -224,7 +223,7 @@ void CppIncludeHierarchyItem::fetchMore()
setChildrenChecked(); setChildrenChecked();
if (m_subTree == InIncludes) { if (m_subTree == InIncludes) {
auto processor = CppToolsBridge::baseEditorDocumentProcessor(editorFilePath); auto processor = CppModelManager::cppEditorDocumentProcessor(editorFilePath);
QTC_ASSERT(processor, return); QTC_ASSERT(processor, return);
const Snapshot snapshot = processor->snapshot(); const Snapshot snapshot = processor->snapshot();
const FileAndLines includes = findIncludes(filePath(), snapshot); const FileAndLines includes = findIncludes(filePath(), snapshot);

View File

@@ -849,6 +849,12 @@ CppEditorDocumentHandle *CppModelManager::cppEditorDocument(const QString &fileP
return d->m_cppEditorDocuments.value(filePath, 0); return d->m_cppEditorDocuments.value(filePath, 0);
} }
BaseEditorDocumentProcessor *CppModelManager::cppEditorDocumentProcessor(const QString &filePath)
{
const auto document = instance()->cppEditorDocument(filePath);
return document ? document->processor() : nullptr;
}
void CppModelManager::registerCppEditorDocument(CppEditorDocumentHandle *editorDocument) void CppModelManager::registerCppEditorDocument(CppEditorDocumentHandle *editorDocument)
{ {
QTC_ASSERT(editorDocument, return); QTC_ASSERT(editorDocument, return);

View File

@@ -148,6 +148,7 @@ public:
QList<CppEditorDocumentHandle *> cppEditorDocuments() const; QList<CppEditorDocumentHandle *> cppEditorDocuments() const;
CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const; CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const;
static BaseEditorDocumentProcessor *cppEditorDocumentProcessor(const QString &filePath);
void registerCppEditorDocument(CppEditorDocumentHandle *cppEditorDocument); void registerCppEditorDocument(CppEditorDocumentHandle *cppEditorDocument);
void unregisterCppEditorDocument(const QString &filePath); void unregisterCppEditorDocument(const QString &filePath);

View File

@@ -37,7 +37,6 @@
#include "cppquickfixassistant.h" #include "cppquickfixassistant.h"
#include "cppquickfixprojectsettings.h" #include "cppquickfixprojectsettings.h"
#include "cpprefactoringchanges.h" #include "cpprefactoringchanges.h"
#include "cpptoolsbridge.h"
#include "cpptoolsreuse.h" #include "cpptoolsreuse.h"
#include "cppvirtualfunctionassistprovider.h" #include "cppvirtualfunctionassistprovider.h"
#include "includeutils.h" #include "includeutils.h"
@@ -7551,7 +7550,8 @@ void ConvertQt4Connect::match(const CppQuickFixInterface &interface, QuickFixOpe
void ExtraRefactoringOperations::match(const CppQuickFixInterface &interface, void ExtraRefactoringOperations::match(const CppQuickFixInterface &interface,
QuickFixOperations &result) QuickFixOperations &result)
{ {
const auto processor = CppToolsBridge::baseEditorDocumentProcessor(interface.filePath().toString()); const auto processor = CppModelManager::cppEditorDocumentProcessor(
interface.filePath().toString());
if (processor) { if (processor) {
const auto clangFixItOperations = processor->extraRefactoringOperations(interface); const auto clangFixItOperations = processor->extraRefactoringOperations(interface);
result.append(clangFixItOperations); result.append(clangFixItOperations);

View File

@@ -29,7 +29,6 @@
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include "cppsourceprocessertesthelper.h" #include "cppsourceprocessertesthelper.h"
#include "cppsourceprocessor.h" #include "cppsourceprocessor.h"
#include "cpptoolsbridge.h"
#include "cpptoolstestcase.h" #include "cpptoolstestcase.h"
#include "editordocumenthandle.h" #include "editordocumenthandle.h"
@@ -132,7 +131,7 @@ void SourceProcessorTest::testIncludesCyclic()
// Check editor snapshot // Check editor snapshot
const QString filePath = editor->document()->filePath().toString(); const QString filePath = editor->document()->filePath().toString();
auto *processor = CppToolsBridge::baseEditorDocumentProcessor(filePath); auto *processor = CppModelManager::cppEditorDocumentProcessor(filePath);
QVERIFY(processor); QVERIFY(processor);
QVERIFY(TestCase::waitForProcessedEditorDocument(filePath)); QVERIFY(TestCase::waitForProcessedEditorDocument(filePath));
Snapshot snapshot = processor->snapshot(); Snapshot snapshot = processor->snapshot();

View File

@@ -1,66 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "cpptoolsbridge.h"
#include "cpptoolsbridgeinterface.h"
#include <QList>
namespace CppEditor {
std::unique_ptr<CppToolsBridgeInterface> CppToolsBridge::m_interface;
void CppToolsBridge::setCppToolsBridgeImplementation(std::unique_ptr<CppToolsBridgeInterface> &&interface)
{
m_interface = std::move(interface);
}
CppEditorDocumentHandle *CppToolsBridge::cppEditorDocument(const QString &filePath)
{
return m_interface->cppEditorDocument(filePath);
}
QString CppToolsBridge::projectPartIdForFile(const QString &filePath)
{
return m_interface->projectPartIdForFile(filePath);
}
BaseEditorDocumentProcessor *CppToolsBridge::baseEditorDocumentProcessor(const QString &filePath)
{
return m_interface->baseEditorDocumentProcessor(filePath);
}
void CppToolsBridge::finishedRefreshingSourceFiles(const QSet<QString> &filePaths)
{
m_interface->finishedRefreshingSourceFiles(filePaths);
}
QList<Core::IEditor *> CppToolsBridge::visibleEditors()
{
return m_interface->visibleEditors();
}
} // namespace CppEditor

View File

@@ -1,57 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include "cppeditor_global.h"
#include <QString>
#include <memory>
namespace Core { class IEditor; }
namespace CppEditor {
class CppEditorDocumentHandle;
class BaseEditorDocumentProcessor;
class CppToolsBridgeInterface;
class CPPEDITOR_EXPORT CppToolsBridge
{
public:
static void setCppToolsBridgeImplementation(std::unique_ptr<CppToolsBridgeInterface> &&interface
);
static CppEditorDocumentHandle *cppEditorDocument(const QString &filePath);
static QString projectPartIdForFile(const QString &filePath);
static BaseEditorDocumentProcessor *baseEditorDocumentProcessor(const QString &filePath);
static void finishedRefreshingSourceFiles(const QSet<QString> &filePaths);
static QList<Core::IEditor *> visibleEditors();
private:
static std::unique_ptr<CppToolsBridgeInterface> m_interface;
};
} // namespace CppEditor

View File

@@ -1,51 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <QList>
QT_BEGIN_NAMESPACE
class QString;
QT_END_NAMESPACE
namespace Core { class IEditor; }
namespace CppEditor {
class CppEditorDocumentHandle;
class BaseEditorDocumentProcessor;
class CppToolsBridgeInterface
{
public:
virtual ~CppToolsBridgeInterface() = default;
virtual CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const = 0;
virtual QString projectPartIdForFile(const QString &filePath) const = 0;
virtual BaseEditorDocumentProcessor *baseEditorDocumentProcessor(const QString &filePath) const = 0;
virtual void finishedRefreshingSourceFiles(const QSet<QString> &filePaths) const = 0;
virtual QList<Core::IEditor *> visibleEditors() const = 0;
};
} // namespace CppEditor

View File

@@ -1,94 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "cpptoolsbridgeqtcreatorimplementation.h"
#include "baseeditordocumentparser.h"
#include "cppmodelmanager.h"
#include "projectpart.h"
#include "editordocumenthandle.h"
#include <coreplugin/editormanager/editormanager.h>
namespace CppEditor::Internal {
CppEditorDocumentHandle *
CppToolsBridgeQtCreatorImplementation::cppEditorDocument(const QString &filePath) const
{
return CppModelManager::instance()->cppEditorDocument(filePath);
}
namespace {
ProjectPart::ConstPtr projectPartForFile(const QString &filePath)
{
if (const auto parser = BaseEditorDocumentParser::get(filePath))
return parser->projectPartInfo().projectPart;
return ProjectPart::ConstPtr();
}
bool isProjectPartValid(const ProjectPart::ConstPtr projectPart)
{
if (projectPart)
return !CppModelManager::instance()->projectPartForId(projectPart->id()).isNull();
return false;
}
} // anonymous namespace
QString CppToolsBridgeQtCreatorImplementation::projectPartIdForFile(const QString &filePath) const
{
const ProjectPart::ConstPtr projectPart = projectPartForFile(filePath);
if (isProjectPartValid(projectPart))
return projectPart->id(); // OK, Project Part is still loaded
return QString();
}
BaseEditorDocumentProcessor *
CppToolsBridgeQtCreatorImplementation::baseEditorDocumentProcessor(const QString &filePath) const
{
auto *document = cppEditorDocument(filePath);
if (document)
return document->processor();
return nullptr;
}
void CppToolsBridgeQtCreatorImplementation::finishedRefreshingSourceFiles(
const QSet<QString> &filePaths) const
{
CppModelManager::instance()->finishedRefreshingSourceFiles(filePaths);
}
QList<Core::IEditor *> CppToolsBridgeQtCreatorImplementation::visibleEditors() const
{
return Core::EditorManager::visibleEditors();
}
} // namespace CppEditor::Internal

View File

@@ -1,42 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include "cpptoolsbridgeinterface.h"
namespace CppEditor::Internal {
class CppToolsBridgeQtCreatorImplementation final : public CppToolsBridgeInterface
{
public:
CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const override;
QString projectPartIdForFile(const QString &filePath) const override;
BaseEditorDocumentProcessor *baseEditorDocumentProcessor(const QString &filePath) const override;
void finishedRefreshingSourceFiles(const QSet<QString> &filePaths) const override;
QList<Core::IEditor *> visibleEditors() const override;
};
} // namespace CppEditor::Internal