Creating a 'Custom Designer' Visual Studio 2010 Add-in

柔情痞子 提交于 2019-12-20 18:38:28

问题


A major part of our work is creating and manipulating certain XML files, for which have a custom editor. The editor is starting to get creaky and we are looking at building a replacement. Since VS2010 has recently arrived, ostensibly with an improved add-in architecture (MEF?), I am interested in the possibility of building the editor as a custom editor within Visual Studio.

It would have to appear in the same way as the code editor or the Designer - a tab item, of which there can be many open at once, containing the GUI we use to edit the files. It would integrate with VS's Edit menu. It could use the output window to display messages. It would appear the same as any other editor within Visual Studio.

Right now, I am looking for examples of add-ins that work in a similar way - ideally with source code - to see whether this model would suit our requirements. I am also looking for any documentation or tutorials relevant to creating a VS2010 add-in, or information about VS2008 add-ins if this is still relevant.

Any input is welcome. Thanks!


回答1:


You want to look at the Managed Extensibility Framework for VS 2010. Since 2010 is written in .net you can create add on components using it.

Code editor extension for VS 2010.

Working with MEF

Custom Editor Extensions

Update: Since someone asked in a comment, I thought I would post this link on creating add ons for vs 2008: http://msdn.microsoft.com/en-us/vstudio/bb968855.aspx



来源:https://stackoverflow.com/questions/3066471/creating-a-custom-designer-visual-studio-2010-add-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!