krzysztofzablocki / LinkedConsole

Clickable links in your Xcode console, so you never wonder which class logged the message.
http://merowing.info
MIT License
931 stars 63 forks source link

Open files from outside Xcode #36

Closed 0xced closed 8 years ago

0xced commented 8 years ago

The xed command line tool is supposed to provide this feature but is unfortunately terribly broken (the radar still holds true as of Xcode 7.3.1).

This pull request adds the equivalent to xed [--line lineno] file with distributed notifications.

[[NSDistributedNotificationCenter defaultCenter]
    postNotificationName:@"pl.pixle.KZLinkedConsole.OpenFile"
                  object:@"JRSwizzle.m"
                userInfo:@{ @"Line": @105 }
      deliverImmediately:YES];
/usr/bin/python -c "from Foundation import NSDistributedNotificationCenter; NSDistributedNotificationCenter.defaultCenter().postNotificationName_object_userInfo_deliverImmediately_('pl.pixle.KZLinkedConsole.OpenFile', 'JRSwizzle.m', None, True)"
krzysztofzablocki commented 8 years ago

awesome work! 👍