I have recently started to use Eclipse after using IntelliJ for a few years. When debugging Map using IntelliJ, if the key or object implements toString(), a nice list of string representation of key-value is displayed.
In Eclipse, when I select Show Logical Structure, I see something like the following:
The problem with this view is that you will need to expand each entry to see the actual key and value. If you need to find something in a map of more than 10 elements, it becomes very tedious.
I understand that you can make custom Logical Structure and the default for Map look the this:
return entrySet().toArray();
Is there any way, either through custom Logical Structure or plugin to view Map Entries more useful than
ConcurrentHashMap$WriteThroughEntry (id=193)
You need to create a detail formatter on top of the logical structure. In the example screenshot you provided, your logical structure is ConcurrentHashMap$WriteThroughEntry. You can add the detail formatter by right clicking on a row containing a ConcurrentHashMap$WriteThroughEntry and selecting 'add detail formatter'.
I just knocked up this example using HashMap.
java.util.HashMap$Entry // key + " - " + value
For a
HashMap<Integer,String> map;
.. I quickly populated with rubbish, I now see:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With