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:
hjk
2014-07-30 17:02:39 +02:00
parent 80fb772856
commit 9fd2fe5a9a
14 changed files with 32 additions and 45 deletions

View File

@@ -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

View File

@@ -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