简体   繁体   English

相当于C#/ Visual Studio的JDT

[英]JDT equivalent for C#/Visual Studio

I'm looking for an equivalent to the JDT in Visual Studio for C#. 我正在寻找Visual Studio for C#中的JDT等效项。 Generally, I want to extend Visual Studio with a plugin to analyze C# source code. 通常,我想用一个插件扩展Visual Studio来分析C#源代码。 So what should I look for? 那我应该找什么呢?

You are looking for the Visual Studio SDK , specifically the Visual Studio Integration SDK section. 您正在寻找Visual Studio SDK ,特别是“ Visual Studio集成SDK”部分。 You may find references to Visual Studio Extensibility (VSX) - they are the same thing. 您可能会发现对Visual Studio可扩展性(VSX)的引用-它们是同一回事。

The learning site for VSX has a few links to get you started, especially in the " Getting Started " section. VSX 学习站点上有一些链接可以帮助您入门,特别是在“ 入门 ”部分。 You can find detailed coverage in the documentation . 您可以在文档中找到详细的内容

EDIT: 编辑:

If you are looking for a plugin to analyze your code and don't mind buying it, Resharper is the best option. 如果您正在寻找一个插件来分析代码,并且不介意购买,Resharper是最佳选择。 Resharper has its own SDK that allows you to create plugins for it. Resharper拥有自己的SDK,可让您为其创建插件。

If you want to create your own code analysis plugin, you will have to do a bit of work. 如果要创建自己的代码分析插件,则需要做一些工作。 VS doesn't include any parsing or analysis support. VS不包含任何解析或分析支持。 This will come with Project Roslyn, hopefully soon after .NET 4.5 RTMs. 这将随罗斯林计划一起提供,希望在.NET 4.5 RTM之后不久。 Right now it's in CTP and may well be cancelled. 目前,它位于CTP中,可能会被取消。

There are some tools that can help with analysis. 有一些工具可以帮助进行分析。 ANTLR has a .NET distribution .Net that targets C#. ANTLR具有面向C# 的.NET发行版 .Net。 Mono.Cecil is a Mono library that inspects IL code and is the basis of almost all .NET decompilers. Mono.Cecil是检查IL代码的Mono库,并且是几乎所有.NET反编译器的基础。

I am not really sure about what you are looking for but ReSharper will help you in many ways. 我不确定您要寻找的是什么,但是ReSharper将在许多方面为您提供帮助。

Taken from their website: 从他们的网站上获取:

ReSharper is a renowned productivity tool that makes Microsoft Visual Studio a much better IDE. ReSharper是著名的生产力工具,使Microsoft Visual Studio成为更好的IDE。 Thousands of .NET developers worldwide wonder how they've ever lived without ReSharper's code inspections, automated refactorings, blazing fast navigation, and coding assistance. 全球成千上万的.NET开发人员想知道,如果没有ReSharper的代码检查,自动重构,快速的导航和编码帮助,他们的生活将如何。

And here are some words about the analysis cabapilities: 以下是有关分析功能的一些话:

On-the-fly code quality analysis in C#, VB.NET, XAML, ASP.NET, ASP.NET MVC, JavaScript, CSS, and XML. 使用C#,VB.NET,XAML,ASP.NET,ASP.NET MVC,JavaScript,CSS和XML进行动态代码质量分析。 ReSharper will tell you right away if your solution contains errors or code that can be improved. ReSharper会立即告诉您您的解决方案是否包含错误或可以改进的代码。

I'm an avid Java developer and I use IntelliJ IDEA from JetBrains who also has developed the ReSharper. 我是一名狂热的Java开发人员,我使用JetBrains的IntelliJ IDEA,后者还开发了ReSharper。 ReSharper has taken a lot of goodies from IntelliJ and it is really fantastic to use when you are using VS like I am at the moment. ReSharper从IntelliJ获得了很多好处,当您像现在一样使用VS时,使用它真的很棒。

You probably can check out ReSharper like @maba suggested. 您可能可以像@maba建议的那样查看ReSharper。 But ReSharper is not free. 但是ReSharper不是免费的。

If you are looking for something free, you have several choices, 如果您正在寻找免费的东西,则有多种选择,

Based on them you can write Visual Studio addon that provides similar functionalities to ReSharper or JDT. 基于它们,您可以编写Visual Studio插件,该插件提供与ReSharper或JDT类似的功能。

NRefactory 5 and Roslyn are both in active development phase, so both of them are not yet ready for serious usage. NRefactory 5和Roslyn都处于积极的开发阶段,因此它们还没有准备好进行认真的使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM