void LLDBTooltip::OnLLDBVariableExpanded(LLDBEvent& event) { int variableId = event.GetVariableId(); wxUnusedVar(variableId); std::map<int, wxTreeItemId>::iterator iter = m_itemsPendingExpansion.find(event.GetVariableId()); if(iter == m_itemsPendingExpansion.end()) { // does not belong to us event.Skip(); return; } wxTreeItemId parentItem = iter->second; // add the variables to the tree for(size_t i = 0; i < event.GetVariables().size(); ++i) { DoAddVariable(parentItem, event.GetVariables().at(i)); } // Expand the parent item if(m_treeCtrl->HasChildren(parentItem)) { m_treeCtrl->Expand(parentItem); } // remove it m_itemsPendingExpansion.erase(iter); }
void LLDBPlugin::OnLLDBExpressionEvaluated(LLDBEvent& event) { CHECK_IS_LLDB_SESSION(); // hide any tooltip if(!event.GetVariables().empty() && m_mgr->GetActiveEditor()) { if(!m_tooltip) { m_tooltip = new LLDBTooltip(this); } m_tooltip->Show(event.GetExpression(), event.GetVariables().at(0)); } }
void LLDBLocalsView::OnLLDBLocalsUpdated(LLDBEvent& event) { // FIXME: optimize this to only retrieve the top levle variables // the children should be obtained in the 'OnItemExpading' event handler event.Skip(); wxWindowUpdateLocker locker(m_treeList); Enable(true); m_treeList->DeleteChildren(m_treeList->GetRootItem()); CL_DEBUG("Updating locals view"); DoAddVariableToView(event.GetVariables(), m_treeList->GetRootItem()); }
void LLDBLocalsView::OnLLDBVariableExpanded(LLDBEvent& event) { int variableId = event.GetVariableId(); // try to locate this item in our map LLDBLocalsView::IntItemMap_t::iterator iter = m_pendingExpandItems.find(variableId); if(iter == m_pendingExpandItems.end()) { // does not belong to us - skip it event.Skip(); return; } // add the variables DoAddVariableToView(event.GetVariables(), iter->second); m_pendingExpandItems.erase(iter); }