eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
32 stars 79 forks source link

Add quickfix to suggest types for constructor type mismatch #1446

Closed hopehadfield closed 2 weeks ago

hopehadfield commented 1 month ago

What it does

Addresses https://github.com/redhat-developer/vscode-java/issues/3040 quickfix-draft

How to test

Get quickfix for a constructor invocation that does not match the type of the variable it's being assigned to

Author checklist

rgrunber commented 2 weeks ago

The last thing I noticed is that completion is clearly not displaying all possible constructors. You can see this by playing around with an expression like : Set foo = new | vs. Set foo = new H| . I don't think there's anything we can do here with our current implementation via. codeComplete.

This feature is in a much better state, so maybe we can take it as-is and improve it down the road.