| Summary: | [Change Method Signature] does not add imports for default expression | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Zorzella Mising name <zorzella> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | deepakazad |
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
Moving to JDT/UI Imports are currently not added for the default expression - the expression is just inserted as-is. 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. I just tested this (on 4.7), and the problem remains. You need two classes to see it. Here's a way to repro: **************** public class Bug144493 { // Add RoundingMode as a parameter, default to RoundingMode.HALF_UP void A() {} } ***************** public class Bug144493B { void B() { new Bug144493().A(); } } |
If a have a method public void A () {...} and I refactor it, adding a parameter that defaults to an enum (say "RoundingMode.HALF_UP"), the refactoring will not automatically add an import to the enum ("RoundingMode" in this case) to the files affected by the refactoring. Z