Snippets: Set auto-completers.

This commit is contained in:
Leandro Melo
2010-11-09 11:44:49 +01:00
parent 212e39a972
commit a997749522
2 changed files with 4 additions and 2 deletions

View File

@@ -31,6 +31,7 @@
#include "cpphighlighter.h"
#include "cppeditor.h"
#include "cppqtstyleindenter.h"
#include "cppautocompleter.h"
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
@@ -62,6 +63,6 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
fs.toTextCharFormats(CPPEditor::highlighterFormatCategories());
highlighter->setFormats(formats.constBegin(), formats.constEnd());
editor->installSyntaxHighlighter(highlighter);
editor->setIndenter(new CppQtStyleIndenter);
editor->setAutoCompleter(new CppAutoCompleter);
}

View File

@@ -31,6 +31,7 @@
#include "qmljshighlighter.h"
#include "qmljseditor.h"
#include "qmljsindenter.h"
#include "qmljsautocompleter.h"
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
@@ -60,6 +61,6 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings();
highlighter->setFormats(fs.toTextCharFormats(QmlJSTextEditor::highlighterFormatCategories()));
editor->installSyntaxHighlighter(highlighter);
editor->setIndenter(new Indenter);
editor->setAutoCompleter(new AutoCompleter);
}