Commit a09a62af authored by mae's avatar mae

Create the submenu Debug/Start_Debugging. This does not

win any beauty design contents, but is a workaround for
the overlong debug menu. This needs cleanup for 1.3.
parent 2eacd1b7
......@@ -97,6 +97,8 @@ using namespace TextEditor;
namespace Debugger {
namespace Constants {
const char * const M_DEBUG_START_DEBUGGING = "QtCreator.Menu.Debug.StartDebugging";
const char * const STARTEXTERNAL = "Debugger.StartExternal";
const char * const ATTACHEXTERNAL = "Debugger.AttachExternal";
const char * const ATTACHCORE = "Debugger.AttachCore";
......@@ -597,22 +599,25 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
Core::ActionContainer *mdebug =
am->actionContainer(ProjectExplorer::Constants::M_DEBUG);
Core::ActionContainer *mstart =
am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
Core::Command *cmd = 0;
cmd = am->registerAction(m_manager->m_continueAction,
ProjectExplorer::Constants::DEBUG, QList<int>() << m_gdbRunningContext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_startExternalAction,
Constants::STARTEXTERNAL, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_attachExternalAction,
Constants::ATTACHEXTERNAL, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_attachCoreAction,
Constants::ATTACHCORE, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
/*
cmd = am->registerAction(m_attachTcfAction,
Constants::ATTACHTCF, globalcontext);
......@@ -621,7 +626,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
cmd = am->registerAction(m_startRemoteAction,
Constants::ATTACHREMOTE, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_detachAction,
Constants::DETACH, globalcontext);
......
......@@ -279,6 +279,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mdebug->menu()->setTitle(tr("&Debug"));
menubar->addMenu(mdebug, Core::Constants::G_VIEW);
Core::ActionContainer *mstartdebugging =
am->createMenu(Constants::M_DEBUG_STARTDEBUGGING);
mstartdebugging->menu()->setTitle(tr("&Start Debugging"));
mdebug->addMenu(mstartdebugging, Core::Constants::G_DEFAULT_ONE);
//
// Groups
......@@ -600,7 +604,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
cmd->setAttribute(Core::Command::CA_UpdateIcon);
cmd->setDefaultText(tr("Start Debugging"));
cmd->setDefaultKeySequence(QKeySequence(tr("F5")));
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstartdebugging->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
modeManager->addAction(cmd, Constants::P_ACTION_DEBUG, m_runConfigurationMenu);
// add new file action
......
......@@ -90,6 +90,7 @@ const char * const LANG_CXX = "CXX";
const char * const M_RECENTPROJECTS = "ProjectExplorer.Menu.Recent";
const char * const M_BUILDPROJECT = "ProjectExplorer.Menu.Build";
const char * const M_DEBUG = "ProjectExplorer.Menu.Debug";
const char * const M_DEBUG_STARTDEBUGGING = "ProjectExplorer.Menu.Debug.StartDebugging";
const char * const M_SESSION = "ProjectExplorer.Menu.Session";
// toolbars
......
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