On Nov 29, 2007, at 3:55 PM, David Ewing wrote: On Nov 25, 2007, at 4:07 PM, Kurt Stoll wrote: However, when I put my "language specification" in ~/Library/Application Support/Developer/... as directed, I do not see my macros. I also tried putting it in ~/Library/Application/Support/Xcode/Shared/Specifications - to the same effect (or lack thereof).
It sure seems like that directory should work. But this one certainly does:
~/Library/Application Support/Developer/3.0/Xcode/Specifications
That one does. On the theory that my fingers don't always obey my directions, I tried .../Developer/Shared/Specifications again. Still no joy. Doesn't mean I'm not still doing something stupid. Should I file a (documentation) bug? I'm happy enough with .../Developer/3.0/Xcode/Specifications, at least until Xcode 3.1 come out. Second, you say:
To find a list of all valid values for the IncludeContexts and ExcludeContexts entries you have to look in all the .xclangspec files.
Where are these files located?
In the spirit of teaching one to fish, try in Terminal:
find /Developer -name \*.xclangspec
Duh! Sorry, it's not that I don't know how to fish, it's that I've been fishing in the Macintosh ocean since 1985, and when I come here from *nix, I still forget some of my longer poles, even though their waters have been mixing together for the last six or seven years. Thanks for the reminder.
Third, I am having difficulty getting an autocomplete text macro to work at the "file level" - that is, outside of the scope of any function, declaration, string, or comment (although, maybe within the scope of an @interface or @implementation). ...
This isn't an issue with IncludeContexts, this is an intentional subtlety to how automatic completion of macros works. When the completion prefix doesn't match what gets inserted, we won't do the automatic completion. Think about typing "csep", having it turn into "/***...***/", and you keep typing. It would flash back and forth from what you typed, and what it wanted to complete to. Ugly. (Generally, it's good to have the completion prefix be a prefix for the given text macro. But even we don't follow that rule.)
Ok, I get it. I'll have to think about that some more. It sure seems that there should be some way to convey to the user that a macro is available, and to enable the TAB expansion, without incurring the cost of the ugly UI behavior that you outline. For example, providing some sort of a highlight around the macro prefix. I realize that you would need to make this consistent with the normal behavior, so this may not really be the best answer, but there may be something along these lines that would work. Just speculation on my part; feel free to file it in the appropriate bit bucket. Thanks again!
-Kurt
|