Xcodeで開いているファイルをAppCodeで開くAppleScriptを作成しました。
まずAppCodeのメニューTools->Create Command-line Launcher…
でコマンドを作成します。
以下のスクリプトを実行するとXcodeで開いているファイルがAppCodeで開かれます。Xcodeでカーソルがある行にカーソルが移動します。
tell application "Xcode"
set projectPath to path of active workspace document
set projectFolder to characters 1 thru -((offset of "/" in (reverse of items of projectPath as string)) + 1) of projectPath as string
set currentDocument to document 1 whose name ends with (word -1 of (get name of window 1))
set filePath to path of currentDocument
set range to selected paragraph range of currentDocument
set lineNumber to item 1 of range
do shell script "/usr/local/bin/appcode " & projectFolder & " " & filePath & ":" & lineNumber
end tell
私はAlfredで実行できるように設定しました。これでXcodeからAppCodeへの移動が楽になりました。