Commit cc1ed420 authored by Marco Bubke's avatar Marco Bubke

Clang: Break dependency to visible Core::EditorManager::visibleEditors()


Change-Id: I4157cd190a8c00b07c0e2f3eeeab18409f2405b7
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent e134dfca
......@@ -27,6 +27,8 @@
#include "cpptoolsbridgeinterface.h"
#include <QList>
namespace CppTools {
std::unique_ptr<CppToolsBridgeInterface> CppToolsBridge::m_interface;
......@@ -56,4 +58,9 @@ void CppToolsBridge::finishedRefreshingSourceFiles(const QSet<QString> &filePath
m_interface->finishedRefreshingSourceFiles(filePaths);
}
QList<Core::IEditor *> CppToolsBridge::visibleEditors()
{
return m_interface->visibleEditors();
}
} // namespace CppTools
......@@ -32,6 +32,10 @@
#include <memory>
namespace Core {
class IEditor;
}
namespace CppTools {
class CppEditorDocumentHandle;
class BaseEditorDocumentProcessor;
......@@ -47,6 +51,7 @@ public:
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;
......
......@@ -32,6 +32,10 @@ QT_BEGIN_NAMESPACE
class QString;
QT_END_NAMESPACE
namespace Core {
class IEditor;
}
namespace CppTools {
class CppEditorDocumentHandle;
class BaseEditorDocumentProcessor;
......@@ -44,6 +48,8 @@ public:
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 CppTools
......
......@@ -30,6 +30,8 @@
#include "projectpart.h"
#include "editordocumenthandle.h"
#include <coreplugin/editormanager/editormanager.h>
namespace CppTools {
namespace Internal {
......@@ -86,6 +88,11 @@ void CppToolsBridgeQtCreatorImplementation::finishedRefreshingSourceFiles(
CppModelManager::instance()->finishedRefreshingSourceFiles(filePaths);
}
QList<Core::IEditor *> CppToolsBridgeQtCreatorImplementation::visibleEditors() const
{
return Core::EditorManager::visibleEditors();
}
} // namespace Internal
} // namespace CppTools
......@@ -39,6 +39,7 @@ public:
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 Internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment