开发者

List of open documents in VisualStudio (Plugin-Development)

开发者 https://www.devze.com 2022-12-12 19:49 出处:网络
I am currently trying to develop a simple plugin for visual studio 2008 using c#. I feel kind of stupid to ask, but after searching the doc for a few hours I can\'t find a way for a really simple tas

I am currently trying to develop a simple plugin for visual studio 2008 using c#.

I feel kind of stupid to ask, but after searching the doc for a few hours I can't find a way for a really simple task: Assume this open solution. I simply want a list of the documents open in the TABs on the right. I tried something, see below...

alt text http://img24.imageshack.us/img24/5238/20091201172237.png

This approach is not working:

alt text http://img339.imageshack.us/img339/6571/20091201172211.png

开发者_StackOverflow

And the result is rather strange:

alt text http://img40.imageshack.us/img40/6535/20091201172247.png

Any tips on how to list the active documents?

Thanks,

Chris


Can't answer your specific question, but can make a couple of comments/suggestions:

  • The DTE object model is ugly, ugly, ugly - you're not the only person who's struggled with it (ask me how I know).

  • Ask your question on the Visual Studio Extensibility Forum - they can probably help.


Ok,

I just found a way around the ugly DTE. Its simply not using it :-) At least not directly. I found DxCore, which is free (at least for personal use, I guess) and does the job quite nicely.

To get what I wanted, I simply needed this code (which was what I was hoping in VS for, but there it kind of behave different)...

alt text http://img109.imageshack.us/img109/7127/20091201221414.png

0

精彩评论

暂无评论...
验证码 换一张
取 消