2

the core part of the bachelor thesis which I am writing right now is a plugin for a C# IDE that offers a few refactorings (it comes to more than simple refactorings but I want to keep it simple for the moment).

I've always been working with Visual Studio so far. However, I've heard that their AST access is rather uncomfortable. Alternatives are MonoDevelop and SharpDevelop. Another way to work with Visual Studios AST would be to access it via a custom ReSharper Plugin.

Does anyone of you have experience in writing Plugins for any of those target applications? What do you think? I appreciate every advice and disadvice.

Thanks, TH

4

4 回答 4

2

使用 MonoDevelop 或 SharpDevelop 的一个优点是它们是开源的,因此您可以确保完全访问 AST - 如果需要,您可以进入核心并进行修改。另一个优点是它们是 100% 托管代码,因此更容易开发和调试。此外,您更有可能接触到核心开发人员并向他们提出详细的问题。

如果您对使用 MonoDevelop 感兴趣,我建议您直接在现有的 Refactoring 插件中实现重构。我们希望有更多的重构功能:)

由于我们切换到新的 AST 和基于 Mono C# 解析器的解析器,因此代码库在 master 中经历了一些变动,并且重构尚未移植。我建议您前往我们的邮件列表或 IRC 并在那里提出一些更具体的问题,以便我们可以给您一些更具体的指示。

于 2011-01-04T23:24:24.063 回答
1

I believe VS 2010 has very good native support for plugins using MEF. Here's a guide: http://msdn.microsoft.com/en-us/library/dd885242.aspx

You can also use Devexpress DXCore, it's free with CodeRush Express.

于 2011-01-04T11:27:55.533 回答
1

重构的最佳 AST 访问由NRefactory 5提供,它完全重写了以前的 NRefactory 版本(在 SharpDevelop 和 MonoDevelop 中都使用)。对于 SharpDevelop,我们计划在 SharpDevelop 5.0 中使用新的 NRefactory;MonoDevelop 最终也将迁移到它(MonoDevelop 已经在使用新的 AST,但还没有使用新的类型系统/语义分析)。

这次重写的主要目标是:

  • 为每个标记提供丰富的 AST 和位置信息,使重构更容易编写
  • 提高语义分析性能
  • 从以前的版本中消除一些糟糕的设计决策(IExpressionFinder,以及如何处理引用的程序集)

将来,您可能还想看看 Microsoft 的 Compiler-As-A-Service。

于 2011-08-31T17:13:19.017 回答
0

还请务必从http://www.jetbrains.com/resharper签出 ReSharper,它是 VS 的插件,添加了许多重构

于 2011-01-05T22:46:21.430 回答