Bug 578237 - Debug detail formatter does not accept call to ArrayList.stream()
Summary: Debug detail formatter does not accept call to ArrayList.stream()
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-17 01:18 EST by Frank Benoit CLA
Modified: 2024-01-08 05:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Benoit CLA 2022-01-17 01:18:17 EST
In debug "Variables" view, I want to create text output for each element of a list, one per line instead of comma separated.
So I select the list and edit the detail formatter.

The detail formatter is for a ArrayList.

I tried this:
this.stream()
	.map( i -> i.toString())
	.collect(java.util.stream.Collectors.joining("\n"))

Detail formatter error:
		The method stream() is undefined for the type ArrayList<E>


I suspected the stream() as default method being the problem. So I tried to inline the impl:
java.util.stream.StreamSupport.stream(this.spliterator(), false)
	.map( i -> i.toString())
	.collect(java.util.stream.Collectors.joining("\n"))

Detail formatter error:
		The method spliterator() from the type ArrayList<E> refers to the missing type Spliterator

I am not sure if this is my lack of knowledge how to use this. Or if this is a bug?
Comment 1 Eclipse Genie CLA 2024-01-08 05:40:15 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.