mthiesen / Xcode_copy_line

Xcode plug-in to copy/cut the current line when there is no selected text
MIT License
32 stars 8 forks source link

Hook into applicationDidFinishLaunching: in order to get menu item refs. #8

Closed kreeger closed 9 years ago

kreeger commented 9 years ago

This fixes the issue I discovered in #7, and is backwards compatible with previous releases of Xcode 6.

As of Xcode 6.4, it seems plugins are now loaded in Xcode's applicationWillFinishLaunching method, which means that [NSApp mainMenu] isn't populated at plugin init time. What I've done is offload the command "binding" to a method that gets fired upon being notified of NSApplicationDidFinishLaunchingNotification. Voila!