Re: In search of a shortcut to view docs for non-Apple APIs
Re: In search of a shortcut to view docs for non-Apple APIs
- Subject: Re: In search of a shortcut to view docs for non-Apple APIs
- From: James Bucanek <email@hidden>
- Date: Sun, 9 Jul 2006 08:13:09 -0700
Sean McBride wrote on Friday, July 7, 2006:
>Hi all,
>
>In Xcode one can option-double click an Apple API such as Gestalt() to
>read about it in the Documentation Window. Very handy!
>
>Is there any way to hook into that myself?
You can, but your choices are limited and it's not a smooth or well-integrated process.
I discuss this in my book at some length, but basically you can add your own HeaderDoc compiled documentation to the existing collection of Apple supplied docs and then reindex the whole lot. Once that's done, your added documentation will be included along with the rest of the Reference Library. This includes API and keyword searches, documentation links in the Class Browser, the Option-Double-click shortcut, and so on.
>For example, I use a 3rd party library that has doxygen documentation on
>the web. Can I make a plugin or something such that if the text
>'vtkSphereSource' is option-double clicked I am taken to the URL <http://
>www.vtk.org/doc/nightly/html/classvtkSphereSource.html> instead of an
>empty Apple documentation window?
As far as I know, Xcode only supports HeaderDoc formatted/compiled documentation. If you could recompile the documentation using HeaderDoc it might be possible to place the documents on some external source via the Extended Location list in the Documentation settings. But you would first have had to create and index a local copy before Xcode will go looking for an external document to satisfy a request.
>If there is no way to have Xcode co-operate with me, is my next best
>option a Service?
You might also consider a custom menu command/script. It would be trivial to create a custom command script that takes the currently selected word in the text and creates a URL query out of it. That URL could pass the search term to a web site that would find the documentation and open the results in a new browser window. Custom commands can be bound to keyboard shortcuts, although not the Option-double-click shortcut that's built into Xcode.
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden