m_cmdLineEnabledEngines(AllEngineTypes),
m_cmdLineAttachPid(0),
m_cmdLineWinCrashEvent(0),
- m_toggleLockedAction(0)
+ m_toggleLockedAction(0),
+ m_peStartDebuggingAction(0)
{}
DebuggerPlugin::~DebuggerPlugin()
Core::ActionContainer *mstart =
am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
+ // Register an action "Continue" under a different context (Gdb Running)
+ // in the action manager under the "Start Debugging" action's id.
+ // Activating this context will then cause the "Start Debugging" action
+ // to switch to "Continue".
Core::Command *cmd = 0;
const DebuggerManagerActions actions = m_manager->debuggerManagerActions();
cmd = am->registerAction(actions.continueAction,
connect(resetToSimpleAction, SIGNAL(triggered()),
m_manager, SLOT(setSimpleDockWidgetArrangement()));
+ // Retrieve "Start debugging" action from Project explorer.
+ if (const Core::Command *dcmd = am->command(QLatin1String(ProjectExplorer::Constants::DEBUG))) {
+ m_peStartDebuggingAction = dcmd->action();
+ } else {
+ *errorMessage = QLatin1String("Internal error: Cannot access external actions");
+ return false;
+ }
+
// FIXME:
addAutoReleasedObject(new CommonOptionsPage);
addAutoReleasedObject(new DebuggingHelperOptionPage);
} else {
core->removeAdditionalContext(m_gdbRunningContext);
core->updateContext();
+ m_peStartDebuggingAction->setEnabled(state == DebuggerNotReady);
}
const bool started = state == InferiorRunning