forked from qt-creator/qt-creator
CppEditor: Remove class CppEditor
It's not needed, and conflicts with the namespace of the same name in some contexts. Change-Id: I281025abbfad0feb602f006e3b997a8b9c308b48 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -25,9 +25,12 @@
|
||||
|
||||
#include "cpptoolsreuse.h"
|
||||
|
||||
#include "cppautocompleter.h"
|
||||
#include "cppcodemodelsettings.h"
|
||||
#include "cppeditorconstants.h"
|
||||
#include "cppeditorplugin.h"
|
||||
#include "cpphighlighter.h"
|
||||
#include "cppqtstyleindenter.h"
|
||||
#include "cpprefactoringchanges.h"
|
||||
#include "projectinfo.h"
|
||||
|
||||
@@ -36,6 +39,7 @@
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <cplusplus/Overview.h>
|
||||
#include <cplusplus/LookupContext.h>
|
||||
@@ -584,4 +588,15 @@ ProjectExplorer::Project *projectForProjectInfo(const ProjectInfo &info)
|
||||
return ProjectExplorer::SessionManager::projectWithProjectFilePath(info.projectFilePath());
|
||||
}
|
||||
|
||||
namespace Internal {
|
||||
|
||||
void decorateCppEditor(TextEditor::TextEditorWidget *editor)
|
||||
{
|
||||
editor->textDocument()->setSyntaxHighlighter(new CppHighlighter);
|
||||
editor->textDocument()->setIndenter(
|
||||
new CppQtStyleIndenter(editor->textDocument()->document()));
|
||||
editor->setAutoCompleter(new CppAutoCompleter);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // CppEditor
|
||||
|
||||
Reference in New Issue
Block a user