ReSharper SDK

Post on 24-May-2015

218 views 4 download

Tags:

description

18 May 2013, OrenConf Orenburg, Russia ===== Sorry about code style

Transcript of ReSharper SDK

R# SDK: Overview

Зюбанов Ярослав.NET Developer

yaroslav.zyubanov@softline.ru

ReSharper is a renowned productivity tool that makes Microsoft Visual Studio a much better IDE

http://jetbrains.com/resharper/

Oh, GOD, why?

Supported Languages

• C#• Visual Basic .NET• JavaScript• CSS• HTML• ASP.NET• Razor• XAML• XML

Features

• Code Analysis• Navigation and Search• Coding Assistance (Context Actions, Code

Completion, Complete Statement etc.)• Refactorings• Code Generation• Code Templates• Code Cleanup

• Project Templates• Project Item Templates• Bunch of binaries• Targets (MSBuild)

• Tools (used for developing support for new languages)

• Examples• Help

SDK

Releases

• ReSharper 6.1.x SDK (January 2012)• ReSharper 7.0 SDK (October 2012)• ReSharper 7.0.1 SDK (March 2013)

Wait a minute, SDK is for plugin development?

Win-Win Situation

`Problem`

public void Foo() {

// correct use of string.Format()string str = string.Format(“Name: {0}”, name);

// unnecessary method callstring str = string.Format(“string without markers”);

// much betterstring str = “string without markers”;

// even more better? actually it’s notconst string str = “string without markers”;

}

PSI (Program Structure Interface)

PSI (Program Structure Interface)

Availability

Get selected element

Check #1

Check #2

Create literal expression

Action

Replace

Tests: Convention-based approach+src| OrenConf.Plugin| OrenConf.Plugin.Tests| OrenConf.Plugin.sln +test +data +Intentions +ContextActions +InlineString | availability01.cs | execute01.cs | execute01.cs.gold

Availability Test

Availability Test

Execution Test

Execution Test

Resources

ReSharper Plugin Development http://bit.ly/resharpersdk

JetBrains TVhttp://tv.jetbrains.net

OrenConf.Pluginhttps://github.com/antigravity/OrenConf.Plugin

Thanks