Xcode 3 language specification changes
So much has changed in Leopard that I am not surprised I cannot find anything about this yet. Basically, the plugin interface for Xcode 3 has severely changed. In particular, over the past few days I have been trying to make a *.pblangspec file for the programming language used by my group for software verification purposes (who, it ought to be noted, I do not speak for on this website).
It turns out, that’s not what I really wanted to do. I am still trying to figure out what all has changed, but here are a few key differences:
- The file format is totally different. This is somewhat superficially noted by the fact that the file’s extension should now be
xclangspec
as opposed topblangspec
. For instance, I am usingResolve.xclangspec
. - The file format is totally different. I’m mentioning it twice, mainly to point out that there are no guides out there for it yet. It seems to make sense, if you realize that Xcode is now doing a lot more than just keyword matching and using regular expressions to do purty fancy-dancy hi’-li’t’n’. However, it is really easy to mess up and make Xcode be unable to open. Basically, always keep backups so you can undo any of your changes.
- And here’s why it’s taken me so long to even get this far, in that you need a confluence of these this and the previous two things to find out if anything you’ve done actually works: the location has changed. You used to be able to put your file in a location like
~/Library/Application Support/Apple/Developer Tools/Specifications/
, but this won’t work any more. Xcode 3 now looks in places such as/Developer/Library/Xcode/Specifications/
. I suspect~/Library/Xcode/Specifications/
might also work, but I haven’t tried it.
If you want to get a look at how these plugin files look, check out /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
. Personally, I am trying to use a modified C++.xclangspec
, but with enough work you probably could make a totally new spec. There are also xccolortheme
and xcsynspec
files to take a look at. I think it goes without saying that you want to modify copies of these things.
Technorati Tags: Leopard, Mac, Xcode, pblangspec, xclangspec
Comments
Have you had any more luck on this? Is there still a requirement for something like an .xcfilespec?
Any other hints on how to get this to work? I wanted to create a plugin for Groovy, as the old one won't work of course.
Those files and some info can be found online at http://www.cs.kent.edu/%7Essteinfa/asc.html#ascXcode
If you are interested then I am trying to gather people and resources into a single project explaining the xcode API.
Would love it if you were interested in joining.
http://code.google.com/p/xcode-plugin/