diff --git a/src/plugins/coreplugin/actionmanager/command.cpp b/src/plugins/coreplugin/actionmanager/command.cpp index 6138612ac7545492c9408379d5fdaebbc8144d9e..73858baefecb7dfe20674394bb984cbb20591350 100644 --- a/src/plugins/coreplugin/actionmanager/command.cpp +++ b/src/plugins/coreplugin/actionmanager/command.cpp @@ -239,14 +239,25 @@ void CommandPrivate::setKeySequence(const QKeySequence &key) m_isKeyInitialized = true; } -void CommandPrivate::setDefaultText(const QString &text) +void CommandPrivate::setDescription(const QString &text) { m_defaultText = text; } -QString CommandPrivate::defaultText() const +QString CommandPrivate::description() const { - return m_defaultText; + if (!m_defaultText.isEmpty()) + return m_defaultText; + if (action()) { + QString text = action()->text(); + text.remove(QRegExp(QLatin1String("&(?!&)"))); + if (!text.isEmpty()) + return text; + } else if (shortcut()) { + if (!shortcut()->whatsThis().isEmpty()) + return shortcut()->whatsThis(); + } + return id().toString(); } Id CommandPrivate::id() const @@ -332,16 +343,6 @@ QKeySequence Shortcut::keySequence() const return m_shortcut->key(); } -void Shortcut::setDefaultText(const QString &text) -{ - m_defaultText = text; -} - -QString Shortcut::defaultText() const -{ - return m_defaultText; -} - void Shortcut::setCurrentContext(const Core::Context &context) { foreach (int ctxt, m_context) { diff --git a/src/plugins/coreplugin/actionmanager/command.h b/src/plugins/coreplugin/actionmanager/command.h index 9e2c25962af74d5ba215e4f160f6a53324738361..fa71da6fc56e20a7bedf819c2c48fe0f62dfefd1 100644 --- a/src/plugins/coreplugin/actionmanager/command.h +++ b/src/plugins/coreplugin/actionmanager/command.h @@ -64,8 +64,12 @@ public: virtual void setDefaultKeySequence(const QKeySequence &key) = 0; virtual QKeySequence defaultKeySequence() const = 0; virtual QKeySequence keySequence() const = 0; - virtual void setDefaultText(const QString &text) = 0; - virtual QString defaultText() const = 0; + // explicitly set the description (used e.g. in shortcut settings) + // default is to use the action text for actions, or the whatsThis for shortcuts, + // or, as a last fall back if these are empty, the command ID string + // override the default e.g. if the text is context dependent and contains file names etc + virtual void setDescription(const QString &text) = 0; + virtual QString description() const = 0; virtual Id id() const = 0; diff --git a/src/plugins/coreplugin/actionmanager/command_p.h b/src/plugins/coreplugin/actionmanager/command_p.h index 8c11093f4deeceaee3f8e0b5c51f67079d55dc7d..9c0dd89f5fd8b8926522e81f91de2f19cecd6e9b 100644 --- a/src/plugins/coreplugin/actionmanager/command_p.h +++ b/src/plugins/coreplugin/actionmanager/command_p.h @@ -61,8 +61,8 @@ public: void setKeySequence(const QKeySequence &key); - void setDefaultText(const QString &text); - QString defaultText() const; + void setDescription(const QString &text); + QString description() const; Id id() const; @@ -97,9 +97,6 @@ public: void setKeySequence(const QKeySequence &key); QKeySequence keySequence() const; - virtual void setDefaultText(const QString &key); - virtual QString defaultText() const; - void setShortcut(QShortcut *shortcut); QShortcut *shortcut() const; @@ -115,7 +112,6 @@ public: private: QShortcut *m_shortcut; - QString m_defaultText; bool m_scriptable; }; diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp index c5c0eb7d3bbd70bea8307daebd89be4271dfc2c6..75be63d254338066fd8e864b9c50404673acd6f3 100644 --- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp +++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp @@ -322,17 +322,7 @@ void ShortcutSettings::initialize() sections[section]->addChild(item); item->setText(0, subId); - - if (c->action()) { - QString text = c->hasAttribute(Command::CA_UpdateText) && !c->defaultText().isNull() ? c->defaultText() : c->action()->text(); - text.remove(QRegExp(QLatin1String("&(?!&)"))); - s->m_key = c->action()->shortcut(); - item->setText(1, text); - } else { - s->m_key = c->shortcut()->key(); - item->setText(1, c->shortcut()->whatsThis()); - } - + item->setText(1, c->description()); item->setText(2, s->m_key); if (s->m_cmd->defaultKeySequence() != s->m_key) setModified(item, true); diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index bbccef7cce392493616b0687451bee5d3857ab9c..9a16dfc1bde488cf6560543a3f2e887f36b88cd5 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -307,7 +307,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : Command *cmd = am->registerAction(d->m_revertToSavedAction, Constants::REVERTTOSAVED, editManagerContext); cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultText(tr("Revert File to Saved")); + cmd->setDescription(tr("Revert File to Saved")); mfile->addAction(cmd, Constants::G_FILE_SAVE); connect(d->m_revertToSavedAction, SIGNAL(triggered()), this, SLOT(revertToSaved())); @@ -337,7 +337,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : cmd = am->registerAction(d->m_closeCurrentEditorAction, Constants::CLOSE, editManagerContext, true); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+W"))); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_closeCurrentEditorAction->text()); + cmd->setDescription(d->m_closeCurrentEditorAction->text()); mfile->addAction(cmd, Constants::G_FILE_CLOSE); connect(d->m_closeCurrentEditorAction, SIGNAL(triggered()), this, SLOT(closeEditor())); diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 9cb851d5a57890cea4366be03dabc04a49b7f80b..f1bd87f144d04b9e5812994822c3b8ed4aae09a0 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -624,7 +624,7 @@ void MainWindow::registerDefaultActions() cmd = am->registerAction(tmpaction, Constants::SAVE, globalContext); cmd->setDefaultKeySequence(QKeySequence::Save); cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultText(tr("&Save")); + cmd->setDescription(tr("Save")); mfile->addAction(cmd, Constants::G_FILE_SAVE); // Save As Action @@ -636,7 +636,7 @@ void MainWindow::registerDefaultActions() cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S"))); #endif cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultText(tr("Save &As...")); + cmd->setDescription(tr("Save As...")); mfile->addAction(cmd, Constants::G_FILE_SAVE); // SaveAll Action @@ -670,7 +670,7 @@ void MainWindow::registerDefaultActions() cmd = am->registerAction(tmpaction, Constants::UNDO, globalContext); cmd->setDefaultKeySequence(QKeySequence::Undo); cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultText(tr("&Undo")); + cmd->setDescription(tr("Undo")); medit->addAction(cmd, Constants::G_EDIT_UNDOREDO); tmpaction->setEnabled(false); @@ -680,7 +680,7 @@ void MainWindow::registerDefaultActions() cmd = am->registerAction(tmpaction, Constants::REDO, globalContext); cmd->setDefaultKeySequence(QKeySequence::Redo); cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultText(tr("&Redo")); + cmd->setDescription(tr("Redo")); medit->addAction(cmd, Constants::G_EDIT_UNDOREDO); tmpaction->setEnabled(false); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 974ed60d0aa9ae0172f89d163570105dd66f847f..39704717f80cf5e97e1e974d76e49d030d0b74f0 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -3112,7 +3112,7 @@ void DebuggerPluginPrivate::extensionsInitialized() ActionContainer *mstart = am->actionContainer(PE::M_DEBUG_STARTDEBUGGING); cmd = am->registerAction(m_startAction, Constants::DEBUG, globalcontext); - cmd->setDefaultText(tr("Start Debugging")); + cmd->setDescription(tr("Start Debugging")); cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::DEBUG_KEY))); cmd->setAttribute(Command::CA_UpdateText); mstart->addAction(cmd, CC::G_DEFAULT_ONE); @@ -3165,12 +3165,12 @@ void DebuggerPluginPrivate::extensionsInitialized() cmd = am->registerAction(m_startRemoteServerAction, "Debugger.StartRemoteServer", globalcontext); - cmd->setDefaultText(tr("Start Gdbserver")); + cmd->setDescription(tr("Start Gdbserver")); mstart->addAction(cmd, Constants::G_MANUAL_REMOTE); cmd = am->registerAction(m_attachToRemoteProcessAction, "Debugger.AttachToRemoteProcess", globalcontext); - cmd->setDefaultText(tr("Attach to Remote Process")); + cmd->setDescription(tr("Attach to Remote Process")); mstart->addAction(cmd, Debugger::Constants::G_AUTOMATIC_REMOTE); #ifdef WITH_LLDB @@ -3205,7 +3205,7 @@ void DebuggerPluginPrivate::extensionsInitialized() cmd = am->registerAction(m_interruptAction, Constants::INTERRUPT, globalcontext); - cmd->setDefaultText(tr("Interrupt Debugger")); + cmd->setDescription(tr("Interrupt Debugger")); debugMenu->addAction(cmd, CC::G_DEFAULT_ONE); cmd = am->registerAction(m_continueAction, @@ -3215,7 +3215,7 @@ void DebuggerPluginPrivate::extensionsInitialized() cmd = am->registerAction(m_exitAction, Constants::STOP, globalcontext); - cmd->setDefaultText(tr("Stop Debugger")); + cmd->setDescription(tr("Stop Debugger")); debugMenu->addAction(cmd, CC::G_DEFAULT_ONE); m_hiddenStopAction = new Utils::ProxyAction(this); @@ -3230,7 +3230,7 @@ void DebuggerPluginPrivate::extensionsInitialized() cmd = am->registerAction(m_abortAction, Constants::ABORT, globalcontext); //cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::RESET_KEY))); - cmd->setDefaultText(tr("Reset Debugger")); + cmd->setDescription(tr("Reset Debugger")); debugMenu->addAction(cmd, CC::G_DEFAULT_ONE); sep = new QAction(this); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 1f98f21570c93e3a3098abfc7115cbf68f51b6f4..0e77d487a5f8413556bce1b176641462eeb16447 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -408,16 +408,7 @@ void FakeVimExCommandsPage::initialize() sections[section]->addChild(item); item->setText(0, subId); - - if (c->action()) { - QString text = c->hasAttribute(Command::CA_UpdateText) - && !c->defaultText().isNull() - ? c->defaultText() : c->action()->text(); - text.remove(QRegExp("&(?!&)")); - item->setText(1, text); - } else { - item->setText(1, c->shortcut()->whatsThis()); - } + item->setText(1, c->description()); QString regex; if (exCommandMap().contains(name)) diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 2efc7638a1884601b229b61ae80af3d5d46dec4e..dd46dcae7476407c35f5cb333c3402261e8ada9f 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -279,7 +279,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_diffFileAction = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::EnabledWithParameter, this); command = am->registerAction(m_diffFileAction, CMD_ID_DIFF_CURRENT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); - command->setDefaultText(tr("Diff Current File")); + command->setDescription(tr("Diff Current File")); connect(m_diffFileAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -287,7 +287,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_annotateCurrentAction = new Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Utils::ParameterAction::EnabledWithParameter, this); command = am->registerAction(m_annotateCurrentAction, CMD_ID_ANNOTATE_CURRENT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); - command->setDefaultText(tr("Annotate Current File")); + command->setDescription(tr("Annotate Current File")); connect(m_annotateCurrentAction, SIGNAL(triggered()), this, SLOT(annotateCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -296,7 +296,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er command = am->registerAction(m_filelogCurrentAction, CMD_ID_FILELOG_CURRENT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+F"))); - command->setDefaultText(tr("Filelog Current File")); + command->setDescription(tr("Filelog Current File")); connect(m_filelogCurrentAction, SIGNAL(triggered()), this, SLOT(filelogCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -307,7 +307,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er command = am->registerAction(m_editAction, CMD_ID_EDIT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+E"))); - command->setDefaultText(tr("Edit File")); + command->setDescription(tr("Edit File")); connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -316,7 +316,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er command = am->registerAction(m_addAction, CMD_ID_ADD, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+A"))); - command->setDefaultText(tr("Add File")); + command->setDescription(tr("Add File")); connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -324,7 +324,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_deleteAction = new Utils::ParameterAction(tr("Delete..."), tr("Delete \"%1\"..."), Utils::ParameterAction::EnabledWithParameter, this); command = am->registerAction(m_deleteAction, CMD_ID_DELETE_FILE, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); - command->setDefaultText(tr("Delete File")); + command->setDescription(tr("Delete File")); connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(promptToDeleteCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -333,7 +333,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er command = am->registerAction(m_revertFileAction, CMD_ID_REVERT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+R"))); - command->setDefaultText(tr("Revert File")); + command->setDescription(tr("Revert File")); connect(m_revertFileAction, SIGNAL(triggered()), this, SLOT(revertCurrentFile())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -345,7 +345,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er command = am->registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+D"))); - command->setDefaultText(diffProjectDefaultText); + command->setDescription(diffProjectDefaultText); connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject())); mperforce->addAction(command); m_commandLocator->appendCommand(command); @@ -368,7 +368,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er const QString updateProjectDefaultText = tr("Update Current Project"); m_updateProjectAction = new Utils::ParameterAction(updateProjectDefaultText, tr("Update Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); command = am->registerAction(m_updateProjectAction, CMD_ID_UPDATE_PROJECT, globalcontext); - command->setDefaultText(updateProjectDefaultText); + command->setDescription(updateProjectDefaultText); command->setAttribute(Core::Command::CA_UpdateText); connect(m_updateProjectAction, SIGNAL(triggered()), this, SLOT(updateCurrentProject())); mperforce->addAction(command); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 32d9a4cbe9580905835e7ba3e2fd69ced1540622..d60d6725fe475e00d8c4d77c137d33d9c430bf33 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -640,7 +640,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::EnabledWithParameter, this); cmd = am->registerAction(d->m_unloadAction, Constants::UNLOAD, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_unloadAction->text()); + cmd->setDescription(d->m_unloadAction->text()); mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT); // unload session action @@ -686,7 +686,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er d->m_buildAction->setIcon(buildIcon); cmd = am->registerAction(d->m_buildAction, Constants::BUILD, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_buildAction->text()); + cmd->setDescription(d->m_buildAction->text()); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+B"))); mbuild->addAction(cmd, Constants::G_BUILD_PROJECT); @@ -698,7 +698,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_rebuildAction, Constants::REBUILD, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_rebuildAction->text()); + cmd->setDescription(d->m_rebuildAction->text()); mbuild->addAction(cmd, Constants::G_BUILD_PROJECT); // deploy action @@ -706,7 +706,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_deployAction, Constants::DEPLOY, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_deployAction->text()); + cmd->setDescription(d->m_deployAction->text()); mbuild->addAction(cmd, Constants::G_BUILD_PROJECT); // Publish action @@ -714,7 +714,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_publishAction, Constants::PUBLISH, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_publishAction->text()); + cmd->setDescription(d->m_publishAction->text()); mbuild->addAction(cmd, Constants::G_BUILD_PROJECT); // clean action @@ -722,7 +722,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_cleanAction, Constants::CLEAN, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_cleanAction->text()); + cmd->setDescription(d->m_cleanAction->text()); mbuild->addAction(cmd, Constants::G_BUILD_PROJECT); // build action (context menu) @@ -730,7 +730,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_buildActionContextMenu, Constants::BUILDCM, projecTreeContext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_buildActionContextMenu->text()); + cmd->setDescription(d->m_buildActionContextMenu->text()); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); // rebuild action (context menu) @@ -738,7 +738,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_rebuildActionContextMenu, Constants::REBUILDCM, projecTreeContext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_rebuildActionContextMenu->text()); + cmd->setDescription(d->m_rebuildActionContextMenu->text()); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); // deploy action (context menu) @@ -746,7 +746,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_deployActionContextMenu, Constants::DEPLOYCM, projecTreeContext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_deployActionContextMenu->text()); + cmd->setDescription(d->m_deployActionContextMenu->text()); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); // clean action (context menu) @@ -754,7 +754,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er Utils::ParameterAction::AlwaysEnabled, this); cmd = am->registerAction(d->m_cleanActionContextMenu, Constants::CLEANCM, projecTreeContext); cmd->setAttribute(Core::Command::CA_UpdateText); - cmd->setDefaultText(d->m_cleanActionContextMenu->text()); + cmd->setDescription(d->m_cleanActionContextMenu->text()); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); // build without dependencies action