GithubHelp home page GithubHelp logo

isabella232 / resharper-rider-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains/resharper-rider-plugin

0.0 0.0 0.0 4.69 MB

https://www.jetbrains.com/help/resharper/sdk/

Home Page: https://www.jetbrains.org/intellij/sdk/docs/

PowerShell 77.07% C# 12.91% Batchfile 10.02%

resharper-rider-plugin's Introduction

JetBrains Official

Plugin Template for ReSharper and Rider

This repository defines a template for easy development of ReSharper and Rider plugins according to the official documentation for the ReSharper SDK and IntelliJ SDK.

Prerequisites

When developing for Rider, Java 11 Amazon Corretto should be installed.

Getting Started

Download the JetBrains.ReSharper.SamplePlugin.*.nupkg template package from the releases page and invoke from the download directory:

dotnet new --install JetBrains.ReSharper.SamplePlugin --nuget-source ./

Afterwards, a new project can be created from the installed template. The name identifier should be letters-only:

dotnet new resharper-rider-plugin --name MyAwesomePlugin [--include-samples] [--resharper-only] [--build-only]

This will create a new folder with all the structure ready to go and all identifiers, like namespaces, ids and file names, replaced with MyAwesomePlugin. Passing --include-samples will include a set of sample implementations for actions, code inspections, option pages, and more. Passing --resharper-only will exclude all Rider related files. With the --build-only --force, all the build-relevant files can be updated. Metadata including project website, description, author and others should be entered in Plugin.props and plugins.xml.

⚠️ The only place that currently needs to be updated manually is the RIDER_PLUGIN_ID in README.md, which you'll only get after uploading your Rider plugin the first time.

Development

For general development, there are a couple of scripts/invocations worth knowing. Most importantly, to run and debug your plugin, invoke:

# For Rider
gradlew :runIde

# For ReSharper (VisualStudio)
powershell .\runVisualStudio.ps1

When starting Gradle tasks from inside IntelliJ IDEA, make sure that the Gradle settings are as follows:

If your Rider plugin requires a model to share information between ReSharper backend and IntelliJ frontend, there is a sample protocol defined in protocol directory. To generate the Kotlin and C# implementation, call:

gradlew :rdgen

Opening the solution in Rider or IntelliJ IDEA will automatically provide the corresponding run configurations:

Version Relevant Code

There are a couple of version identifiers that should always be updated synchronously:

  • The ProductVersion variable in build.gradle is responsible for download a certain Rider frontend distribution
  • The SdkVersion property in Plugin.props will affect the referenced JetBrains.ReSharper.SDK NuGet package and will also determine the wave version that is required for the Extension Manager in ReSharper
  • The runVisualStudio.ps1 script will always download the latest available installer for ReSharper - this can be either a normal release or early-access-program (EAP) release

Available versions are listed here for ReSharper and Rider (under com.jetbrains.intellij.rider).

Visual Studio / ReSharper Relevant Directories

Installing ReSharper and the plugin into an experimental Visual Studio instance (hive) affects the following directories:

  • %LOCALAPPDATA%/JetBrains/plugins contains a copy of the plugin package, similar to the global NuGet package cache
  • %LOCALAPPDATA%/JetBrains/Installations contains settings directories per experimental instance, whereas packages.config defines what plugins should be installed
  • %APPDATA%/JetBrains/ReSharperPlatformVs[version] contains binary directories per experimental instance with all assemblies to run ReSharper and the plugin

Using attached folders can be of great help to track these directories while developing a ReSharper plugin.

Deployment

Both plugins can be published by calling:

# For Rider & ReSharper (Gradle)
gradlew :publishPlugin -PPluginVersion=<version> -PPublishToken=<token>

# For ReSharper (PowerShell)
powershell ./publishPlugin.ps1 -Version <version> -ApiKey <ApiKey>

⚠️ The first deployment must be done through the marketplace.

resharper-rider-plugin's People

Contributors

citizenmatt avatar evan-choi avatar fornever avatar khalidabuhakmeh avatar laurentkempe avatar matkoch avatar socolin avatar ulex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.