Its looking like my post about code builders struck a nerve (read the comments). A few people were concerned that the builders could be used for evil, and I think my choice was poor - although XPath is probably something you would put in as a literal since changing the XML contract is not a minimal change anyway.
One of the comments was how the builders would appear to the developer as they typed so I did up this mock up. I kinda think its between this and smart-tags, I'd go for smart-tags in a heart beat if they could be triggered via the keyboard (can they?).
Not much different eh? And the example is fairly limited because a single method call might have multiple arguments, and more disturbing - how would this look over multiple lines. That definately needs to be thought about some more. If the caret was in a region of text that had one of these "hats" then you could do something like CTRL-DOWN to expand it out and get focus set appropraitely in the balloon.
Anyway - more food for thought.