Xcode: Display protocol next to extension in Document Items menu

Originator:rsfinn
Number:rdar://25134260 Date Originated:13-Mar-2016
Status:Duplicate/25089918 (Open) Resolved:18-Mar-2016
Product:Developer Tools Product Version:Xcode 7.2.1
Classification:Enhancement Reproducible:
 
[ref rdar://25089918]

To facilitate the style of Swift development that promotes implementation of conformance to a protocol in separate extensions, it would be helpful if the Document Items pulldown menu displayed the name of the protocol next to the class name for each extension where this occurs.

I had just finished removing separate extensions from my Swift code because the repeated "MyClass / MyClass / MyClass" items in the menu were unhelpful if not confusing, when I came across an article espousing this improvement. I'm submitting this report to add my voice in support.

Steps to Reproduce:
1. Visit a Swift source file that has multiple extensions for a class that implement different protocols, e.g.:

class MyClass {
...
}

extension MyClass : Protocol1 {
...
}

extension MyClass : Protocol2 {
...
}

2. Open the Document Items menu in the Xcode jump bar.

Expected Results:
A display of the various extensions with protocols listed:
----
MyClass
...
MyClass : Protocol1
...
MyClass : Protocol2
...
etc.

Actual Results:
A repeated display of the class name, without any useful navigational hints:
----
MyClass
...
MyClass
...
MyClass
...
etc.

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!