| Summary: | [change method signature][refactoring] The Change Method Signature refactoring doesn't always get logged correctly. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Mohsen Vakilian <reprogrammer> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | deepakazad, nchen, reprogrammer, snegara2 |
| Version: | 3.7.1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=365233 | ||
| Whiteboard: | stalebug | ||
|
Description
Mohsen Vakilian
(In reply to comment #0) > 2. If you use the Change Method Signature to reorder the parameters of C.m from > "int a, int b" to "int b, int a", Eclipse will record the refactoring as the > following in > > <refactoring comment="Change method 'int C.m(int b, int a)' to 'int m(int b, > int a)' > > 3. Similarly, if you use the Change Method Signature refactoring to rename the > second parameter of the method C.m from "b" to "c", > > <refactoring comment="Change method 'int C.m(int a, int c)' to 'int m(int a, > int c)' The refactoring comments are wrong in both cases, and this is what a user would see in the refactoring history dialog. (The actual refactoring is recorded correctly and you can successfully create and apply a refactoring script) Fix to go somewhere in org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor.getOldMethodSignature() This should also fix similar problems in other refactorings, see call hierarchy of above mentioned method. (In reply to comment #1) > (In reply to comment #0) > > 2. If you use the Change Method Signature to reorder the parameters of C.m from > > "int a, int b" to "int b, int a", Eclipse will record the refactoring as the > > following in > > > > <refactoring comment="Change method 'int C.m(int b, int a)' to 'int m(int b, > > int a)' > > > > 3. Similarly, if you use the Change Method Signature refactoring to rename the > > second parameter of the method C.m from "b" to "c", > > > > <refactoring comment="Change method 'int C.m(int a, int c)' to 'int m(int a, > > int c)' > > The refactoring comments are wrong in both cases, and this is what a user would > see in the refactoring history dialog. (The actual refactoring is recorded > correctly and you can successfully create and apply a refactoring script) Yes, the captured refactoring descriptors can be used to replay the refactorings, but, the comment attributes are misleading to the user. 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. |