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:
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "cmakeeditor.h"
|
||||
|
||||
#include "cmakefilecompletionassist.h"
|
||||
#include "cmakehighlighter.h"
|
||||
#include "cmakeeditorfactory.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
@@ -38,6 +39,7 @@
|
||||
#include <coreplugin/infobar.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
@@ -77,6 +79,11 @@ Core::Id CMakeEditor::id() const
|
||||
return Core::Id(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
|
||||
}
|
||||
|
||||
TextEditor::CompletionAssistProvider *CMakeEditor::completionAssistProvider()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::getObject<CMakeFileCompletionAssistProvider>();
|
||||
}
|
||||
|
||||
void CMakeEditor::markAsChanged()
|
||||
{
|
||||
if (!document()->isModified())
|
||||
|
||||
Reference in New Issue
Block a user