Bug 462458 - Show Map Logical Structure as key - value
Summary: Show Map Logical Structure as key - value
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 07:31 EDT by Didier Loiseau CLA
Modified: 2015-03-24 04:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Didier Loiseau CLA 2015-03-18 07:31:59 EDT
The current (default) display of the logical structure for maps remains quite difficult to use since the map is converted to an array:
- the Map "fields" are shown as array indexes, which is useless in most cases (the index does not have a meaning for most map implementations);
- the Map values are shown using the default Map.Entry.toString() (e.g. "key=value"), but it is not always readable and does not allow to use the detail formatter of the keys and values.

My idea would thus be that the "fields" of a Map would be dynamically computed as the entry key, and of course their associated value would be the entry value.

The grouping of keys by 100 items should remain though.

It think this could be configured by defining a "Dynamic List of variables" as the logical structure, providing 3 code snippets to evaluate:
- the conversion to an Iterable or Array
- the computation of the "key" for each item in the previously computed iterable
- the computation of the corresponding "value"

For reference, I found a SO question asking for this feature:
http://stackoverflow.com/questions/7275520/eclipse-debugging-hashmap-logical-structure-using-key-and-values-tostring-me
Comment 1 Sarika Sinha CLA 2015-03-24 02:57:21 EDT
Have you tried using the "Show Logical Structure" button on the Variables tab ?
Comment 2 Didier Loiseau CLA 2015-03-24 04:42:35 EDT
Yes, my idea would be to improve that feature, having keys displayed on the left, and values displayed on the right.