views:

15

answers:

1

I have been wandering around the object model for VS 2010 and haven't been able to work out the best method for watching what the user is looking at in the main edit window.

I know that each Class/method/property is broken down into its own . What I would ideally like is to hook to an event which says "The user has moved the cursor onto Project.Class.Method" and ideally "and is looking at line 4".

Any suggestions?

+1  A: 

Have you looked at CodeModel? It can tell you what types and members are in a file. http://msdn.microsoft.com/en-us/library/ms228763(v=VS.80).aspx

Kirill Osenkov
This is around the area I was looking, it gives a good sample for what I would do once I knew the user had selected something. I will keep the issue open though in the hope of getting the event side going.
Rob