onmyway133 / XcodeWay

:sailboat: An Xcode Source Editor Extension that helps navigating to many places easier
https://onmyway133.com/
MIT License
556 stars 37 forks source link

Refactor opening iTerm #14

Closed zenangst closed 8 years ago

zenangst commented 8 years ago

This PR refactors opening iTerm from Xcode. I had problems opening iTerm2 because it couldn’t find the binary that is was pointing to. Also, when I changed it to point to the new one, it always opened a new instance of iTerm which is not typically what you want.

This is now fixed by refactoring FTGiTermNavigator.m

    if ([[NSWorkspace sharedWorkspace] launchApplication:@"iTerm"] == NO) {
        [NSAlert ftg_showMessage:@"Could not launch iTerm"];
    }

So instead of opening the binary file for the app, it uses the shared workspace which would either open iTerm if it isn’t open or bring it to front if it is.

Hope you like it