Problem with Custom Text Macros on 3.2
Problem with Custom Text Macros on 3.2
- Subject: Problem with Custom Text Macros on 3.2
- From: Dylan Bruzenak <email@hidden>
- Date: Mon, 31 Aug 2009 10:03:40 -0500
Hi all,
Please let me know if I should redirect this to a different list.
I created an extensive set of customized macros for Xcode 3.1 and put them in a copy of ObjectiveC.xctxtmacro in my ~/Library/Application Support/Developer/Shared/Xcode/Specifications directory.
They worked great on Leopard, but after the upgrade to SL and Xcode 3.2 they stopped working. By doing a diff between my file and the original I found that adding or NO to each macro definition mostly fixed the problem.
I'm assuming this means Only At Beginning of Line. Setting it to YES causes macros to only be triggered at the beginning of the line. Setting it to NO causes it to be triggered anywhere but the beginning.
Does anyone know if there is a way to get macros to trigger anywhere without having to write the macro twice and flip this flag ?
Anyway, enough setup :) The real problem is that I have some macros that are made to work within the parens that contain a function return type at the beginning of a function definition:
- (MACRO) myCrazyZanyAwesomeFunctionThatRocks
Example macro definition (keeping it 'simple'):
{
Identifier = objc.returnnsstring;
BasedOn = objc;
IsMenuItem = NO;
Name = "Return";
>
TextString = "NSString *";
CompletionPrefix = ds;
IncludeContexts = ( "xcode.lang.objc.parenexpr" );
}
The IncludeContexts setting should cause this macro to trigger only within parens. This worked fine on Xcode 3.1, but the macro is no longer picked up at all for the return type section. It seems to work in other sets of parens.
My next assumption was that the .xclangspec file had changed and the return type had it's own new context, but that doesn't appear to be the case:
{
Identifier = "xcode.lang.objc.method.declarator";
Syntax = {
Tokenizer = "xcode.lang.objc.lexer";
Rules = (
"xcode.lang.objc.method.minus",
"xcode.lang.objc.parenexpr?",
"xcode.lang.objc.partialname",
"xcode.lang.objc.method.declarator.args?",
);
Type = "xcode.syntax.method.declarator";
};
},
I've tried using a bunch of other random contexts, such as method.declarator itself, to no avail.
Anyone know what changed here ?
thanks,
Dylan Bruzenak
_______________________________________________
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