601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
|
# File 'ext/ae-ruby-debug/ae-ruby-debug.rb', line 601
def var_deep(_var, _hash)
return nil if _hash.nil?
return _hash.to_s if _hash.class != Hash
if _hash['__CLASS__']=='Array'
_sorted_keys = _hash.keys.collect!{|x| x.to_i}.sort.collect!{|x| x.to_s}
else
_sorted_keys = _hash.keys.collect!{|x| x.to_s}.sort
end
_sorted_keys.each{|k|
v = _hash[k]
next if k=='__CLASS__'
_complex = v.class == Hash
if _complex
_text = var_format(k,v['__CLASS__'])
elsif (k=='__LENGTH__') && v=='0'
_text = '{}'
elsif (k=='__LENGTH__') && v!='0'
next
elsif _hash['__CLASS__']=='Array'
_text = var_format(k.rjust(_hash['__LENGTH__'].length),nil,v,false)
else
_text = var_format(k,nil,v)
end
_node = node_name(k, _var)
if @tree_var.exist?(_node)
@tree_var.itemconfigure(_node, 'text' => _text)
else
@tree_var.insert('end', _var ,_node, Arcadia.style('treeitem').update({
'text' => _text,
'helptext' => v,
'anchor'=>'w'
}))
end
var_deep(_node,v) if _complex
}
end
|