C++: make highlighting/completion plugable.

Change-Id: I990fdf5411153041c6b4c62f31b453342d59de53
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-02-20 12:39:08 +01:00
parent d66acb51d0
commit 6fe6f5cdb1
15 changed files with 407 additions and 94 deletions

View File

@@ -76,6 +76,9 @@ namespace CPlusPlus {
namespace CppTools {
class CppCompletionSupportFactory;
class CppHighlightingSupportFactory;
namespace Internal {
class CppEditorSupport;
@@ -135,7 +138,10 @@ public:
void finishedRefreshingSourceFiles(const QStringList &files);
virtual CppCompletionSupport *completionSupport(Core::IEditor *editor) const;
void setCompletionSupportFactory(CppCompletionSupportFactory *completionFactory);
virtual CppHighlightingSupport *highlightingSupport(Core::IEditor *editor) const;
void setHighlightingSupportFactory(CppHighlightingSupportFactory *highlightingFactory);
Q_SIGNALS:
void projectPathChanged(const QString &projectPath);
@@ -240,6 +246,11 @@ private:
QHash<QString, QHash<int, QList<CPlusPlus::Document::DiagnosticMessage> > > m_extraDiagnostics;
QMap<QString, QList<ProjectPart::Ptr> > m_srcToProjectPart;
CppCompletionSupportFactory *m_completionFactory;
CppCompletionSupportFactory *m_completionFallback;
CppHighlightingSupportFactory *m_highlightingFactory;
CppHighlightingSupportFactory *m_highlightingFallback;
};
#endif