Community
Participate
Working Groups
M6 test candidate Steps to reproduce: - Create the following method: /** * @param string */ public void foo(String string) { String s= new String(); } - Invoke introduce parameter on constructor invocation - Consult preview -> Clicking on the "AboutDialog", "foo(String" and "Change signature" tree item shows erroneous change
Markus, this might be Introduce parameter or the refactoring framework. Can you please investigate and move to me if it is framework related.
Dirk, the TextEdits look fine. AFAICS, the problem is in TextChange #getPreviewContent(TextEditChangeGroup[], IRegion, boolean, int, IProgressMonitor) , probably in the LocalTextEditProcessor that flattens edits. PS: You can also reproduce this with ChangeMethodSignature by just adding a parameter - that reduces the amount of generated edits. PPS: Bug 90295 doesn't seem to have an influence on this.
Markus, as discussed moving back to you. If easy to fix ( < 1 hour) do it. Otherwise we can ship 3.1 with the bug.
Fixed in HEAD. For completeness: the preview looked like this: /** * @param string * @param string2 TODO@param string */ public void foo(String string, String string2) { String s= string2; } I opened bug 90471 to track the underlying issue in the ASTRewrite.