Aviator icon indicating copy to clipboard operation
Aviator copied to clipboard

Shortcut not working for swift files

Open lyahdav opened this issue 10 years ago • 2 comments

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.

lyahdav avatar Sep 19 '15 19:09 lyahdav

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 avatar Sep 21 '15 13:09 kenji21

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]];
            }

kenji21 avatar Sep 21 '15 13:09 kenji21