Author: | Bill Bumgarner |
---|---|
Contact: | <bbum@codefab.com> |
Version: | 0.1 (unsupported) |
Date: | 12/16/2002 |
|
Triple-quoted strings are not always treated correctly by Project Builder. This seems to be a Project Builder bug.
Create the directory 'Specifications' within ~/Developer/ProjectBuilder Extras/ or /Developer/ProjectBuilder Extras/:
mkdir -p ~/Developer/ProjectBuilder\ Extras/Specifications/
Copy the specification files into that directory:
cp Python.pb*spec ~/Developer/ProjectBuilder\ Extras/Specifications/
The binary installer will install the specifications for you.
The version of Project Builder that ships with the December Developer Tools modularizes the support for file types and syntax based colorizing of source files. The base mechanisms and definitions are found in:
file:///System/Library/PrivateFrameworks/PBXCore.framework/Resources/
Not surprisingly, Apple has provided a mechanism for augmenting and overriding the configuration information found within the PBXCore framework. By creating a 'Specifications' directory within any of the ProjectBuilder Extras directories (/Developer/ProjectBuilder Extras and ~/Developer/ProjectBuilder Extras being the two most common).
All of the various specification files are simply property lists. The file names do not appear to be significant beyond the extension. That is, Python.pblangspec could have been called Foo.pblangspec and it would still work as expected.
The contents of the two files were determined largely by looking through the files found in the PBXCore framework. The list of keywords for python was generated by python itself:
In [1]: import keyword In [2]: keyword.kwlist Out[2]: ['and', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'yield']