hrev45553 adds 1 changeset to branch 'master' old head: 7b6fd5d1a8c1585a055dc7a5c21ed1ee7a47d9c9 new head: bbaaaf2eae7dd43553adfbc5f801c2602eec1d21 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=bbaaaf2+%5E7b6fd5d ---------------------------------------------------------------------------- bbaaaf2: Improve VariableView's tooltip handling. - Make GetToolTipInfo() sensitive to the column being hovered over. If hovering over the variable name, we display its value location information as before. However, if hovering over the value column, the tooltip now displays the full value of the variable, if available. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45553 Commit: bbaaaf2eae7dd43553adfbc5f801c2602eec1d21 URL: http://cgit.haiku-os.org/haiku/commit/?id=bbaaaf2 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Thu Apr 25 01:17:49 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 37 insertions(+), 20 deletions(-) .../gui/team_window/VariablesView.cpp | 57 +++++++++++++------- ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp index fbae043..4d0b341 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -1248,31 +1248,48 @@ VariablesView::VariableTableModel::GetToolTipForTablePath( if (node->NodeChild()->LocationResolutionState() != B_OK) return false; - ValueLocation* location = node->NodeChild()->Location(); BString tipData; - for (int32 i = 0; i < location->CountPieces(); i++) { - ValuePieceLocation piece = location->PieceAt(i); - BString pieceData; - switch (piece.type) { - case VALUE_PIECE_LOCATION_MEMORY: - pieceData.SetToFormat("(%" B_PRId32 "): Address: %#" B_PRIx64 - ", Size: %" B_PRId64 " bytes", i, piece.address, piece.size); - break; - case VALUE_PIECE_LOCATION_REGISTER: - { - Architecture* architecture = fThread->GetTeam()->GetArchitecture(); - pieceData.SetToFormat("(%" B_PRId32 "): Register (%s)", - i, architecture->Registers()[piece.reg].Name()); + switch (columnIndex) { + case 0: + { + ValueLocation* location = node->NodeChild()->Location(); + for (int32 i = 0; i < location->CountPieces(); i++) { + ValuePieceLocation piece = location->PieceAt(i); + BString pieceData; + switch (piece.type) { + case VALUE_PIECE_LOCATION_MEMORY: + pieceData.SetToFormat("(%" B_PRId32 "): Address: %#" + B_PRIx64 ", Size: %" B_PRId64 " bytes", i, + piece.address, piece.size); + break; + case VALUE_PIECE_LOCATION_REGISTER: + { + Architecture* architecture = fThread->GetTeam() + ->GetArchitecture(); + pieceData.SetToFormat("(%" B_PRId32 "): Register (%s)", + i, architecture->Registers()[piece.reg].Name()); + break; + } + default: + break; + } - break; + tipData += pieceData; + if (i < location->CountPieces() - 1) + tipData += "\n"; } - default: - break; + break; } + case 1: + { + Value* value = node->GetValue(); + if (value != NULL) + value->ToString(tipData); - tipData += pieceData; - if (i < location->CountPieces() - 1) - tipData += "\n"; + break; + } + default: + break; } if (tipData.IsEmpty())