创建“自定义设计器” Visual Studio 2010加载项 [英] Creating a 'Custom Designer' Visual Studio 2010 Add-in

查看:99
本文介绍了创建“自定义设计器” Visual Studio 2010加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们工作的主要部分是创建和操作某些具有自定义编辑器的XML文件。编辑器开始变得杂乱无章,我们正在考虑建立替代产品。自从 VS2010 最近面世以来,表面上带有改进的外接程序体系结构(MEF?),我对将编辑器构建为 Visual Studio中的自定义编辑器的可能性感兴趣。 。

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.

它必须与代码编辑器或Designer一样显示-一个选项卡项目,其中可能有很多立即打开,其中包含我们用来编辑文件的GUI。它会与VS的编辑菜单集成。它可以使用输出窗口显示消息。它将显示为与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.

现在,我正在寻找加载项示例(最好使用源代码)来查看该模型是否符合我们的要求。我还在寻找与创建VS2010加载项有关的任何文档或教程,或者在与VS2008加载项相关的信息方面。

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.

欢迎任何输入。谢谢!

推荐答案

您要查看用于VS 2010的托管扩展框架。由于2010是用.net编写的,因此您可以使用它创建附加组件。

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.

针对VS 2010的代码编辑器扩展

与MEF合作

自定义编辑器扩展

更新:
由于有人在评论中提出问题,我想我应该在为vs 2008创建附加组件时发布以下链接: http://msdn.microsoft.com/en-us/vstudio/bb968855.aspx

这篇关于创建“自定义设计器” Visual Studio 2010加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆