Bug 340145

Summary: [quick fix] Problems with nested captures in quick fixes and extract ... refactorings
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Bug Depends on: 150657    
Bug Blocks:    

Description Markus Keller CLA 2011-03-16 08:20:58 EDT
HEAD, same problem in 3.6.2 and 3.5.2

The fix for bug 103044 in ImportRewrite#addImport(*) doesn't solve the examples from bug 103044 in a satisfying way, since it completely removes the type argument and replaces it with a '?'. Furthermore, the quick fixes now propose types that are different from what actually happens in code (the types in the proposals are also wrong, since they would lead to compile errors).

The problem is in TypeChangeCorrectionProposal, which just uses ASTResolving.getRelaxingTypes(*). It should also do something like Bindings#normalizeForDeclarationUse(*). Unfortunately, the latter also doesn't handle nested captures correctly. Since we cannot create new bindings efficiently, we probably need a new addImport method that does everything right.
Comment 1 Eclipse Genie CLA 2019-04-12 13:04:33 EDT
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.
Comment 2 Eclipse Genie CLA 2021-04-05 03:17:16 EDT
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.
Comment 3 Eclipse Genie CLA 2023-05-06 19:18:58 EDT
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.