forked from qt-creator/qt-creator
CmakeEditor: Use the generic SyntaxHighlighter.
Removed the cmakehighlighter class, and use the TextEditor::createGenericSyntaxHighlighter with the correct mime type instead, as it provides a more robust code highlighting. Task-number: QTCREATORBUG-3272 Change-Id: I96f6fa0912441500d7aa6ab3735bcfd49d9efa57 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Daniel Teske
parent
6af4b5a178
commit
76efc1ef56
@@ -36,12 +36,10 @@
|
||||
#include "cmakeprojectconstants.h"
|
||||
#include "cmakelocatorfilter.h"
|
||||
#include "cmakefilecompletionassist.h"
|
||||
#include "cmakehighlighter.h"
|
||||
|
||||
#include <coreplugin/featureprovider.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <texteditor/highlighterfactory.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QDebug>
|
||||
@@ -73,13 +71,6 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *
|
||||
addAutoReleasedObject(new CMakeLocatorFilter);
|
||||
addAutoReleasedObject(new CMakeFileCompletionAssistProvider(cmp));
|
||||
|
||||
auto hf = new TextEditor::HighlighterFactory;
|
||||
hf->setProductType<CMakeHighlighter>();
|
||||
hf->setId(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
|
||||
hf->addMimeType(CMakeProjectManager::Constants::CMAKEMIMETYPE);
|
||||
hf->addMimeType(CMakeProjectManager::Constants::CMAKEPROJECTMIMETYPE);
|
||||
addAutoReleasedObject(hf);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user