views:

119

answers:

2

I'm working with the 2010 SDK and I am trying to figure out how to tie into VS in someway that I have a background process running that is constantly analyzing .CS files in the current project and adding them to a dictionary so I can show some graphical cues in the editor of a custom text document that I have.

I have been doing quite a lot of research here: http://msdn.microsoft.com/en-us/library/bb166441.aspx

But i cant seem to find a way to "Hook" into VS ...sort of an entry point so this service can run in the background while the project is open.

So far I have an Editor Classifier Project that I have done some modifications to the editor with...how can I monitor files in the background?

+1  A: 

Did you start with a visual studio Managed Extensibility Framework ? Then I found a load full of samles at http://learnvsxnow.codeplex.com

Maybe of special interrest would be "Automatically loading packages": http://dotneteers.net/blogs/divedeeper/archive/2008/03/23/LVNSideBar1.aspx

And then you can start a new thread for your actually working process.

Hope this helps.

ralf.w.
+1  A: 

You can implement the IVsTrackProjectDocumentsEvents2 interface to listen to project events such as adding a file to a project.

OnAfterAddFilesEx, OnAfterRemoveFiles, and OnAfterRenameFiles are the methods you'll be interested in.

jaws