创建“自定义设计器” Visual Studio 2010 插件
我们工作的主要部分是创建和操作某些 XML 文件,这些文件有一个自定义编辑器。编辑器开始变得不稳定,我们正在考虑构建一个替代品。由于 VS2010 最近发布,表面上具有改进的加载项架构(MEF?),我对将编辑器构建为 Visual Studio 中的自定义编辑器的可能性感兴趣。
它必须以与代码编辑器或设计器相同的方式出现 - 一个选项卡项目,其中可以同时打开多个选项卡项目,其中包含我们用来编辑文件的 GUI。它将与 VS 的编辑菜单集成。它可以使用输出窗口来显示消息。它看起来与 Visual Studio 中的任何其他编辑器相同。
现在,我正在寻找以类似方式工作的加载项示例 - 最好使用源代码 - 看看这个模型是否适合我们的要求。我还在寻找与创建 VS2010 加载项相关的任何文档或教程,或者有关 VS2008 加载项的信息(如果仍然相关)。
欢迎任何意见。谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想查看 VS 2010 的托管扩展性框架。由于 2010 是用 .net 编写的,您可以创建使用它添加组件。
VS 2010 的代码编辑器扩展。
使用 MEF
自定义编辑器扩展
更新:
由于有人在评论中询问,我想我应该发布有关为 vs 2008 创建附加组件的链接: http://msdn.microsoft.com/en-us/vstudio/bb968855.aspx
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