Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Shortcut not working for swift files #10

Open
lyahdav opened this issue Sep 19, 2015 · 2 comments
Open

Shortcut not working for swift files #10

lyahdav opened this issue Sep 19, 2015 · 2 comments

Comments

@lyahdav
Copy link

lyahdav commented Sep 19, 2015

I have files in my project called Form.swift and FormTests.swift. Pressing the keyboard shortcut Cmd + Shift + T does nothing. Doing this in an Objective C project works fine.

@kenji21
Copy link
Contributor

kenji21 commented Sep 21, 2015

Just tested it, "cmd + shift + T" do the TestSwift.swift -> TestSwiftTests.swift, but do not came back to TestSwift.swift

Edit : still using xcode 6.4

@kenji21
Copy link
Contributor

kenji21 commented Sep 21, 2015

Ok, found why :

On "back to code cmd+shift+t", the sourceFile is used, while swift file is in headerFile :

[[self XcodeNavigatorClassSeam] jumpToFileURL:[NSURL fileURLWithPath:referenceCollection.sourceFile.absolutePath]];

Quick fix :

            if( referenceCollection.sourceFile.absolutePath ) {
                [[self XcodeNavigatorClassSeam] jumpToFileURL:[NSURL fileURLWithPath:referenceCollection.sourceFile.absolutePath]];
            } else {
                [[self XcodeNavigatorClassSeam] jumpToFileURL:[NSURL fileURLWithPath:referenceCollection.headerFile.absolutePath]];
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants