forked from qt-creator/qt-creator
C++: add code-model settings to choose one by mime-type.
The model-manager now supports multiple code models for semantic highlighting and code completion, and will choose one based on the mime-type of the editor. The settings page is currently disabled. It will get enabled when a second plug-in lands that has a ModelManagerSupport class. Change-Id: I10023f52322ed6860397da15dba1c231e80e6517 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
void finishedRefreshingSourceFiles(const QStringList &files);
|
||||
|
||||
virtual void addModelManagerSupport(ModelManagerSupport *codeModelSupport);
|
||||
virtual void addModelManagerSupport(ModelManagerSupport *modelManagerSupport);
|
||||
virtual ModelManagerSupport *modelManagerSupportForMimeType(const QString &mimeType) const;
|
||||
virtual CppCompletionAssistProvider *completionAssistProvider(Core::IEditor *editor) const;
|
||||
virtual CppHighlightingSupport *highlightingSupport(Core::IEditor *editor) const;
|
||||
@@ -202,9 +202,8 @@ private:
|
||||
QSet<AbstractEditorSupport *> m_extraEditorSupports;
|
||||
|
||||
// Completion & highlighting
|
||||
QList<ModelManagerSupport *> m_codeModelSupporters;
|
||||
QHash<QString, ModelManagerSupport *> m_idTocodeModelSupporter;
|
||||
QScopedPointer<ModelManagerSupport> m_modelManagerSupportFallback;
|
||||
QHash<QString, ModelManagerSupport *> m_mimeTypeToCodeModelSupport;
|
||||
|
||||
// Indexing
|
||||
CppIndexingSupport *m_indexingSupporter;
|
||||
|
Reference in New Issue
Block a user