Commit fa05b23a authored by hjk's avatar hjk
Browse files

ProjectExplorer: Remove some explicit namespacing.



Change-Id: Ie70586d709e8dee8eeb85af1b77ba740eb2ed9d4
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 24249090
...@@ -148,6 +148,8 @@ bool debug = false; ...@@ -148,6 +148,8 @@ bool debug = false;
const char EXTERNAL_FILE_WARNING[] = "ExternalFile"; const char EXTERNAL_FILE_WARNING[] = "ExternalFile";
} }
using namespace Core;
namespace ProjectExplorer { namespace ProjectExplorer {
struct ProjectExplorerPluginPrivate { struct ProjectExplorerPluginPrivate {
...@@ -211,7 +213,7 @@ struct ProjectExplorerPluginPrivate { ...@@ -211,7 +213,7 @@ struct ProjectExplorerPluginPrivate {
QString m_sessionToRestoreAtStartup; QString m_sessionToRestoreAtStartup;
Project *m_currentProject; Project *m_currentProject;
Core::Context m_lastProjectContext; Context m_lastProjectContext;
Node *m_currentNode; Node *m_currentNode;
BuildManager *m_buildManager; BuildManager *m_buildManager;
...@@ -231,7 +233,7 @@ struct ProjectExplorerPluginPrivate { ...@@ -231,7 +233,7 @@ struct ProjectExplorerPluginPrivate {
Internal::ProjectExplorerSettings m_projectExplorerSettings; Internal::ProjectExplorerSettings m_projectExplorerSettings;
Internal::ProjectWelcomePage *m_welcomePage; Internal::ProjectWelcomePage *m_welcomePage;
Core::IMode *m_projectsMode; IMode *m_projectsMode;
TaskHub *m_taskHub; TaskHub *m_taskHub;
KitManager *m_kitManager; KitManager *m_kitManager;
...@@ -254,13 +256,13 @@ ProjectExplorerPluginPrivate::ProjectExplorerPluginPrivate() : ...@@ -254,13 +256,13 @@ ProjectExplorerPluginPrivate::ProjectExplorerPluginPrivate() :
{ {
} }
class ProjectsMode : public Core::IMode class ProjectsMode : public IMode
{ {
public: public:
ProjectsMode(QWidget *proWindow) ProjectsMode(QWidget *proWindow)
{ {
setWidget(proWindow); setWidget(proWindow);
setContext(Core::Context(Constants::C_PROJECTEXPLORER)); setContext(Context(Constants::C_PROJECTEXPLORER));
setDisplayName(QCoreApplication::translate("ProjectExplorer::ProjectsMode", "Projects")); setDisplayName(QCoreApplication::translate("ProjectExplorer::ProjectsMode", "Projects"));
setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png"))); setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png")));
setPriority(Constants::P_MODE_SESSION); setPriority(Constants::P_MODE_SESSION);
...@@ -347,13 +349,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -347,13 +349,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
addAutoReleasedObject(new TaskHub); addAutoReleasedObject(new TaskHub);
connect(Core::ICore::instance(), SIGNAL(newItemsDialogRequested()), this, SLOT(loadCustomWizards())); connect(ICore::instance(), SIGNAL(newItemsDialogRequested()), this, SLOT(loadCustomWizards()));
d->m_welcomePage = new ProjectWelcomePage; d->m_welcomePage = new ProjectWelcomePage;
connect(d->m_welcomePage, SIGNAL(manageSessions()), this, SLOT(showSessionManager())); connect(d->m_welcomePage, SIGNAL(manageSessions()), this, SLOT(showSessionManager()));
addObject(d->m_welcomePage); addObject(d->m_welcomePage);
connect(Core::DocumentManager::instance(), SIGNAL(currentFileChanged(QString)), connect(DocumentManager::instance(), SIGNAL(currentFileChanged(QString)),
this, SLOT(setCurrentFile(QString))); this, SLOT(setCurrentFile(QString)));
d->m_session = new SessionManager(this); d->m_session = new SessionManager(this);
...@@ -382,13 +384,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -382,13 +384,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d->m_proWindow = new ProjectWindow; d->m_proWindow = new ProjectWindow;
addAutoReleasedObject(d->m_proWindow); addAutoReleasedObject(d->m_proWindow);
Core::Context globalcontext(Core::Constants::C_GLOBAL); Context globalcontext(Core::Constants::C_GLOBAL);
Core::Context projecTreeContext(Constants::C_PROJECT_TREE); Context projecTreeContext(Constants::C_PROJECT_TREE);
d->m_projectsMode = new ProjectsMode(d->m_proWindow); d->m_projectsMode = new ProjectsMode(d->m_proWindow);
d->m_projectsMode->setEnabled(false); d->m_projectsMode->setEnabled(false);
addAutoReleasedObject(d->m_projectsMode); addAutoReleasedObject(d->m_projectsMode);
d->m_proWindow->layout()->addWidget(new Core::FindToolBarPlaceHolder(d->m_proWindow)); d->m_proWindow->layout()->addWidget(new FindToolBarPlaceHolder(d->m_proWindow));
addAutoReleasedObject(new CopyTaskHandler); addAutoReleasedObject(new CopyTaskHandler);
addAutoReleasedObject(new ShowInEditorTaskHandler); addAutoReleasedObject(new ShowInEditorTaskHandler);
...@@ -436,16 +438,16 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -436,16 +438,16 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
addAutoReleasedObject(new DeviceSettingsPage); addAutoReleasedObject(new DeviceSettingsPage);
// context menus // context menus
Core::ActionContainer *msessionContextMenu = ActionContainer *msessionContextMenu =
Core::ActionManager::createMenu(Constants::M_SESSIONCONTEXT); ActionManager::createMenu(Constants::M_SESSIONCONTEXT);
Core::ActionContainer *mprojectContextMenu = ActionContainer *mprojectContextMenu =
Core::ActionManager::createMenu(Constants::M_PROJECTCONTEXT); ActionManager::createMenu(Constants::M_PROJECTCONTEXT);
Core::ActionContainer *msubProjectContextMenu = ActionContainer *msubProjectContextMenu =
Core::ActionManager::createMenu(Constants::M_SUBPROJECTCONTEXT); ActionManager::createMenu(Constants::M_SUBPROJECTCONTEXT);
Core::ActionContainer *mfolderContextMenu = ActionContainer *mfolderContextMenu =
Core::ActionManager::createMenu(Constants::M_FOLDERCONTEXT); ActionManager::createMenu(Constants::M_FOLDERCONTEXT);
Core::ActionContainer *mfileContextMenu = ActionContainer *mfileContextMenu =
Core::ActionManager::createMenu(Constants::M_FILECONTEXT); ActionManager::createMenu(Constants::M_FILECONTEXT);
d->m_sessionContextMenu = msessionContextMenu->menu(); d->m_sessionContextMenu = msessionContextMenu->menu();
d->m_projectMenu = mprojectContextMenu->menu(); d->m_projectMenu = mprojectContextMenu->menu();
...@@ -453,25 +455,25 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -453,25 +455,25 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d->m_folderMenu = mfolderContextMenu->menu(); d->m_folderMenu = mfolderContextMenu->menu();
d->m_fileMenu = mfileContextMenu->menu(); d->m_fileMenu = mfileContextMenu->menu();
Core::ActionContainer *mfile = ActionContainer *mfile =
Core::ActionManager::actionContainer(Core::Constants::M_FILE); ActionManager::actionContainer(Core::Constants::M_FILE);
Core::ActionContainer *menubar = ActionContainer *menubar =
Core::ActionManager::actionContainer(Core::Constants::MENU_BAR); ActionManager::actionContainer(Core::Constants::MENU_BAR);
// build menu // build menu
Core::ActionContainer *mbuild = ActionContainer *mbuild =
Core::ActionManager::createMenu(Constants::M_BUILDPROJECT); ActionManager::createMenu(Constants::M_BUILDPROJECT);
mbuild->menu()->setTitle(tr("&Build")); mbuild->menu()->setTitle(tr("&Build"));
menubar->addMenu(mbuild, Core::Constants::G_VIEW); menubar->addMenu(mbuild, Core::Constants::G_VIEW);
// debug menu // debug menu
Core::ActionContainer *mdebug = ActionContainer *mdebug =
Core::ActionManager::createMenu(Constants::M_DEBUG); ActionManager::createMenu(Constants::M_DEBUG);
mdebug->menu()->setTitle(tr("&Debug")); mdebug->menu()->setTitle(tr("&Debug"));
menubar->addMenu(mdebug, Core::Constants::G_VIEW); menubar->addMenu(mdebug, Core::Constants::G_VIEW);
Core::ActionContainer *mstartdebugging = ActionContainer *mstartdebugging =
Core::ActionManager::createMenu(Constants::M_DEBUG_STARTDEBUGGING); ActionManager::createMenu(Constants::M_DEBUG_STARTDEBUGGING);
mstartdebugging->menu()->setTitle(tr("&Start Debugging")); mstartdebugging->menu()->setTitle(tr("&Start Debugging"));
mdebug->addMenu(mstartdebugging, Core::Constants::G_DEFAULT_ONE); mdebug->addMenu(mstartdebugging, Core::Constants::G_DEFAULT_ONE);
...@@ -507,8 +509,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -507,8 +509,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msubProjectContextMenu->appendGroup(Constants::G_PROJECT_LAST); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_LAST);
msubProjectContextMenu->appendGroup(Constants::G_PROJECT_TREE); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_TREE);
Core::ActionContainer *runMenu = Core::ActionManager::createMenu(Constants::RUNMENUCONTEXTMENU); ActionContainer *runMenu = ActionManager::createMenu(Constants::RUNMENUCONTEXTMENU);
runMenu->setOnAllDisabledBehavior(Core::ActionContainer::Hide); runMenu->setOnAllDisabledBehavior(ActionContainer::Hide);
QIcon runIcon = QIcon(QLatin1String(Constants::ICON_RUN)); QIcon runIcon = QIcon(QLatin1String(Constants::ICON_RUN));
runIcon.addFile(QLatin1String(Constants::ICON_RUN_SMALL)); runIcon.addFile(QLatin1String(Constants::ICON_RUN_SMALL));
runMenu->menu()->setIcon(runIcon); runMenu->menu()->setIcon(runIcon);
...@@ -525,20 +527,20 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -525,20 +527,20 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mfileContextMenu->appendGroup(Constants::G_FILE_CONFIG); mfileContextMenu->appendGroup(Constants::G_FILE_CONFIG);
mfileContextMenu->appendGroup(Constants::G_PROJECT_TREE); mfileContextMenu->appendGroup(Constants::G_PROJECT_TREE);
// "open with" submenu // "open with" submenu
Core::ActionContainer * const openWith = ActionContainer * const openWith =
Core::ActionManager::createMenu(ProjectExplorer::Constants::M_OPENFILEWITHCONTEXT); ActionManager::createMenu(ProjectExplorer::Constants::M_OPENFILEWITHCONTEXT);
openWith->setOnAllDisabledBehavior(Core::ActionContainer::Show); openWith->setOnAllDisabledBehavior(ActionContainer::Show);
d->m_openWithMenu = openWith->menu(); d->m_openWithMenu = openWith->menu();
d->m_openWithMenu->setTitle(tr("Open With")); d->m_openWithMenu->setTitle(tr("Open With"));
connect(d->m_openWithMenu, SIGNAL(triggered(QAction*)), connect(d->m_openWithMenu, SIGNAL(triggered(QAction*)),
Core::DocumentManager::instance(), SLOT(slotExecuteOpenWithMenuAction(QAction*))); DocumentManager::instance(), SLOT(slotExecuteOpenWithMenuAction(QAction*)));
// //
// Separators // Separators
// //
Core::Command *cmd; Command *cmd;
msessionContextMenu->addSeparator(projecTreeContext, Constants::G_SESSION_REBUILD); msessionContextMenu->addSeparator(projecTreeContext, Constants::G_SESSION_REBUILD);
...@@ -558,13 +560,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -558,13 +560,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// new action // new action
d->m_newAction = new QAction(tr("New Project..."), this); d->m_newAction = new QAction(tr("New Project..."), this);
cmd = Core::ActionManager::registerAction(d->m_newAction, Constants::NEWPROJECT, globalcontext); cmd = ActionManager::registerAction(d->m_newAction, Constants::NEWPROJECT, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+N"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+N")));
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES); msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
// open action // open action
d->m_loadAction = new QAction(tr("Load Project..."), this); d->m_loadAction = new QAction(tr("Load Project..."), this);
cmd = Core::ActionManager::registerAction(d->m_loadAction, Constants::LOAD, globalcontext); cmd = ActionManager::registerAction(d->m_loadAction, Constants::LOAD, globalcontext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+O"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+O")));
#endif #endif
...@@ -572,24 +574,24 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -572,24 +574,24 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// Default open action // Default open action
d->m_openFileAction = new QAction(tr("Open File"), this); d->m_openFileAction = new QAction(tr("Open File"), this);
cmd = Core::ActionManager::registerAction(d->m_openFileAction, ProjectExplorer::Constants::OPENFILE, cmd = ActionManager::registerAction(d->m_openFileAction, ProjectExplorer::Constants::OPENFILE,
projecTreeContext); projecTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
d->m_searchOnFileSystem = new QAction(FolderNavigationWidget::msgFindOnFileSystem(), this); d->m_searchOnFileSystem = new QAction(FolderNavigationWidget::msgFindOnFileSystem(), this);
cmd = Core::ActionManager::registerAction(d->m_searchOnFileSystem, ProjectExplorer::Constants::SEARCHONFILESYSTEM, projecTreeContext); cmd = ActionManager::registerAction(d->m_searchOnFileSystem, ProjectExplorer::Constants::SEARCHONFILESYSTEM, projecTreeContext);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_CONFIG); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_CONFIG);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_LAST); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_LAST);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_LAST); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_LAST);
d->m_showInGraphicalShell = new QAction(Core::FileUtils::msgGraphicalShellAction(), this); d->m_showInGraphicalShell = new QAction(FileUtils::msgGraphicalShellAction(), this);
cmd = Core::ActionManager::registerAction(d->m_showInGraphicalShell, ProjectExplorer::Constants::SHOWINGRAPHICALSHELL, cmd = ActionManager::registerAction(d->m_showInGraphicalShell, ProjectExplorer::Constants::SHOWINGRAPHICALSHELL,
projecTreeContext); projecTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
d->m_openTerminalHere = new QAction(Core::FileUtils::msgTerminalAction(), this); d->m_openTerminalHere = new QAction(FileUtils::msgTerminalAction(), this);
cmd = Core::ActionManager::registerAction(d->m_openTerminalHere, ProjectExplorer::Constants::OPENTERMIANLHERE, cmd = ActionManager::registerAction(d->m_openTerminalHere, ProjectExplorer::Constants::OPENTERMIANLHERE,
projecTreeContext); projecTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
...@@ -598,18 +600,18 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -598,18 +600,18 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mfileContextMenu->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN); mfileContextMenu->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN);
// recent projects menu // recent projects menu
Core::ActionContainer *mrecent = ActionContainer *mrecent =
Core::ActionManager::createMenu(Constants::M_RECENTPROJECTS); ActionManager::createMenu(Constants::M_RECENTPROJECTS);
mrecent->menu()->setTitle(tr("Recent P&rojects")); mrecent->menu()->setTitle(tr("Recent P&rojects"));
mrecent->setOnAllDisabledBehavior(Core::ActionContainer::Show); mrecent->setOnAllDisabledBehavior(ActionContainer::Show);
mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN); mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN);
connect(mfile->menu(), SIGNAL(aboutToShow()), connect(mfile->menu(), SIGNAL(aboutToShow()),
this, SLOT(updateRecentProjectMenu())); this, SLOT(updateRecentProjectMenu()));
// session menu // session menu
Core::ActionContainer *msession = Core::ActionManager::createMenu(Constants::M_SESSION); ActionContainer *msession = ActionManager::createMenu(Constants::M_SESSION);
msession->menu()->setTitle(tr("Sessions")); msession->menu()->setTitle(tr("Sessions"));
msession->setOnAllDisabledBehavior(Core::ActionContainer::Show); msession->setOnAllDisabledBehavior(ActionContainer::Show);
mfile->addMenu(msession, Core::Constants::G_FILE_OPEN); mfile->addMenu(msession, Core::Constants::G_FILE_OPEN);
d->m_sessionMenu = msession->menu(); d->m_sessionMenu = msession->menu();
connect(mfile->menu(), SIGNAL(aboutToShow()), connect(mfile->menu(), SIGNAL(aboutToShow()),
...@@ -617,7 +619,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -617,7 +619,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// session manager action // session manager action
d->m_sessionManagerAction = new QAction(tr("Session Manager..."), this); d->m_sessionManagerAction = new QAction(tr("Session Manager..."), this);
cmd = Core::ActionManager::registerAction(d->m_sessionManagerAction, Constants::NEWSESSION, globalcontext); cmd = ActionManager::registerAction(d->m_sessionManagerAction, Constants::NEWSESSION, globalcontext);
mfile->addAction(cmd, Core::Constants::G_FILE_OPEN); mfile->addAction(cmd, Core::Constants::G_FILE_OPEN);
cmd->setDefaultKeySequence(QKeySequence()); cmd->setDefaultKeySequence(QKeySequence());
...@@ -626,14 +628,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -626,14 +628,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// unload action // unload action
d->m_unloadAction = new Utils::ParameterAction(tr("Close Project"), tr("Close Project \"%1\""), d->m_unloadAction = new Utils::ParameterAction(tr("Close Project"), tr("Close Project \"%1\""),
Utils::ParameterAction::EnabledWithParameter, this); Utils::ParameterAction::EnabledWithParameter, this);
cmd = Core::ActionManager::registerAction(d->m_unloadAction, Constants::UNLOAD, globalcontext); cmd = ActionManager::registerAction(d->m_unloadAction, Constants::UNLOAD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(d->m_unloadAction->text()); cmd->setDescription(d->m_unloadAction->text());
mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT); mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT);
// unload session action // unload session action
d->m_closeAllProjects = new QAction(tr("Close All Projects and Editors"), this); d->m_closeAllProjects = new QAction(tr("Close All Projects and Editors"), this);
cmd = Core::ActionManager::registerAction(d->m_closeAllProjects, Constants::CLEARSESSION, globalcontext); cmd = ActionManager::registerAction(d->m_closeAllProjects, Constants::CLEARSESSION, globalcontext);
mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT); mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES); msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
...@@ -641,14 +643,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -641,14 +643,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
QIcon buildIcon = QIcon(QLatin1String(Constants::ICON_BUILD)); QIcon buildIcon = QIcon(QLatin1String(Constants::ICON_BUILD));
buildIcon.addFile(QLatin1String(Constants::ICON_BUILD_SMALL)); buildIcon.addFile(QLatin1String(Constants::ICON_BUILD_SMALL));
d->m_buildSessionAction = new QAction(buildIcon, tr("Build All"), this); d->m_buildSessionAction = new QAction(buildIcon, tr("Build All"), this);
cmd = Core::ActionManager::registerAction(d->m_buildSessionAction, Constants::BUILDSESSION, globalcontext); cmd = ActionManager::registerAction(d->m_buildSessionAction, Constants::BUILDSESSION, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+B"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+B")));
mbuild->addAction(cmd, Constants::G_BUILD_BUILD); mbuild->addAction(cmd, Constants::G_BUILD_BUILD);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD); msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD);
// deploy session // deploy session
d->m_deploySessionAction = new QAction(tr("Deploy All"), this); d->m_deploySessionAction = new QAction(tr("Deploy All"), this);
cmd = Core::ActionManager::registerAction(d->m_deploySessionAction, Constants::DEPLOYSESSION, globalcontext); cmd = ActionManager::registerAction(d->m_deploySessionAction, Constants::DEPLOYSESSION, globalcontext);
mbuild->addAction(cmd, Constants::G_BUILD_DEPLOY); mbuild->addAction(cmd, Constants::G_BUILD_DEPLOY);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD); msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD);
...@@ -656,7 +658,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -656,7 +658,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
QIcon rebuildIcon = QIcon(QLatin1String(Constants::ICON_REBUILD)); QIcon rebuildIcon = QIcon(QLatin1String(Constants::ICON_REBUILD));
rebuildIcon.addFile(QLatin1String(Constants::ICON_REBUILD_SMALL)); rebuildIcon.addFile(QLatin1String(Constants::ICON_REBUILD_SMALL));
d->m_rebuildSessionAction = new QAction(rebuildIcon, tr("Rebuild All"), this); d->m_rebuildSessionAction = new QAction(rebuildIcon, tr("Rebuild All"), this);
cmd = Core::ActionManager::registerAction(d->m_rebuildSessionAction, Constants::REBUILDSESSION, globalcontext); cmd = ActionManager::registerAction(d->m_rebuildSessionAction, Constants::REBUILDSESSION, globalcontext);
mbuild->addAction(cmd, Constants::G_BUILD_REBUILD); mbuild->addAction(cmd, Constants::G_BUILD_REBUILD);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD); msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD);
...@@ -664,7 +666,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -664,7 +666,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
QIcon cleanIcon = QIcon(QLatin1String(Constants::ICON_CLEAN)); QIcon cleanIcon = QIcon(QLatin1String(Constants::ICON_CLEAN));
cleanIcon.addFile(QLatin1String(Constants::ICON_CLEAN_SMALL)); cleanIcon.addFile(QLatin1String(Constants::ICON_CLEAN_SMALL));
d->m_cleanSessionAction = new QAction(cleanIcon, tr("Clean All"), this); d->m_cleanSessionAction = new QAction(cleanIcon, tr("Clean All"), this);
cmd = Core::ActionManager::registerAction(d->m_cleanSessionAction, Constants::CLEANSESSION, globalcontext); cmd = ActionManager::registerAction(d->m_cleanSessionAction, Constants::CLEANSESSION, globalcontext);
mbuild->addAction(cmd, Constants::G_BUILD_CLEAN); mbuild->addAction(cmd, Constants::G_BUILD_CLEAN);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD); msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD);
...@@ -672,36 +674,36 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -672,36 +674,36 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d->m_buildAction = new Utils::ParameterAction(tr("Build Project"), tr("Build Project \"%1\""), d->m_buildAction = new Utils::ParameterAction(tr("Build Project"), tr("Build Project \"%1\""),
Utils::ParameterAction::AlwaysEnabled, this); Utils::ParameterAction::AlwaysEnabled, this);
d->m_buildAction->setIcon(buildIcon); d->m_buildAction->setIcon(buildIcon);
cmd = Core::ActionManager::registerAction(d->m_buildAction, Constants::BUILD, globalcontext); cmd = ActionManager::registerAction(d->m_buildAction, Constants::BUILD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(d->m_buildAction->text()); cmd->setDescription(d->m_buildAction->text());
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+B"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+B")));
mbuild->addAction(cmd, Constants::G_BUILD_BUILD); mbuild->addAction(cmd, Constants::G_BUILD_BUILD);
// Add to mode bar // Add to mode bar
Core::ModeManager::addAction(cmd->action(), Constants::P_ACTION_BUILDPROJECT); ModeManager::addAction(cmd->action(), Constants::P_ACTION_BUILDPROJECT);
// deploy action // deploy action
d->m_deployAction = new Utils::ParameterAction(tr("Deploy Project"), tr("Deploy Project \"%1\""), d->m_deployAction = new Utils::ParameterAction(tr("Deploy Project"), tr("Deploy Project \"%1\""),
Utils::ParameterAction::AlwaysEnabled, this); Utils::ParameterAction::AlwaysEnabled, this);
cmd = Core::ActionManager::registerAction(d->m_deployAction, Constants::DEPLOY, globalcontext); cmd = ActionManager::registerAction(d->m_deployAction, Constants::DEPLOY, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(d->m_deployAction->text()); cmd->setDescription(d->m_deployAction->text());
mbuild->addAction(cmd, Constants::G_BUILD_DEPLOY); mbuild->addAction(cmd, Constants::G_BUILD_DEPLOY);
// rebuild action // rebuild action
d->m_rebuildAction = new Utils::ParameterAction(tr("Rebuild Project"), tr("Rebuild Project \"%1\""), d->m_rebuildAction = new Utils::ParameterAction(tr("Rebuild Project"), tr("Rebuild Project \"%1\""),
Utils::ParameterAction::AlwaysEnabled, this); Utils::ParameterAction::AlwaysEnabled, this);
cmd = Core::ActionManager::registerAction(d->m_rebuildAction, Constants::REBUILD, globalcontext); cmd = ActionManager::registerAction(d->m_rebuildAction, Constants::REBUILD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(d->m_rebuildAction->text()); cmd->setDescription(d->m_rebuildAction->text());
mbuild->addAction(cmd, Constants::G_BUILD_REBUILD); mbuild->addAction(cmd, Constants::G_BUILD_REBUILD);
// clean action // clean action
d->m_cleanAction = new Utils::ParameterAction(tr("Clean Project"), tr("Clean Project \"%1\""), d->m_cleanAction = new Utils::ParameterAction(tr("Clean Project"), tr("Clean Project \"%1\""),
Utils::ParameterAction::AlwaysEnabled, this); Utils::ParameterAction::AlwaysEnabled, this);
cmd = Core::ActionManager::registerAction(d->m_cleanAction, Constants::CLEAN, globalcontext); cmd = ActionManager::registerAction(d->m_cleanAction, Constants::CLEAN, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(d->m_cleanAction->text()); cmd->setDescription(d->m_cleanAction->text());
mbuild->addAction(cmd, Constants::G_BUILD_CLEAN); mbuild->addAction(cmd, Constants::G_BUILD_CLEAN);
...@@ -709,79 +711,79 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -709,79 +711,79 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
QIcon stopIcon = QIcon(QLatin1String(Constants::ICON_STOP)); QIcon stopIcon = QIcon(QLatin1String(Constants::ICON_STOP));
stopIcon.addFile(QLatin1String(Constants::ICON_STOP_SMALL)); stopIcon.addFile(QLatin1String(Constants::ICON_STOP_SMALL));
d->m_cancelBuildAction = new QAction(stopIcon, tr("Cancel Build"), this); d->m_cancelBuildAction = new QAction(stopIcon, tr("Cancel Build"), this);
cmd = Core::ActionManager::registerAction(d->m_cancelBuildAction, Constants::CANCELBUILD, globalcontext); cmd = ActionManager::registerAction(d->m_cancelBuildAction, Constants::CANCELBUILD, globalcontext);
mbuild->addAction(cmd, Constants::G_BUILD_CANCEL); mbuild->addAction(cmd, Constants::G_BUILD_CANCEL);
// run action // run action
d->m_runAction = new QAction(runIcon, tr("Run"), this); d->m_runAction = new QAction(runIcon, tr("Run"), this);
cmd = Core::ActionManager::registerAction(d->m_runAction, Constants::RUN, globalcontext); cmd = ActionManager::registerAction(d->m_runAction, Constants::RUN, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R")));
mbuild->addAction(cmd, Constants::G_BUILD_RUN); mbuild->addAction(cmd, Constants::G_BUILD_RUN);
Core::ModeManager::addAction(cmd->action(), Constants::P_ACTION_RUN); ModeManager::addAction(cmd->action(), Constants::P_ACTION_RUN);
// Run without deployment action // Run without deployment action
d->m_runWithoutDeployAction = new QAction(tr("Run Without Deployment"), this); d->m_runWithoutDeployAction = new QAction(tr("Run Without Deployment"), this);
cmd = Core::ActionManager::registerAction(d->m_runWithoutDeployAction, Constants::RUNWITHOUTDEPLOY, globalcontext); cmd = ActionManager::registerAction(d->m_runWithoutDeployAction, Constants::RUNWITHOUTDEPLOY, globalcontext);
mbuild->addAction(cmd, Constants::G_BUILD_RUN); mbuild->addAction(cmd, Constants::G_BUILD_RUN);
// Publish action // Publish action
d->m_publishAction = new Utils::ParameterAction(tr("Publish Project..."), tr("Publish Project \"%1\"..."), d->m_publishAction = new Utils::ParameterAction(tr("Publish Project..."), tr("Publish Project \"%1\"..."),
Utils::ParameterAction::AlwaysEnabled, this); Utils::ParameterAction::AlwaysEnabled, this);
cmd = Core::ActionManager::registerAction(d->m_publishAction, Constants::PUBLISH, globalcontext); cmd = ActionManager::registerAction(d->m_publishAction, Constants::PUBLISH, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(d->m_publishAction->text()); cmd->setDescription(d->m_publishAction->text());
mbuild->addAction(cmd, Constants::G_BUILD_RUN); mbuild->addAction(cmd, Constants::G_BUILD_RUN);
// build action (context menu) // build action (context menu)
d->m_buildActionContextMenu = new QAction(tr("Build"), this); d->m_buildActionContextMenu = new QAction(tr("Build"), this);
cmd = Core::ActionManager::registerAction(d->m_buildActionContextMenu, Constants::BUILDCM, projecTreeContext); cmd = ActionManager::registerAction(d->m_buildActionContextMenu, Constants::BUILDCM, projecTreeContext);
cmd->setAttribute(Core::Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD);
// rebuild action (context menu) // rebuild action (context menu)
d->m_rebuildActionContextMenu = new QAction(tr("Rebuild"), this); d->m_rebuildActionContextMenu = new QAction(tr("Rebuild"), this);