Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SourceKit editor.open request doesn't return global declarations or enum cases #135

Closed
beltex opened this issue Jan 2, 2015 · 3 comments

Comments

@beltex
Copy link
Contributor

beltex commented Jan 2, 2015

Currently, enum cases (not the enum itself) are only shown if documented individually. However, enum cases are often self-explanatory and wouldn't have any documentation (units, currency, etc.). Thus, I think it be handy to have all cases shown in the enum declaration by default (or at least in the See more link).

@jpsim jpsim changed the title Show enum cases by default SourceKit editor.open request doesn't return global declarations or enum cases Jan 2, 2015
@jpsim jpsim added the sourcekit label Jan 2, 2015
@jpsim
Copy link
Collaborator

jpsim commented Jan 2, 2015

This is a bug in SourceKit on Apple's side, unfortunately. See rdar://18845613.

We could add a workaround to sourcekitten by making cursorinfo requests for offsets at case * when an source.lang.swift.decl.enum is detected. Only searching for case * inside the enum body based on its bodyoffset and bodylength.

@beltex
Copy link
Contributor Author

beltex commented Jan 2, 2015

Darn, thanks @jpsim!

@jpsim
Copy link
Collaborator

jpsim commented Jan 2, 2015

Closing as dupe of #74.

@jpsim jpsim closed this as completed Jan 2, 2015
@istx25 istx25 modified the milestone: The Past Nov 22, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants