Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8568877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:12:20+00:00 2026-06-11T18:12:20+00:00

I have some collections that I would like to analyze in the Eclipse debugger.

  • 0

I have some collections that I would like to analyze in the Eclipse debugger. I am interested in a particular attribute of each element.

Let’s take an example with a list of Persons (each one with an address attribute which in turn has a city attribute). In the debugger I can either look at each element or look at list.get(i).address.city.

Doing this for large structures is not really helpful. Is there the possibility to apply a function to a data structure, something similar to the map function in Perl (in the debugger not in the code).

The input would be my list with the path I am interested in (Person.address.city), the output a list with just the selected elements (a list of cities with my example).

In Perl:

map { $_->{address}->{city} } @list

Edit

I am able to generate a String with a Detail Formatter:

StringBuilder sb = new StringBuilder();
for (Person p : this) {
    sb.append(p.address.city());
    sb.append(", ");
}
return sb.toString();

This will format my list with just the elements I am interested in (as a String).

Although it goes in the right direction it would be nice if I could return a new List that I can analyze with the debugger.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:12:21+00:00Added an answer on June 11, 2026 at 6:12 pm

    I think, the Eclipse Debugger feature you are interested is called logical structures. You could define a logical structure in Eclipse preferences (Java/Debug/Logical structures), where you could write such an expression (hopefully), and then on the variables view you could replace the display of the list in the pop-up menu.

    See this blog post for basic ideas: http://www.javalobby.org/forums/thread.jspa?threadID=16736&messageID=91823528

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class with some collections in them, and I would like to
Suppose I have a Collection of some kind that itself contains Collections; e.g., Dictionary(Of
I have some code that looks like this: foreach(var obj in collection) { try
I have some javascript objects that I'd like to collaboratively manipulate, but am having
I have created a html5 canvas and javascript signature pad that I would like
I have a design issue that I would appreciate some input on. I would
I have an enum that I would like to randomly select a value from,
I have an object that has a KeyValuePair type property. I would like to
I have a view that's doing a fetch() to a collection and returning some
I have some Linux code that monitors our hardware by collecting temperatures, voltages, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.