Swift and Xcode Code folding

Originator:MostlyAnthony
Number:rdar://21760537 Date Originated:09-Jul-2015 08:53 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.4 (6E35b)
Classification:Enhancement Reproducible:Always
 
Summary:
Xcode currently allows only functions and classes. Extensions and variables are exempt from this for some unknown reason. The ability to collapse large blocks of computed get and set blocks inside of variables would be a huge help in improving readability of large files.

Steps to Reproduce:
1. Create a new class
2. Add a var with a get and set block
3. Try to fold everything

Expected Results:
class Test {
    var foldedBool: Bool! { ... }

    func foldedFuntion() { ... }
}

extension Class { ... }

Actual Results:
This is currently what happens with Swift with Xcode
class Test {
    var foldedBool: Bool! {
       // This entire block is not collapsible
        get {
              return value
        }
        set(newValue) {
              save(newValue)
        }
    }

    func foldedFuntion() { ... }
}

extension Class {
    // Any computed properties are left unfolded (open)
    // All functions are folded nice and neatly
}

Version:
Xcode 6.4 (6E35b)

Notes:


Configuration:
This happens every time

Attachments:

Comments

filed as rdar://23344912 also

By mason.at.fivespeed at Oct. 31, 2015, 12:39 p.m. (reply...)

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!