devtools: Show index on dynamic widgets in the tree

This commit is contained in:
Max Weber
2018-06-27 05:48:37 -06:00
parent af0fdb1d49
commit 181c4a0abf

View File

@@ -49,8 +49,21 @@ class WidgetTreeNode extends DefaultMutableTreeNode
public String toString()
{
Widget widget = getWidget();
int id = widget.getId();
String str = type + " " + TO_GROUP(id) + "." + TO_CHILD(id);
if (widget.getIndex() != -1)
{
str += "[" + widget.getIndex() + "]";
}
WidgetInfo info = WidgetInspector.getWidgetInfo(id);
return type + " " + TO_GROUP(id) + "." + TO_CHILD(id) + ((info != null) ? " " + info.name() : "");
if (info != null)
{
str += " " + info.name();
}
return str;
}
}