forked from qt-creator/qt-creator
TextEditor: Make completion assist provider a data member
In case of the CppEditor a direct member is not possible due to setup restrictions inside the CppEditor machinery. I'd expect that to be fixable when the editor base system is in good shape. Change-Id: I184e219ca2dff6f67c9b58c182212eb12972cc84 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -55,6 +55,7 @@ QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor)
|
||||
m_context.add(ProjectExplorer::Constants::LANG_QMLJS);
|
||||
setDuplicateSupported(true);
|
||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>());
|
||||
}
|
||||
|
||||
bool QmlJSEditor::isDesignModePreferred() const
|
||||
@@ -66,10 +67,5 @@ bool QmlJSEditor::isDesignModePreferred() const
|
||||
return false;
|
||||
}
|
||||
|
||||
TextEditor::CompletionAssistProvider *QmlJSEditor::completionAssistProvider()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlJSEditor
|
||||
|
||||
@@ -49,8 +49,6 @@ public:
|
||||
Core::IEditor *duplicate();
|
||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||
bool isDesignModePreferred() const;
|
||||
|
||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user