forked from qt-creator/qt-creator
TextEditor: get CompletionAssistProvider from editor.
And not from the global object pool. This way, the editors that have different highlighters for various language dialects, or editors that support multiple languages in a single editor, can decide themselves on what CompletionAssistProvider to provide. Change-Id: Ieebc4a8e7b3de6470fdb8103035aa3b8b2ba6598 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "qmljseditoreditable.h"
|
||||
#include "qmljseditor.h"
|
||||
#include "qmljseditorconstants.h"
|
||||
#include "qmljscompletionassist.h"
|
||||
|
||||
#include <qmljstools/qmljstoolsconstants.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
@@ -41,6 +42,8 @@
|
||||
#include <coreplugin/modemanager.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
namespace QmlJSEditor {
|
||||
|
||||
QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor)
|
||||
@@ -65,4 +68,9 @@ const Utils::CommentDefinition *QmlJSEditor::commentDefinition() const
|
||||
return &m_commentDefinition;
|
||||
}
|
||||
|
||||
TextEditor::CompletionAssistProvider *QmlJSEditor::completionAssistProvider()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>();
|
||||
}
|
||||
|
||||
} // namespace QmlJSEditor
|
||||
|
||||
Reference in New Issue
Block a user