Bug 449106 - [clean up] Convert anonymous class or lambda <-> method reference
Summary: [clean up] Convert anonymous class or lambda <-> method reference
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 458329 499863
Blocks:
  Show dependency tree
 
Reported: 2014-10-28 15:53 EDT by Markus Keller CLA
Modified: 2020-05-18 08:05 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2014-10-28 15:53:12 EDT
Add Clean Up functionality to convert between anonymous class or lambda expression and method reference forms.

A solution could be to replace the "Use lambda where possible" option with "Use lambda or method reference where possible" and just always go the full way if possible.

On the other hand, method references are not always shorter than lambda expressions (e.g. when the class name is long), so maybe users should have the freedom to chose among possible conversions.
Comment 1 Markus Keller CLA 2016-12-21 12:26:06 EST
We should have a solution for bug 499863, and we need a thorough analysis of the current implementation for other potential semantic changes before we can offer the current Quick Assists (and bug 458329) as Clean Ups.
Comment 2 Lars Vogel CLA 2019-12-03 09:05:28 EST
Fabrice, can you contribute your lambda cleanup action which uses method reference via this bug?
Comment 3 Lars Vogel CLA 2020-05-18 08:05:15 EDT
We have this available as cleanup action.