设计 Visual Studio 2010 集成包

发布于 2024-08-20 01:02:02 字数 298 浏览 3 评论 0 原文

我想开始使用 Visual Studio 2010 SDK 并创建集成包。我现在想做的就是提供新的项目类型和语言服务。但是,我不知道应该如何设计它...

该软件包将为为 x86 或 ARM 处理器编译的编程语言提供一个编辑器。问题在于,根据您所开发的处理器的不同,存在一些语言差异。然而,我不希望每个架构都有一个单独的项目类型。优选地,程序员在创建项目时选择架构,并且包自动加载特定部分,例如正确的语言服务、配置设置以及与该架构相关联的任何自定义工具和对话框。

我该怎么做呢?我读过有关“风味项目”的内容,但我不太明白如何实施它们。这就是我需要的吗?

I'd like to get started with the Visual Studio 2010 SDK and creating integration packages. All I would like to do for now is provide a new project type and language service. However, I don't know how I should design it...

The package will provide an editor for a programming language that compiles for x86 or ARM processors. The problem is that there are a few language differences depending on which processor you're developing for. I'd rather not have a separate project type for each architecture, however. Preferably, the programmer chooses the architecture when they create the project and the package automatically loads up the specific parts such as the correct language service, configuration settings, and whatever custom tools and dialogs are associated with that architecture.

How would I go about doing this? I've read about "flavored projects", but I don't really understand how to implement them. Is that what I need?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情深缘浅 2024-08-27 01:02:02

为了让您朝着正确的方向前进,需要注意以下几点:

  • VS 2010 中用于连接到编辑器的语言服务的界面已完全更改。我建议在 VS 编辑器论坛,核心 VS 编辑器的所有开发人员都在其中寻求自文档以来最快的答案此时样本仍不完整。 (有一个兼容层来支持“旧”语言服务,但是您最好只使用新接口,因为您是从头开始。)
  • “风味项目”(在文档中称为项目子类型) )是一种从现有项目系统添加/删除功能的方法。例如,在 CSProj 和 VBProj 之上,还有 Web 项目、WPF、设备、数据库等项目风格。在这些情况下,C# 和 VB 是“基础”项目系统,而 WPF、Web、数据库是扩展基础 C#/VB 项目系统的风格。由于您有自定义语言,因此您应该实现自己的基础项目系统。从头开始的最佳选择是基于 MPFProj 源库 构建一些东西。

A couple of points to note to get you headed in the right direction:

  • The interfaces for a language service to hook into the editor have completely changed for VS 2010. I would recommended asking questions on the VS Editor Forum where all the devs for the core VS editor hang out for the speediest answers since the documentation and samples are still incomplete at this point. (There is a compatibility layer to support "old" language services, but you'd be better off just using the new interfaces since you're starting from scratch.)
  • A "flavored project" (referred to in the docs as a Project Subtype) is a way to add/remove functionality from an existing project system. For example, there is are project flavors for Web Projects, WPF, Devices, Database, etc.... on top of CSProj and VBProj. In these cases C# and VB are the "base" project systems and WPF, Web, Database are flavors that extend the base C#/VB project systems. Since you have a custom language, you should implement your own base project system. Your best bet for starting from scratch would be to build something based off the MPFProj source library.
南薇 2024-08-27 01:02:02

我正在做一些非常相似的事情——这是我的起点:

http://blogs.msdn.com/noahric/archive/2010/02/15/markdown-part-4-outlined.aspx

这是一个非常好的示例,说明如何实现编辑器扩展。

I'm working on something very similar -- here is my starting point:

http://blogs.msdn.com/noahric/archive/2010/02/15/markdown-part-4-outlining.aspx

It's a very nice example of how to implement an editor extension.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文