Permalink
Browse files

Add Type column to VariablesView. Resolves #9779.

  • Loading branch information...
1 parent c81a7bd commit c05a041eac2efd14e3e77ac1cc0f3e89fe89f4c5 @anevilyak anevilyak committed May 18, 2013
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
@@ -1110,7 +1110,7 @@ VariablesView::VariableTableModel::ValueNodeValueChanged(ValueNode* valueNode)
int32
VariablesView::VariableTableModel::CountColumns() const
{
- return 2;
+ return 3;
}
@@ -1198,6 +1198,15 @@ VariablesView::VariableTableModel::GetValueAt(void* object, int32 columnIndex,
_value.SetTo(node, VALUE_NODE_TYPE);
return true;
+ case 2:
+ {
+ Type* type = node->GetType();
+ if (type == NULL)
+ return false;
+
+ _value.SetTo(type->Name(), B_VARIANT_DONT_COPY_DATA);
+ return true;
+ }
default:
return false;
}
@@ -1889,6 +1898,8 @@ VariablesView::_Init()
B_TRUNCATE_END, B_ALIGN_LEFT));
fVariableTable->AddColumn(new VariableValueColumn(1, "Value", 80, 40, 1000,
B_TRUNCATE_END, B_ALIGN_RIGHT));
+ fVariableTable->AddColumn(new StringTableColumn(2, "Type", 80, 40, 1000,
+ B_TRUNCATE_END, B_ALIGN_LEFT));
fVariableTableModel = new VariableTableModel;
if (fVariableTableModel->Init() != B_OK)

0 comments on commit c05a041

Please sign in to comment.