Commit a2b2857b authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Erik Verbruggen

CppEditor: Rename CppPlugin to CppEditorPlugin

Change-Id: Icebf85ae425f413ed0d3dfc873869665233ec58c
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent e3ecf423
...@@ -28,8 +28,12 @@ ...@@ -28,8 +28,12 @@
****************************************************************************/ ****************************************************************************/
#include "cppeditor.h" #include "cppeditor.h"
#include "cppplugin.h"
#include <coreplugin/editormanager/editormanager.h>
#include <cplusplus/CppDocument.h>
#include <cppeditor/cppeditor.h>
#include <cppeditor/cppeditorplugin.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QCoreApplication> #include <QCoreApplication>
...@@ -136,7 +140,7 @@ void TestCase::run(const QByteArray &expected, int undoCount) ...@@ -136,7 +140,7 @@ void TestCase::run(const QByteArray &expected, int undoCount)
} }
} // anonymous namespace } // anonymous namespace
void CppPlugin::test_doxygen_comments_qt_style() void CppEditorPlugin::test_doxygen_comments_qt_style()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -155,7 +159,7 @@ void CppPlugin::test_doxygen_comments_qt_style() ...@@ -155,7 +159,7 @@ void CppPlugin::test_doxygen_comments_qt_style()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_qt_style_continuation() void CppEditorPlugin::test_doxygen_comments_qt_style_continuation()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -177,7 +181,7 @@ void CppPlugin::test_doxygen_comments_qt_style_continuation() ...@@ -177,7 +181,7 @@ void CppPlugin::test_doxygen_comments_qt_style_continuation()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_java_style() void CppEditorPlugin::test_doxygen_comments_java_style()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -196,7 +200,7 @@ void CppPlugin::test_doxygen_comments_java_style() ...@@ -196,7 +200,7 @@ void CppPlugin::test_doxygen_comments_java_style()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_java_style_continuation() void CppEditorPlugin::test_doxygen_comments_java_style_continuation()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -218,7 +222,7 @@ void CppPlugin::test_doxygen_comments_java_style_continuation() ...@@ -218,7 +222,7 @@ void CppPlugin::test_doxygen_comments_java_style_continuation()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_cpp_styleA() void CppEditorPlugin::test_doxygen_comments_cpp_styleA()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -237,7 +241,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA() ...@@ -237,7 +241,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_cpp_styleB() void CppEditorPlugin::test_doxygen_comments_cpp_styleB()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -256,7 +260,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleB() ...@@ -256,7 +260,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleB()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_cpp_styleA_continuation() void CppEditorPlugin::test_doxygen_comments_cpp_styleA_continuation()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
...@@ -279,7 +283,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_continuation() ...@@ -279,7 +283,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_continuation()
} }
/// test cpp style doxygen comment when inside a indented scope /// test cpp style doxygen comment when inside a indented scope
void CppPlugin::test_doxygen_comments_cpp_styleA_indented() void CppEditorPlugin::test_doxygen_comments_cpp_styleA_indented()
{ {
const QByteArray given = const QByteArray given =
" bool preventFolding;\n" " bool preventFolding;\n"
...@@ -299,7 +303,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_indented() ...@@ -299,7 +303,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_indented()
} }
/// test cpp style doxygen comment continuation when inside a indented scope /// test cpp style doxygen comment continuation when inside a indented scope
void CppPlugin::test_doxygen_comments_cpp_styleA_indented_continuation() void CppEditorPlugin::test_doxygen_comments_cpp_styleA_indented_continuation()
{ {
const QByteArray given = const QByteArray given =
" bool preventFolding;\n" " bool preventFolding;\n"
...@@ -321,7 +325,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_indented_continuation() ...@@ -321,7 +325,7 @@ void CppPlugin::test_doxygen_comments_cpp_styleA_indented_continuation()
data.run(expected); data.run(expected);
} }
void CppPlugin::test_doxygen_comments_cpp_styleA_corner_case() void CppEditorPlugin::test_doxygen_comments_cpp_styleA_corner_case()
{ {
const QByteArray given = const QByteArray given =
"bool preventFolding;\n" "bool preventFolding;\n"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "cppeditor.h" #include "cppeditor.h"
#include "cppeditorconstants.h" #include "cppeditorconstants.h"
#include "cppplugin.h" #include "cppeditorplugin.h"
#include "cpphighlighter.h" #include "cpphighlighter.h"
#include "cppautocompleter.h" #include "cppautocompleter.h"
#include "cppquickfixassistant.h" #include "cppquickfixassistant.h"
...@@ -659,7 +659,7 @@ void CPPEditorWidget::createToolBar(CPPEditor *editor) ...@@ -659,7 +659,7 @@ void CPPEditorWidget::createToolBar(CPPEditor *editor)
m_outlineModel = new OverviewModel(this); m_outlineModel = new OverviewModel(this);
m_proxyModel = new OverviewProxyModel(m_outlineModel, this); m_proxyModel = new OverviewProxyModel(m_outlineModel, this);
if (CppPlugin::instance()->sortedOutline()) if (CppEditorPlugin::instance()->sortedOutline())
m_proxyModel->sort(0, Qt::AscendingOrder); m_proxyModel->sort(0, Qt::AscendingOrder);
else else
m_proxyModel->sort(-1, Qt::AscendingOrder); // don't sort yet, but set column for sortedOutline() m_proxyModel->sort(-1, Qt::AscendingOrder); // don't sort yet, but set column for sortedOutline()
...@@ -671,7 +671,8 @@ void CPPEditorWidget::createToolBar(CPPEditor *editor) ...@@ -671,7 +671,8 @@ void CPPEditorWidget::createToolBar(CPPEditor *editor)
m_sortAction = new QAction(tr("Sort Alphabetically"), m_outlineCombo); m_sortAction = new QAction(tr("Sort Alphabetically"), m_outlineCombo);
m_sortAction->setCheckable(true); m_sortAction->setCheckable(true);
m_sortAction->setChecked(sortedOutline()); m_sortAction->setChecked(sortedOutline());
connect(m_sortAction, SIGNAL(toggled(bool)), CppPlugin::instance(), SLOT(setSortedOutline(bool))); connect(m_sortAction, SIGNAL(toggled(bool)),
CppEditorPlugin::instance(), SLOT(setSortedOutline(bool)));
m_outlineCombo->addAction(m_sortAction); m_outlineCombo->addAction(m_sortAction);
m_updateOutlineTimer = new QTimer(this); m_updateOutlineTimer = new QTimer(this);
...@@ -1787,7 +1788,7 @@ void CPPEditorWidget::contextMenuEvent(QContextMenuEvent *e) ...@@ -1787,7 +1788,7 @@ void CPPEditorWidget::contextMenuEvent(QContextMenuEvent *e)
createAssistInterface(TextEditor::QuickFix, TextEditor::ExplicitlyInvoked); createAssistInterface(TextEditor::QuickFix, TextEditor::ExplicitlyInvoked);
if (interface) { if (interface) {
QScopedPointer<TextEditor::IAssistProcessor> processor( QScopedPointer<TextEditor::IAssistProcessor> processor(
CppPlugin::instance()->quickFixProvider()->createProcessor()); CppEditorPlugin::instance()->quickFixProvider()->createProcessor());
QScopedPointer<TextEditor::IAssistProposal> proposal(processor->perform(interface)); QScopedPointer<TextEditor::IAssistProposal> proposal(processor->perform(interface));
if (!proposal.isNull()) { if (!proposal.isNull()) {
TextEditor::BasicProposalItemListModel *model = TextEditor::BasicProposalItemListModel *model =
...@@ -1911,7 +1912,7 @@ Core::IEditor *CPPEditor::duplicate(QWidget *parent) ...@@ -1911,7 +1912,7 @@ Core::IEditor *CPPEditor::duplicate(QWidget *parent)
{ {
CPPEditorWidget *newEditor = new CPPEditorWidget(parent); CPPEditorWidget *newEditor = new CPPEditorWidget(parent);
newEditor->duplicateFrom(editorWidget()); newEditor->duplicateFrom(editorWidget());
CppPlugin::instance()->initializeEditor(newEditor); CppEditorPlugin::instance()->initializeEditor(newEditor);
return newEditor->editor(); return newEditor->editor();
} }
......
DEFINES += CPPEDITOR_LIBRARY DEFINES += CPPEDITOR_LIBRARY
include(../../qtcreatorplugin.pri) include(../../qtcreatorplugin.pri)
HEADERS += cppplugin.h \ HEADERS += cppeditorplugin.h \
cppeditor.h \ cppautocompleter.h \
cpphighlighter.h \ cppclasswizard.h \
cpphoverhandler.h \
cppfilewizard.h \
cppeditorconstants.h \ cppeditorconstants.h \
cppeditorenums.h \ cppeditorenums.h \
cppeditor_global.h \ cppeditor_global.h \
cppclasswizard.h \ cppeditor.h \
cppoutline.h \
cpptypehierarchy.h \
cppelementevaluator.h \ cppelementevaluator.h \
cppautocompleter.h \ cppfilewizard.h \
cppsnippetprovider.h \ cppfunctiondecldeflink.h \
cpphighlighter.h \
cpphoverhandler.h \
cppoutline.h \
cppquickfixassistant.h \ cppquickfixassistant.h \
cppquickfix.h \
cppquickfixes.h \ cppquickfixes.h \
cppfunctiondecldeflink.h cppquickfix.h \
cppsnippetprovider.h \
cpptypehierarchy.h
SOURCES += cppplugin.cpp \ SOURCES += cppeditorplugin.cpp \
cppautocompleter.cpp \
cppclasswizard.cpp \
cppeditor.cpp \ cppeditor.cpp \
cppelementevaluator.cpp \
cppfilewizard.cpp \
cppfunctiondecldeflink.cpp \
cpphighlighter.cpp \ cpphighlighter.cpp \
cpphoverhandler.cpp \ cpphoverhandler.cpp \
cppfilewizard.cpp \
cppclasswizard.cpp \
cppquickfixes.cpp \
cppoutline.cpp \ cppoutline.cpp \
cpptypehierarchy.cpp \
cppelementevaluator.cpp \
cppautocompleter.cpp \
cppsnippetprovider.cpp \
cppquickfixassistant.cpp \ cppquickfixassistant.cpp \
cppquickfix.cpp \ cppquickfix.cpp \
cppfunctiondecldeflink.cpp cppquickfixes.cpp \
cppsnippetprovider.cpp \
cpptypehierarchy.cpp
RESOURCES += cppeditor.qrc RESOURCES += cppeditor.qrc
OTHER_FILES += CppEditor.mimetypes.xml OTHER_FILES += CppEditor.mimetypes.xml
......
...@@ -23,12 +23,14 @@ QtcPlugin { ...@@ -23,12 +23,14 @@ QtcPlugin {
"cppautocompleter.h", "cppautocompleter.h",
"cppclasswizard.cpp", "cppclasswizard.cpp",
"cppclasswizard.h", "cppclasswizard.h",
"cppeditorconstants.h",
"cppeditor.cpp", "cppeditor.cpp",
"cppeditorenums.h",
"cppeditor_global.h",
"cppeditor.h", "cppeditor.h",
"cppeditorplugin.cpp",
"cppeditorplugin.h",
"cppeditor.qrc", "cppeditor.qrc",
"cppeditor_global.h",
"cppeditorconstants.h",
"cppeditorenums.h",
"cppelementevaluator.cpp", "cppelementevaluator.cpp",
"cppelementevaluator.h", "cppelementevaluator.h",
"cppfilewizard.cpp", "cppfilewizard.cpp",
...@@ -41,14 +43,12 @@ QtcPlugin { ...@@ -41,14 +43,12 @@ QtcPlugin {
"cpphoverhandler.h", "cpphoverhandler.h",
"cppoutline.cpp", "cppoutline.cpp",
"cppoutline.h", "cppoutline.h",
"cppplugin.cpp",
"cppplugin.h",
"cppquickfix.cpp",
"cppquickfix.h",
"cppquickfixassistant.cpp", "cppquickfixassistant.cpp",
"cppquickfixassistant.h", "cppquickfixassistant.h",
"cppquickfix.cpp",
"cppquickfixes.cpp", "cppquickfixes.cpp",
"cppquickfixes.h", "cppquickfixes.h",
"cppquickfix.h",
"cppsnippetprovider.cpp", "cppsnippetprovider.cpp",
"cppsnippetprovider.h", "cppsnippetprovider.h",
"cpptypehierarchy.cpp", "cpptypehierarchy.cpp",
...@@ -58,9 +58,9 @@ QtcPlugin { ...@@ -58,9 +58,9 @@ QtcPlugin {
Group { Group {
condition: Defaults.testsEnabled(qbs) condition: Defaults.testsEnabled(qbs)
files: [ files: [
"cppquickfix_test.cpp",
"cppdoxygen_test.cpp", "cppdoxygen_test.cpp",
"fileandtokenactions_test.cpp" "cppquickfix_test.cpp",
"fileandtokenactions_test.cpp",
] ]
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"']) cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
......
...@@ -34,8 +34,8 @@ namespace CppEditor { ...@@ -34,8 +34,8 @@ namespace CppEditor {
namespace Constants { namespace Constants {
const char M_CONTEXT[] = "CppEditor.ContextMenu"; const char M_CONTEXT[] = "CppEditor.ContextMenu";
const char C_CPPEDITOR[] = "CppPlugin.C++Editor"; const char C_CPPEDITOR[] = "CppEditor.C++Editor";
const char CPPEDITOR_ID[] = "CppPlugin.C++Editor"; const char CPPEDITOR_ID[] = "CppEditor.C++Editor";
const char CPPEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor"); const char CPPEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
const char SWITCH_DECLARATION_DEFINITION[] = "CppEditor.SwitchDeclarationDefinition"; const char SWITCH_DECLARATION_DEFINITION[] = "CppEditor.SwitchDeclarationDefinition";
const char OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT[] = "CppEditor.OpenDeclarationDefinitionInNextSplit"; const char OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT[] = "CppEditor.OpenDeclarationDefinitionInNextSplit";
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include "cppplugin.h" #include "cppeditorplugin.h"
#include "cppclasswizard.h" #include "cppclasswizard.h"
#include "cppeditor.h" #include "cppeditor.h"
...@@ -65,7 +65,7 @@ enum { QUICKFIX_INTERVAL = 20 }; ...@@ -65,7 +65,7 @@ enum { QUICKFIX_INTERVAL = 20 };
//////////////////////////// CppEditorFactory ///////////////////////////// //////////////////////////// CppEditorFactory /////////////////////////////
CppEditorFactory::CppEditorFactory(CppPlugin *owner) : CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) :
m_owner(owner) m_owner(owner)
{ {
m_mimeTypes << QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE) m_mimeTypes << QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE)
...@@ -108,11 +108,11 @@ QStringList CppEditorFactory::mimeTypes() const ...@@ -108,11 +108,11 @@ QStringList CppEditorFactory::mimeTypes() const
return m_mimeTypes; return m_mimeTypes;
} }
///////////////////////////////// CppPlugin ////////////////////////////////// ///////////////////////////////// CppEditorPlugin //////////////////////////////////
CppPlugin *CppPlugin::m_instance = 0; CppEditorPlugin *CppEditorPlugin::m_instance = 0;
CppPlugin::CppPlugin() : CppEditorPlugin::CppEditorPlugin() :
m_actionHandler(0), m_actionHandler(0),
m_sortedOutline(false), m_sortedOutline(false),
m_renameSymbolUnderCursorAction(0), m_renameSymbolUnderCursorAction(0),
...@@ -124,18 +124,18 @@ CppPlugin::CppPlugin() : ...@@ -124,18 +124,18 @@ CppPlugin::CppPlugin() :
m_instance = this; m_instance = this;
} }
CppPlugin::~CppPlugin() CppEditorPlugin::~CppEditorPlugin()
{ {
delete m_actionHandler; delete m_actionHandler;
m_instance = 0; m_instance = 0;
} }
CppPlugin *CppPlugin::instance() CppEditorPlugin *CppEditorPlugin::instance()
{ {
return m_instance; return m_instance;
} }
void CppPlugin::initializeEditor(CPPEditorWidget *editor) void CppEditorPlugin::initializeEditor(CPPEditorWidget *editor)
{ {
m_actionHandler->setupActions(editor); m_actionHandler->setupActions(editor);
...@@ -147,23 +147,23 @@ void CppPlugin::initializeEditor(CPPEditorWidget *editor) ...@@ -147,23 +147,23 @@ void CppPlugin::initializeEditor(CPPEditorWidget *editor)
editor, SLOT(setSortedOutline(bool))); editor, SLOT(setSortedOutline(bool)));
} }
void CppPlugin::setSortedOutline(bool sorted) void CppEditorPlugin::setSortedOutline(bool sorted)
{ {
m_sortedOutline = sorted; m_sortedOutline = sorted;
emit outlineSortingChanged(sorted); emit outlineSortingChanged(sorted);
} }
bool CppPlugin::sortedOutline() const bool CppEditorPlugin::sortedOutline() const
{ {
return m_sortedOutline; return m_sortedOutline;
} }
CppQuickFixAssistProvider *CppPlugin::quickFixProvider() const CppQuickFixAssistProvider *CppEditorPlugin::quickFixProvider() const
{ {
return m_quickFixProvider; return m_quickFixProvider;
} }
bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
{ {
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/cppeditor/CppEditor.mimetypes.xml"), errorMessage)) if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/cppeditor/CppEditor.mimetypes.xml"), errorMessage))
return false; return false;
...@@ -301,55 +301,55 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess ...@@ -301,55 +301,55 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
return true; return true;
} }
void CppPlugin::readSettings() void CppEditorPlugin::readSettings()
{ {
m_sortedOutline = Core::ICore::settings()->value(QLatin1String("CppTools/SortedMethodOverview"), false).toBool(); m_sortedOutline = Core::ICore::settings()->value(QLatin1String("CppTools/SortedMethodOverview"), false).toBool();
} }
void CppPlugin::writeSettings() void CppEditorPlugin::writeSettings()
{ {
Core::ICore::settings()->setValue(QLatin1String("CppTools/SortedMethodOverview"), m_sortedOutline); Core::ICore::settings()->setValue(QLatin1String("CppTools/SortedMethodOverview"), m_sortedOutline);
} }
void CppPlugin::extensionsInitialized() void CppEditorPlugin::extensionsInitialized()
{ {
} }
ExtensionSystem::IPlugin::ShutdownFlag CppPlugin::aboutToShutdown() ExtensionSystem::IPlugin::ShutdownFlag CppEditorPlugin::aboutToShutdown()
{ {
writeSettings(); writeSettings();
return SynchronousShutdown; return SynchronousShutdown;
} }
void CppPlugin::switchDeclarationDefinition() void CppEditorPlugin::switchDeclarationDefinition()
{ {
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget()); CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
if (editor) if (editor)
editor->switchDeclarationDefinition(/*inNextSplit*/ false); editor->switchDeclarationDefinition(/*inNextSplit*/ false);
} }
void CppPlugin::openDeclarationDefinitionInNextSplit() void CppEditorPlugin::openDeclarationDefinitionInNextSplit()
{ {
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget()); CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
if (editor) if (editor)
editor->switchDeclarationDefinition(/*inNextSplit*/ true); editor->switchDeclarationDefinition(/*inNextSplit*/ true);
} }
void CppPlugin::renameSymbolUnderCursor() void CppEditorPlugin::renameSymbolUnderCursor()
{ {
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget()); CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
if (editor) if (editor)
editor->renameSymbolUnderCursor(); editor->renameSymbolUnderCursor();
} }
void CppPlugin::findUsages() void CppEditorPlugin::findUsages()
{ {
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget()); CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
if (editor) if (editor)
editor->findUsages(); editor->findUsages();
} }
void CppPlugin::onTaskStarted(const QString &type) void CppEditorPlugin::onTaskStarted(const QString &type)
{ {
if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) { if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) {
m_renameSymbolUnderCursorAction->setEnabled(false); m_renameSymbolUnderCursorAction->setEnabled(false);
...@@ -359,7 +359,7 @@ void CppPlugin::onTaskStarted(const QString &type) ...@@ -359,7 +359,7 @@ void CppPlugin::onTaskStarted(const QString &type)
} }
} }
void CppPlugin::onAllTasksFinished(const QString &type) void CppEditorPlugin::onAllTasksFinished(const QString &type)
{ {
if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) { if (type == QLatin1String(CppTools::Constants::TASK_INDEX)) {
m_renameSymbolUnderCursorAction->setEnabled(true); m_renameSymbolUnderCursorAction->setEnabled(true);
...@@ -369,7 +369,7 @@ void CppPlugin::onAllTasksFinished(const QString &type) ...@@ -369,7 +369,7 @@ void CppPlugin::onAllTasksFinished(const QString &type)
} }
} }
void CppPlugin::currentEditorChanged(Core::IEditor *editor) void CppEditorPlugin::currentEditorChanged(Core::IEditor *editor)
{ {
if (! editor) if (! editor)
return; return;
...@@ -379,7 +379,7 @@ void CppPlugin::currentEditorChanged(Core::IEditor *editor) ...@@ -379,7 +379,7 @@ void CppPlugin::currentEditorChanged(Core::IEditor *editor)
} }
} }
void CppPlugin::openTypeHierarchy() void CppEditorPlugin::openTypeHierarchy()
{ {
CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget()); CPPEditorWidget *editor = qobject_cast<CPPEditorWidget*>(Core::EditorManager::currentEditor()->widget());
if (editor) { if (editor) {
...@@ -389,4 +389,4 @@ void CppPlugin::openTypeHierarchy()