Commit c9889120 authored by con's avatar con
Browse files

Fixes: - Rename ActionManagerInterface --> ActionManager

Details:  - To make it conform to naming convention.
parent 2562b09f
......@@ -46,7 +46,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
......
......@@ -42,7 +42,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <QtCore/qplugin.h>
#include <QtCore/QDebug>
......@@ -68,7 +68,7 @@ void BookmarksPlugin::extensionsInitialized()
bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
{
m_core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>();
Core::ActionManagerInterface *am = m_core->actionManager();
Core::ActionManager *am = m_core->actionManager();
QList<int> context = QList<int>() << m_core->uniqueIDManager()->
uniqueIdentifier(Constants::BOOKMARKS_CONTEXT);
......
......@@ -52,15 +52,15 @@ namespace {
}
/*!
\class Core::ActionManagerInterface
\class Core::ActionManager
\mainclass
\ingroup qwb
\inheaderfile actionmanagerinterface.h
\inheaderfile actionmanager.h
\brief All actions should be registered in the ActionManager, since this enables the user to
e.g. change their shortcuts at a central place.
The ActionManagerInterface is the central bookkeeper of actions and their shortcuts and layout.
The ActionManager is the central bookkeeper of actions and their shortcuts and layout.
You get the only implementation of this class from the core interface (ICore::actionManager()).
The main reasons for the need of this class is to provide a central place where the user
......@@ -94,52 +94,52 @@ namespace {
*/
/*!
\fn virtual IActionContainer *ActionManagerInterface::createMenu(const QString &id) = 0
\fn virtual IActionContainer *ActionManager::createMenu(const QString &id) = 0
...
*/
/*!
\fn virtual IActionContainer *ActionManagerInterface::createMenuBar(const QString &id) = 0
\fn virtual IActionContainer *ActionManager::createMenuBar(const QString &id) = 0
...
*/
/*!
\fn virtual ICommand *ActionManagerInterface::registerAction(QAction *action, const QString &id, const QList<int> &context) = 0
\fn virtual ICommand *ActionManager::registerAction(QAction *action, const QString &id, const QList<int> &context) = 0
...
*/
/*!
\fn virtual ICommand *ActionManagerInterface::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0
\fn virtual ICommand *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0
...
*/
/*!
\fn virtual ICommand *ActionManagerInterface::registerAction(QAction *action, const QString &id) = 0
\fn virtual ICommand *ActionManager::registerAction(QAction *action, const QString &id) = 0
...
*/
/*!
\fn virtual void ActionManagerInterface::addAction(ICommand *action, const QString &globalGroup) = 0
\fn virtual void ActionManager::addAction(ICommand *action, const QString &globalGroup) = 0
...
*/
/*!
\fn virtual void ActionManagerInterface::addMenu(IActionContainer *menu, const QString &globalGroup) = 0
\fn virtual void ActionManager::addMenu(IActionContainer *menu, const QString &globalGroup) = 0
...
*/
/*!
\fn virtual ICommand *ActionManagerInterface::command(const QString &id) const = 0
\fn virtual ICommand *ActionManager::command(const QString &id) const = 0
...
*/
/*!
\fn virtual IActionContainer *ActionManagerInterface::actionContainer(const QString &id) const = 0
\fn virtual IActionContainer *ActionManager::actionContainer(const QString &id) const = 0
...
*/
/*!
\fn virtual ActionManagerInterface::~ActionManagerInterface()
\fn virtual ActionManager::~ActionManager()
...
*/
......@@ -160,7 +160,7 @@ ActionManagerPrivate* ActionManagerPrivate::m_instance = 0;
...
*/
ActionManagerPrivate::ActionManagerPrivate(MainWindow *mainWnd, UniqueIDManager *uidmgr) :
ActionManagerInterface(mainWnd),
ActionManager(mainWnd),
m_mainWnd(mainWnd)
{
m_defaultGroups << uidmgr->uniqueIdentifier(Constants::G_DEFAULT_ONE);
......
......@@ -31,8 +31,8 @@
**
***************************************************************************/
#ifndef ACTIONMANAGERINTERFACE_H
#define ACTIONMANAGERINTERFACE_H
#ifndef ACTIONMANAGER_H
#define ACTIONMANAGER_H
#include "coreplugin/core_global.h"
......@@ -50,12 +50,12 @@ QT_END_NAMESPACE
namespace Core {
class CORE_EXPORT ActionManagerInterface : public QObject
class CORE_EXPORT ActionManager : public QObject
{
Q_OBJECT
public:
ActionManagerInterface(QObject *parent = 0) : QObject(parent) {}
virtual ~ActionManagerInterface() {}
ActionManager(QObject *parent = 0) : QObject(parent) {}
virtual ~ActionManager() {}
virtual IActionContainer *createMenu(const QString &id) = 0;
virtual IActionContainer *createMenuBar(const QString &id) = 0;
......@@ -74,4 +74,4 @@ public:
} // namespace Core
#endif // ACTIONMANAGERINTERFACE_H
#endif // ACTIONMANAGER_H
......@@ -34,7 +34,7 @@
#ifndef ACTIONMANAGERPRIVATE_H
#define ACTIONMANAGERPRIVATE_H
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <QtCore/QMap>
#include <QtCore/QHash>
......@@ -60,7 +60,7 @@ class ActionContainer;
class MainWindow;
class Command;
class ActionManagerPrivate : public Core::ActionManagerInterface
class ActionManagerPrivate : public Core::ActionManager
{
Q_OBJECT
......
......@@ -64,7 +64,7 @@ void CoreImpl::showOptionsDialog(const QString &group, const QString &page)
m_mainwindow->showOptionsDialog(group, page);
}
ActionManagerInterface *CoreImpl::actionManager() const
ActionManager *CoreImpl::actionManager() const
{
return m_mainwindow->actionManager();
}
......
......@@ -56,7 +56,7 @@ public:
void showOptionsDialog(const QString &group = QString(),
const QString &page = QString());
ActionManagerInterface *actionManager() const;
ActionManager *actionManager() const;
FileManager *fileManager() const ;
UniqueIDManager *uniqueIDManager() const;
MessageManager *messageManager() const;
......
......@@ -99,7 +99,7 @@ HEADERS += mainwindow.h \
editormanager/ieditor.h \
editormanager/ieditorfactory.h \
actionmanager/iactioncontainer.h \
actionmanager/actionmanagerinterface.h \
actionmanager/actionmanager.h \
actionmanager/icommand.h \
actionmanager/actionmanager_p.h \
actionmanager/command.h \
......
......@@ -48,7 +48,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/baseview.h>
#include <coreplugin/imode.h>
......@@ -207,7 +207,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
const QList<int> editManagerContext =
QList<int>() << m_d->m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER);
ActionManagerInterface *am = m_d->m_core->actionManager();
ActionManager *am = m_d->m_core->actionManager();
IActionContainer *mfile = am->actionContainer(Constants::M_FILE);
//Revert to saved
......
......@@ -41,7 +41,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <utils/qtcassert.h>
......@@ -72,7 +72,7 @@ void EditorSplitter::registerActions()
const QList<int> editorManagerContext =
QList<int>() << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER);
ActionManagerInterface *am = m_core->actionManager();
ActionManager *am = m_core->actionManager();
IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
ICommand *cmd;
......
......@@ -51,7 +51,7 @@
*/
/*!
\fn ActionManagerInterface *ICore::actionManager() const
\fn ActionManager *ICore::actionManager() const
\brief Returns the application's action manager.
The action manager is responsible for registration of menus and
......
......@@ -50,7 +50,7 @@ QT_END_NAMESPACE
namespace Core {
// forward declarations
class ActionManagerInterface;
class ActionManager;
class IFile;
class FileManager;
class MessageManager;
......@@ -81,7 +81,7 @@ public:
virtual void showOptionsDialog(const QString &group = QString(),
const QString &page = QString()) = 0;
virtual ActionManagerInterface *actionManager() const = 0;
virtual ActionManager *actionManager() const = 0;
virtual FileManager *fileManager() const = 0;
virtual UniqueIDManager *uniqueIDManager() const = 0;
virtual MessageManager *messageManager() const = 0;
......
......@@ -815,7 +815,7 @@ void MainWindow::openFileWith()
}
}
ActionManagerInterface *MainWindow::actionManager() const
ActionManager *MainWindow::actionManager() const
{
return m_actionManager;
}
......
......@@ -55,7 +55,7 @@ class PluginManager;
namespace Core {
class ActionManagerInterface;
class ActionManager;
class BaseMode;
class BaseView;
class EditorManager;
......@@ -105,7 +105,7 @@ public:
//ICore
inline ExtensionSystem::PluginManager *pluginManager() { return m_pluginManager; }
Core::ActionManagerInterface *actionManager() const;
Core::ActionManager *actionManager() const;
Core::FileManager *fileManager() const;
Core::UniqueIDManager *uniqueIDManager() const;
Core::MessageManager *messageManager() const;
......
......@@ -39,7 +39,7 @@
#include <aggregation/aggregate.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/icommand.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreimpl.h>
......@@ -140,7 +140,7 @@ void ModeManager::objectAdded(QObject *obj)
m_modeStack->insertTab(index, mode->widget(), mode->icon(), mode->name());
// Register mode shortcut
ActionManagerInterface *am = m_mainWindow->actionManager();
ActionManager *am = m_mainWindow->actionManager();
const QString shortcutId = QLatin1String("QtCreator.Mode.") + mode->uniqueModeName();
QShortcut *shortcut = new QShortcut(m_mainWindow);
shortcut->setWhatsThis(tr("Switch to %1 mode").arg(mode->name()));
......
......@@ -38,7 +38,7 @@
#include <coreplugin/inavigationwidgetfactory.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <extensionsystem/ExtensionSystemInterfaces>
#include <QtGui/QAction>
......@@ -316,7 +316,7 @@ void NavigationWidget::objectAdded(QObject * obj)
return;
Core::ICore *core = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>();
Core::ActionManagerInterface *am = core->actionManager();
Core::ActionManager *am = core->actionManager();
QList<int> navicontext = QList<int>() << core->uniqueIDManager()->
uniqueIdentifier(Core::Constants::C_NAVIGATION_PANE);
......
......@@ -37,7 +37,7 @@
#include "mainwindow.h"
#include "modemanager.h"
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/iactioncontainer.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/editorgroup.h>
......@@ -210,7 +210,7 @@ void OutputPane::init(ICore *core, ExtensionSystem::PluginManager *pm)
m_pluginManager = pm;
m_core = core;
ActionManagerInterface *am = m_core->actionManager();
ActionManager *am = m_core->actionManager();
IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
// Window->Output Panes
......
......@@ -35,7 +35,7 @@
#include "imode.h"
#include "modemanager.h"
#include "actionmanager/actionmanagerinterface.h"
#include "actionmanager/actionmanager.h"
#include <QtCore/QDebug>
#include <QtCore/QEvent>
......
......@@ -38,7 +38,7 @@
#include "uniqueidmanager.h"
#include "iview.h"
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/icommand.h>
#include <extensionsystem/ExtensionSystemInterfaces>
#include <aggregation/aggregate.h>
......
......@@ -43,7 +43,7 @@
#include <coreplugin/filemanager.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <texteditor/itexteditor.h>
#include <coreplugin/messageoutputwindow.h>
......@@ -95,7 +95,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
addObject(m_settingsPage);
//register actions
Core::ActionManagerInterface *actionManager = gCoreInstance->actionManager();
Core::ActionManager *actionManager = gCoreInstance->actionManager();
Core::IActionContainer *toolsContainer =
actionManager->actionContainer(Core::Constants::M_TOOLS);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment