Xcode Edit All in Scope should be split argument label and parameter name
| Originator: | mayoff | ||
| Number: | rdar://32697739 | Date Originated: | 10-Jun-2017 11:07 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Version 9.0 beta (9M136h) / 10.13 Beta (17A264c) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
Dear Xcoderinos,
This description will be best understood if viewed in a monospaced font and with line wrapping.
import Cocoa
class MyView: NSView {
required init?(coder: NSCoder) {
super.init(coder: coder)
/* ↑
I should be able to use Edit All in Scope on this variable without changing the argument label in the method signature. I'm talking about the identifier `coder` *after* the colon.
Say I use Edit All In Scope on it and change it to `decoder`. Then Xcode changes the method signature to
required init?(decoder: NSCoder)
That no longer overrides the superclass's method (or, if you prefer, fulfills the superclass's init requirement).
Xcode should recognize that `coder` is (before the rename) both the argument label and the parameter name. Edit All in Scope should therefore split the two apart, inserting the new name as a separate parameter name while preserving the original argument label, producing
required init?(coder decoder: NSCoder)
*/
}
}
Love,
Rob
Steps to Reproduce:
Expected Results:
Actual Results:
Version:
Version 9.0 beta (9M136h) / 10.13 Beta (17A264c)
Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!