|
waspectj |
2004-10-03 |
|
I need some way of querying source code in Visual Studio, so I decided to hack out something in a day and see what it looked like. The 'design' fits on a napkin:
instanceof(sometype) && calls(a.b(int)) calls(a.*(*)) handles(someException) But I want them to run against the currently loaded solution in VS, and return me some sort of graph showing the match and the context (e.g. if I'm matching on a method, give me the class as well). Turns out I need more than a day to do this - the implementation is coming along sloooowly. The only query running at 11pm is "get me a class with a name" (e.g. "instanceof(name)"). However, I haven't thought about the concrete syntax, so I don't have a parser, and I am just building expressions by hand. And no wild cards. I think the problem is that I spent most of the day reading Running Money, but I'm pretty much on top of traversing the solution in VS, so hopefully I'll have some more expressions working this week. |
|