Commit b772001c authored by hjk's avatar hjk

EditorFactory: Replace some virtual functions with data members

Change-Id: I014cb57460c4e3a36bf7403960908b5ffec867ff
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent be112d85
...@@ -44,21 +44,9 @@ AndroidManifestEditorFactory::AndroidManifestEditorFactory(QObject *parent) ...@@ -44,21 +44,9 @@ AndroidManifestEditorFactory::AndroidManifestEditorFactory(QObject *parent)
: Core::IEditorFactory(parent), : Core::IEditorFactory(parent),
m_actionHandler(new TextEditor::TextEditorActionHandler(Constants::ANDROID_MANIFEST_EDITOR_CONTEXT)) m_actionHandler(new TextEditor::TextEditorActionHandler(Constants::ANDROID_MANIFEST_EDITOR_CONTEXT))
{ {
} setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
setDisplayName(tr("Android Manifest editor"));
QStringList AndroidManifestEditorFactory::mimeTypes() const addMimeType(Constants::ANDROID_MANIFEST_MIME_TYPE);
{
return QStringList() << QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE);
}
Core::Id AndroidManifestEditorFactory::id() const
{
return Constants::ANDROID_MANIFEST_EDITOR_ID;
}
QString AndroidManifestEditorFactory::displayName() const
{
return tr("Android Manifest editor");
} }
Core::IEditor *AndroidManifestEditorFactory::createEditor(QWidget *parent) Core::IEditor *AndroidManifestEditorFactory::createEditor(QWidget *parent)
......
...@@ -40,14 +40,12 @@ namespace Internal { ...@@ -40,14 +40,12 @@ namespace Internal {
class AndroidManifestEditorFactory : public Core::IEditorFactory class AndroidManifestEditorFactory : public Core::IEditorFactory
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AndroidManifestEditorFactory(QObject *parent = 0); explicit AndroidManifestEditorFactory(QObject *parent = 0);
QStringList mimeTypes() const;
Core::Id id() const;
QString displayName() const;
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
private: private:
TextEditor::TextEditorActionHandler *m_actionHandler; TextEditor::TextEditorActionHandler *m_actionHandler;
}; };
......
...@@ -402,19 +402,11 @@ private: ...@@ -402,19 +402,11 @@ private:
///////////////////////////////// BinEditorFactory ////////////////////////////////// ///////////////////////////////// BinEditorFactory //////////////////////////////////
BinEditorFactory::BinEditorFactory(BinEditorPlugin *owner) : BinEditorFactory::BinEditorFactory(BinEditorPlugin *owner) :
m_mimeTypes(QLatin1String(Constants::C_BINEDITOR_MIMETYPE)),
m_owner(owner) m_owner(owner)
{ {
} setId(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
setDisplayName(qApp->translate("OpenWith::Editors", Constants::C_BINEDITOR_DISPLAY_NAME));
Core::Id BinEditorFactory::id() const addMimeType(Constants::C_BINEDITOR_MIMETYPE);
{
return Core::Id(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
}
QString BinEditorFactory::displayName() const
{
return qApp->translate("OpenWith::Editors", Constants::C_BINEDITOR_DISPLAY_NAME);
} }
Core::IEditor *BinEditorFactory::createEditor(QWidget *parent) Core::IEditor *BinEditorFactory::createEditor(QWidget *parent)
...@@ -426,10 +418,6 @@ Core::IEditor *BinEditorFactory::createEditor(QWidget *parent) ...@@ -426,10 +418,6 @@ Core::IEditor *BinEditorFactory::createEditor(QWidget *parent)
return editor; return editor;
} }
QStringList BinEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
/*! /*!
\class BINEditor::BinEditorWidgetFactory \class BINEditor::BinEditorWidgetFactory
......
...@@ -102,13 +102,9 @@ class BinEditorFactory : public Core::IEditorFactory ...@@ -102,13 +102,9 @@ class BinEditorFactory : public Core::IEditorFactory
public: public:
explicit BinEditorFactory(BinEditorPlugin *owner); explicit BinEditorFactory(BinEditorPlugin *owner);
QStringList mimeTypes() const;
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
Core::Id id() const;
QString displayName() const;
private: private:
const QStringList m_mimeTypes;
BinEditorPlugin *m_owner; BinEditorPlugin *m_owner;
}; };
......
...@@ -43,12 +43,15 @@ using namespace CMakeProjectManager; ...@@ -43,12 +43,15 @@ using namespace CMakeProjectManager;
using namespace CMakeProjectManager::Internal; using namespace CMakeProjectManager::Internal;
CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager) CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager)
: m_mimeTypes(QStringList() << QLatin1String(CMakeProjectManager::Constants::CMAKEMIMETYPE)), : m_manager(manager)
m_manager(manager)
{ {
using namespace Core; using namespace Core;
using namespace TextEditor; using namespace TextEditor;
setId(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
setDisplayName(tr(CMakeProjectManager::Constants::CMAKE_EDITOR_DISPLAY_NAME));
addMimeType(CMakeProjectManager::Constants::CMAKEMIMETYPE);
m_actionHandler = m_actionHandler =
new TextEditorActionHandler(Constants::C_CMAKEEDITOR, new TextEditorActionHandler(Constants::C_CMAKEEDITOR,
TextEditorActionHandler::UnCommentSelection TextEditorActionHandler::UnCommentSelection
...@@ -67,24 +70,9 @@ CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager) ...@@ -67,24 +70,9 @@ CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager)
contextMenu->addAction(cmd); contextMenu->addAction(cmd);
} }
Core::Id CMakeEditorFactory::id() const
{
return Core::Id(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
}
QString CMakeEditorFactory::displayName() const
{
return tr(CMakeProjectManager::Constants::CMAKE_EDITOR_DISPLAY_NAME);
}
Core::IEditor *CMakeEditorFactory::createEditor(QWidget *parent) Core::IEditor *CMakeEditorFactory::createEditor(QWidget *parent)
{ {
CMakeEditorWidget *rc = new CMakeEditorWidget(parent, this, m_actionHandler); CMakeEditorWidget *rc = new CMakeEditorWidget(parent, this, m_actionHandler);
TextEditor::TextEditorSettings::instance()->initializeEditor(rc); TextEditor::TextEditorSettings::instance()->initializeEditor(rc);
return rc->editor(); return rc->editor();
} }
QStringList CMakeEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
...@@ -34,11 +34,7 @@ ...@@ -34,11 +34,7 @@
#include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/editormanager/ieditorfactory.h>
#include <QStringList> namespace TextEditor { class TextEditorActionHandler; }
namespace TextEditor {
class TextEditorActionHandler;
}
namespace CMakeProjectManager { namespace CMakeProjectManager {
namespace Internal { namespace Internal {
...@@ -49,11 +45,6 @@ class CMakeEditorFactory : public Core::IEditorFactory ...@@ -49,11 +45,6 @@ class CMakeEditorFactory : public Core::IEditorFactory
public: public:
CMakeEditorFactory(CMakeManager *parent); CMakeEditorFactory(CMakeManager *parent);
// IEditorFactory
QStringList mimeTypes() const;
Core::Id id() const;
QString displayName() const;
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
private: private:
......
...@@ -30,18 +30,14 @@ ...@@ -30,18 +30,14 @@
#ifndef IDOCUMENTFACTORY_H #ifndef IDOCUMENTFACTORY_H
#define IDOCUMENTFACTORY_H #define IDOCUMENTFACTORY_H
#include "core_global.h" #include "id.h"
#include <QObject> #include <QObject>
#include <QStringList>
QT_BEGIN_NAMESPACE
class QStringList;
QT_END_NAMESPACE
namespace Core { namespace Core {
class IDocument; class IDocument;
class Id;
class CORE_EXPORT IDocumentFactory : public QObject class CORE_EXPORT IDocumentFactory : public QObject
{ {
...@@ -50,10 +46,23 @@ class CORE_EXPORT IDocumentFactory : public QObject ...@@ -50,10 +46,23 @@ class CORE_EXPORT IDocumentFactory : public QObject
public: public:
IDocumentFactory(QObject *parent = 0) : QObject(parent) {} IDocumentFactory(QObject *parent = 0) : QObject(parent) {}
virtual QStringList mimeTypes() const = 0;
virtual Id id() const = 0;
virtual QString displayName() const = 0;
virtual IDocument *open(const QString &fileName) = 0; virtual IDocument *open(const QString &fileName) = 0;
Id id() const { return m_id; }
QStringList mimeTypes() const { return m_mimeTypes; }
QString displayName() const { return m_displayName; }
protected:
void setId(Id id) { m_id = id; }
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
void setMimeTypes(const QStringList &mimeTypes) { m_mimeTypes = mimeTypes; }
void addMimeType(const char *mimeType) { m_mimeTypes.append(QLatin1String(mimeType)); }
void addMimeType(const QString &mimeType) { m_mimeTypes.append(mimeType); }
private:
Id m_id;
QStringList m_mimeTypes;
QString m_displayName;
}; };
} // namespace Core } // namespace Core
......
...@@ -68,10 +68,12 @@ enum { QUICKFIX_INTERVAL = 20 }; ...@@ -68,10 +68,12 @@ enum { QUICKFIX_INTERVAL = 20 };
CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) : CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) :
m_owner(owner) m_owner(owner)
{ {
m_mimeTypes << QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE) setId(CppEditor::Constants::CPPEDITOR_ID);
<< QLatin1String(CppEditor::Constants::C_HEADER_MIMETYPE) setDisplayName(qApp->translate("OpenWith::Editors", CppEditor::Constants::CPPEDITOR_DISPLAY_NAME));
<< QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE) addMimeType(CppEditor::Constants::C_SOURCE_MIMETYPE);
<< QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE); addMimeType(CppEditor::Constants::C_HEADER_MIMETYPE);
addMimeType(CppEditor::Constants::CPP_SOURCE_MIMETYPE);
addMimeType(CppEditor::Constants::CPP_HEADER_MIMETYPE);
if (!Utils::HostOsInfo::isMacHost() && !Utils::HostOsInfo::isWindowsHost()) { if (!Utils::HostOsInfo::isMacHost() && !Utils::HostOsInfo::isWindowsHost()) {
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance(); Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
...@@ -85,16 +87,6 @@ CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) : ...@@ -85,16 +87,6 @@ CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) :
} }
} }
Core::Id CppEditorFactory::id() const
{
return Core::Id(CppEditor::Constants::CPPEDITOR_ID);
}
QString CppEditorFactory::displayName() const
{
return qApp->translate("OpenWith::Editors", CppEditor::Constants::CPPEDITOR_DISPLAY_NAME);
}
Core::IEditor *CppEditorFactory::createEditor(QWidget *parent) Core::IEditor *CppEditorFactory::createEditor(QWidget *parent)
{ {
CPPEditorWidget *editor = new CPPEditorWidget(parent); CPPEditorWidget *editor = new CPPEditorWidget(parent);
...@@ -103,11 +95,6 @@ Core::IEditor *CppEditorFactory::createEditor(QWidget *parent) ...@@ -103,11 +95,6 @@ Core::IEditor *CppEditorFactory::createEditor(QWidget *parent)
return editor->editor(); return editor->editor();
} }
QStringList CppEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
///////////////////////////////// CppEditorPlugin ////////////////////////////////// ///////////////////////////////// CppEditorPlugin //////////////////////////////////
CppEditorPlugin *CppEditorPlugin::m_instance = 0; CppEditorPlugin *CppEditorPlugin::m_instance = 0;
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
#include <QtPlugin> #include <QtPlugin>
#include <QStringList>
#include <QAction> #include <QAction>
namespace TextEditor { namespace TextEditor {
...@@ -286,15 +285,10 @@ class CppEditorFactory : public Core::IEditorFactory ...@@ -286,15 +285,10 @@ class CppEditorFactory : public Core::IEditorFactory
public: public:
CppEditorFactory(CppEditorPlugin *owner); CppEditorFactory(CppEditorPlugin *owner);
// IEditorFactory
QStringList mimeTypes() const;
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
Core::Id id() const;
QString displayName() const;
private: private:
CppEditorPlugin *m_owner; CppEditorPlugin *m_owner;
QStringList m_mimeTypes;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -48,24 +48,17 @@ namespace Designer { ...@@ -48,24 +48,17 @@ namespace Designer {
namespace Internal { namespace Internal {
FormEditorFactory::FormEditorFactory() FormEditorFactory::FormEditorFactory()
: Core::IEditorFactory(Core::ICore::instance()), : Core::IEditorFactory(Core::ICore::instance())
m_mimeTypes(QLatin1String(FORM_MIMETYPE))
{ {
setId(K_DESIGNER_XML_EDITOR_ID);
setDisplayName(qApp->translate("Designer", C_DESIGNER_XML_DISPLAY_NAME));
addMimeType(FORM_MIMETYPE);
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance(); Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(":/formeditor/images/qt_ui.png")), iconProvider->registerIconOverlayForSuffix(QIcon(QLatin1String(":/formeditor/images/qt_ui.png")),
QLatin1String("ui")); QLatin1String("ui"));
} }
Core::Id FormEditorFactory::id() const
{
return Core::Id(K_DESIGNER_XML_EDITOR_ID);
}
QString FormEditorFactory::displayName() const
{
return qApp->translate("Designer", C_DESIGNER_XML_DISPLAY_NAME);
}
Core::IEditor *FormEditorFactory::createEditor(QWidget *parent) Core::IEditor *FormEditorFactory::createEditor(QWidget *parent)
{ {
const EditorData data = FormEditorW::instance()->createEditor(parent); const EditorData data = FormEditorW::instance()->createEditor(parent);
...@@ -78,11 +71,6 @@ Core::IEditor *FormEditorFactory::createEditor(QWidget *parent) ...@@ -78,11 +71,6 @@ Core::IEditor *FormEditorFactory::createEditor(QWidget *parent)
return data.formWindowEditor; return data.formWindowEditor;
} }
QStringList FormEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
void FormEditorFactory::designerModeClicked() void FormEditorFactory::designerModeClicked()
{ {
Core::ModeManager::activateMode(Core::Constants::MODE_DESIGN); Core::ModeManager::activateMode(Core::Constants::MODE_DESIGN);
...@@ -90,5 +78,3 @@ void FormEditorFactory::designerModeClicked() ...@@ -90,5 +78,3 @@ void FormEditorFactory::designerModeClicked()
} // namespace Internal } // namespace Internal
} // namespace Designer } // namespace Designer
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/editormanager/ieditorfactory.h>
#include <QStringList>
namespace Designer { namespace Designer {
namespace Internal { namespace Internal {
...@@ -44,17 +42,10 @@ class FormEditorFactory : public Core::IEditorFactory ...@@ -44,17 +42,10 @@ class FormEditorFactory : public Core::IEditorFactory
public: public:
FormEditorFactory(); FormEditorFactory();
// IEditorFactory
QStringList mimeTypes() const;
Core::Id id() const;
QString displayName() const;
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
private slots: private slots:
void designerModeClicked(); void designerModeClicked();
private:
const QStringList m_mimeTypes;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
namespace DiffEditor { namespace DiffEditor {
namespace Internal { namespace Internal {
DiffEditorPlugin::DiffEditorPlugin() DiffEditorPlugin::DiffEditorPlugin()
......
...@@ -54,9 +54,11 @@ ProjectFilesFactory::ProjectFilesFactory(Manager *manager, TextEditorActionHandl ...@@ -54,9 +54,11 @@ ProjectFilesFactory::ProjectFilesFactory(Manager *manager, TextEditorActionHandl
: Core::IEditorFactory(manager), : Core::IEditorFactory(manager),
m_actionHandler(handler) m_actionHandler(handler)
{ {
m_mimeTypes.append(QLatin1String(Constants::FILES_MIMETYPE)); setId(Constants::FILES_EDITOR_ID);
m_mimeTypes.append(QLatin1String(Constants::INCLUDES_MIMETYPE)); setDisplayName(QCoreApplication::translate("OpenWith::Editors", ".files Editor"));
m_mimeTypes.append(QLatin1String(Constants::CONFIG_MIMETYPE)); addMimeType(Constants::FILES_MIMETYPE);
addMimeType(Constants::INCLUDES_MIMETYPE);
addMimeType(Constants::CONFIG_MIMETYPE);
} }
Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent) Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
...@@ -66,21 +68,6 @@ Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent) ...@@ -66,21 +68,6 @@ Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
return ed->editor(); return ed->editor();
} }
QStringList ProjectFilesFactory::mimeTypes() const
{
return m_mimeTypes;
}
Core::Id ProjectFilesFactory::id() const
{
return Core::Id(Constants::FILES_EDITOR_ID);
}
QString ProjectFilesFactory::displayName() const
{
return QCoreApplication::translate("OpenWith::Editors", ".files Editor");
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// //
// ProjectFilesEditable // ProjectFilesEditable
......
...@@ -56,13 +56,8 @@ public: ...@@ -56,13 +56,8 @@ public:
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
QStringList mimeTypes() const;
Core::Id id() const;
QString displayName() const;
private: private:
TextEditor::TextEditorActionHandler *m_actionHandler; TextEditor::TextEditorActionHandler *m_actionHandler;
QStringList m_mimeTypes;
}; };
class ProjectFilesEditor : public TextEditor::BaseTextEditor class ProjectFilesEditor : public TextEditor::BaseTextEditor
......
...@@ -37,14 +37,9 @@ ...@@ -37,14 +37,9 @@
#include <extensionsystem/pluginspec.h> #include <extensionsystem/pluginspec.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
#include <QCoreApplication> #include <QCoreApplication>
#include <QFileInfo>
#include <QDebug>
#include <QSettings> #include <QSettings>
#include <QMessageBox>
#include <QPushButton>
using namespace GLSLEditor::Internal; using namespace GLSLEditor::Internal;
using namespace GLSLEditor::Constants; using namespace GLSLEditor::Constants;
...@@ -52,23 +47,13 @@ using namespace GLSLEditor::Constants; ...@@ -52,23 +47,13 @@ using namespace GLSLEditor::Constants;
GLSLEditorFactory::GLSLEditorFactory(QObject *parent) GLSLEditorFactory::GLSLEditorFactory(QObject *parent)
: Core::IEditorFactory(parent) : Core::IEditorFactory(parent)
{ {
m_mimeTypes setId(C_GLSLEDITOR_ID);
<< QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE) setDisplayName(qApp->translate("OpenWith::Editors", C_GLSLEDITOR_DISPLAY_NAME));
<< QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT) addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE);
<< QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG) addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_VERT);
<< QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES) addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG);
<< QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES) addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES);
; addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES);
}
Core::Id GLSLEditorFactory::id() const
{
return Core::Id(C_GLSLEDITOR_ID);
}
QString GLSLEditorFactory::displayName() const
{
return qApp->translate("OpenWith::Editors", C_GLSLEDITOR_DISPLAY_NAME);
} }
Core::IEditor *GLSLEditorFactory::createEditor(QWidget *parent) Core::IEditor *GLSLEditorFactory::createEditor(QWidget *parent)
...@@ -78,11 +63,6 @@ Core::IEditor *GLSLEditorFactory::createEditor(QWidget *parent) ...@@ -78,11 +63,6 @@ Core::IEditor *GLSLEditorFactory::createEditor(QWidget *parent)
return rc->editor(); return rc->editor();
} }
QStringList GLSLEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
void GLSLEditorFactory::updateEditorInfoBar(Core::IEditor *) void GLSLEditorFactory::updateEditorInfoBar(Core::IEditor *)
{ {
} }
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/editormanager/ieditorfactory.h>
#include <QStringList>
namespace GLSLEditor { namespace GLSLEditor {
namespace Internal { namespace Internal {
...@@ -44,17 +42,10 @@ class GLSLEditorFactory : public Core::IEditorFactory ...@@ -44,17 +42,10 @@ class GLSLEditorFactory : public Core::IEditorFactory
public: public:
GLSLEditorFactory(QObject *parent); GLSLEditorFactory(QObject *parent);
// IEditorFactory
QStringList mimeTypes() const;
Core::Id id() const;
QString displayName() const;
Core::IEditor *createEditor(QWidget *parent); Core::IEditor *createEditor(QWidget *parent);
private slots: private slots:
void updateEditorInfoBar(Core::IEditor *editor