forked from qt-creator/qt-creator
TextEditor: Simplify HighlighterFactory hierarchy
Change-Id: I555639a9137dcb8ccb471e1615823870c8158b3c Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -36,11 +36,12 @@
|
||||
#include "cmakeprojectconstants.h"
|
||||
#include "cmakelocatorfilter.h"
|
||||
#include "cmakefilecompletionassist.h"
|
||||
#include "cmakehighlighterfactory.h"
|
||||
#include "cmakehighlighter.h"
|
||||
|
||||
#include <coreplugin/featureprovider.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <texteditor/highlighterfactory.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QDebug>
|
||||
@@ -82,7 +83,13 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *
|
||||
addAutoReleasedObject(new CMakeLocatorFilter);
|
||||
addAutoReleasedObject(new CMakeFileCompletionAssistProvider(cmp));
|
||||
addAutoReleasedObject(new CMakeFeatureProvider);
|
||||
addAutoReleasedObject(new CMakeHighlighterFactory);
|
||||
|
||||
auto hf = new TextEditor::HighlighterFactory;
|
||||
hf->setProductType<CMakeHighlighter>();
|
||||
hf->setId(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
|
||||
hf->addMimeType(CMakeProjectManager::Constants::CMAKEMIMETYPE);
|
||||
addAutoReleasedObject(hf);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user