How can one match this pattern inside CtForEach and CtLambda
Open
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
Given snippet that looks like `list.forEach(item -> assertTrue(setBasedOnList.contains(item)));`
I would like to transform it to:
`list.forEach(item -> {});`,
such that I could insert multiple CtStatement inside the CtBlock.
Ps. I also encountered weird behavior where snippet.getElement(TypeFil... (CtForEach.class)) outputs null.
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.