Skip to content

Commit a76efea

Browse files
committed
PyDebugger: Add handler for UpdateWatch (C::B debugger API change)
1 parent 6841cfb commit a76efea

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

PythonCodeCompletion/PythonCodeCompletion.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ int PythonCodeCompletion::CodeComplete()
406406
// ed->GetControl()->AutoCompSetChooseSingle(m_IsAutoPopup ? false : m_CCAutoSelectOne);
407407
ed->GetControl()->AutoCompSetAutoHide(true);
408408
// ed->GetControl()->AutoCompSetDropRestOfWord(m_IsAutoPopup ? false : true);
409-
wxString final = GetStringFromArray(m_comp_results, _T("\n"));
409+
// wxString final = GetStringFromArray(m_comp_results, _T("\n"));
410+
wxString final = GetStringFromArray(m_comp_results, _T(" "));
410411
final.RemoveLast(); // remove last space
411412

412413
ed->GetControl()->AutoCompShow(pos - start, final);

PythonDebugger/PyDebugger.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,19 @@ void PyDebugger::CollapseWatch(cb::shared_ptr<cbWatch> watch)
820820
}
821821
}
822822

823+
void PyDebugger::UpdateWatch(cb::shared_ptr<cbWatch> watch)
824+
{
825+
if(IsRunning())
826+
{
827+
watch->RemoveChildren(); //TODO: Update instead of removing children
828+
829+
wxString symbol;
830+
watch->GetSymbol(symbol);
831+
DispatchCommands(_T("ps ")+symbol+_T("\n"),DBGCMDTYPE_WATCHEXPRESSION);
832+
833+
}
834+
}
835+
823836
void PyDebugger::OnWatchesContextMenu(wxMenu &menu, const cbWatch &watch, wxObject *property)
824837
{
825838
}

PythonDebugger/PyDebugger.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ class PyDebugger : public cbDebuggerPlugin
244244
virtual bool SetWatchValue(cb::shared_ptr<cbWatch> watch, const wxString &value);
245245
virtual void ExpandWatch(cb::shared_ptr<cbWatch> watch);
246246
virtual void CollapseWatch(cb::shared_ptr<cbWatch> watch);
247+
virtual void UpdateWatch(cb::shared_ptr<cbWatch> watch);
247248
virtual void OnWatchesContextMenu(wxMenu &menu, const cbWatch &watch, wxObject *property);
248249

249250
virtual void SendCommand(const wxString& cmd, bool debugLog) {}

0 commit comments

Comments
 (0)