Repair XCode 1.5 documentation and code completion

Sep 01, '04 09:35:00AM

Contributed by: Anonymous

Apple recently updated XCode to version 1.5. One of the changes was the addition of Java code completion. This is a feature I highly anticipated. But it turned out that it was broken. Especially with the built-in classes, which where hardly ever recognised.

The first time you want to view the Java documentation, you have to unarchive it with a script that Apple provides. It turns out that this script calls a helper Application named pbhelpindexer, which indexes all the html files for searching and code completion.

After a little experimentation I found that this application searches for a specific file called "MacOSXDeveloper.pbHelpIndexerList" in /Developer -> Documentation -> Help -> Developer Help Viewer. In this file the location of the html pages are stored. If it doesn't find this file, it searches for the documentation at the default location. Unfortunately Apple changed the default location from /Developer -> Documentation to /Developer -> ADC Reference Library, and didn't tell this to the application. But interestingly enough, they updated the file.

The solution is simple: Open Terminal and then do:

sudo cp "/Developer/ADC Reference Library/documentation/Help/Developer\
 Help Viewer/MacOSXDeveloper.pbHelpIndexerList"\
 "/Developer/Documentation/Help/Developer Help Viewer/"
Enter that as one long line; it should copy and paste correctly with the backslashes. Next, run the command:
sudo /Developer/Tools/pbhelpindexer
Enter your admin password when prompted. After the command is finished, code completion and documentation search should work fine again. I didn't find this documented anywhere, neither at macosxhints nor at Apple's developer place. I hope it helps someone.

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040831111209864