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:
hjk
2014-06-26 00:27:27 +02:00
parent 922f25170c
commit 62a870a14f
35 changed files with 82 additions and 640 deletions

View File

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