For non-source files like text files it is not necessary to activate the debugging tools (and the "Execute" tool in principle as well). For the "Execute" tool it is possible to redirect it to "load" in this case.
Analysis:
To redirect "Execute" a little change in NumeReWindow::OnDebugCommand() is required, where we have to consider, that not all file types should be "started" rather than "loaded".
To achieve the deactivation of the debug tool bar, we have to add a case in NumeReWindow::OnUpdateDebugUI().
Implementation:
In NumeReWindow::OnDebugCommand() the following lines were added:
...
else
{
command = "load \"" + command + "\"";
}
In NumeReWindow::OnUpdateDebugUI() the following changes were included:
if (m_currentEd->GetFileName().GetExt() == "nscr" || m_currentEd->GetFileName().GetExt() == "nprc")
{
tb->EnableTool(ID_DEBUG_ADDEDITORBREAKPOINT, true);
tb->EnableTool(ID_DEBUG_REMOVEEDITORBREAKPOINT, true);
tb->EnableTool(ID_DEBUG_CLEAREDITORBREAKPOINTS, true);
}
else
{
tb->EnableTool(ID_DEBUG_ADDEDITORBREAKPOINT, false);
tb->EnableTool(ID_DEBUG_REMOVEEDITORBREAKPOINT, false);
tb->EnableTool(ID_DEBUG_CLEAREDITORBREAKPOINTS, false);
}
as well as OnUpdateDebugUI() was added to the notebook page change event.
These changes solves the issues.
Documention:
Not needed - Bug fix.
Tests:
This fix was verified in a durability test. Bug fix accepted.
Anonymous
Diff:
Diff:
Diff:
Diff:
Diff: