Coder Social home page Coder Social logo

jetbrains / resharper-rider-samples Goto Github PK

View Code? Open in Web Editor NEW
225.0 256.0 175.0 2.34 MB

Simple interactive exercises to help learn ReSharper and Rider

License: Apache License 2.0

C# 93.22% JavaScript 0.72% HTML 3.22% CSS 0.86% F# 1.71% ASP.NET 0.27%

resharper-rider-samples's Introduction

official project

Localized versions are available for some languages:

ReSharper/Rider Workshop

In these materials, you'll learn about many of the features and productivity enhancements available in ReSharper and Rider.

It provides step by step exercises for navigation, editing, inspections, refactoring and more. While it doesn't cover EVERY feature in ReSharper and Rider (we like to have some surprises), it does give many, many useful tips and tricks to both beginners and long time users.

Each exercise also introduces the keyboard shortcuts that can be used to work with ReSharper and Rider more efficiently. Should you want to see all the shortcuts in one place, you can download a keyboard shortcut cheat sheet from our website.

The workshop is self-paced, meaning you can work your way through the exercises on your own, at your own speed. You can skip sections you're already familiar with (although you might miss some useful tips!), and can work on the exercises in any order.

Getting started

Simply get a copy of the repo (clone or download straight) and open the resharper-rider-samples.sln in Visual Studio or Rider. It is recommended to build the solution at least once before starting, as this will restore various NuGet packages used by some of the exercises (many exercises do not require compiling, such as navigation and editing, but others require compiling code, or referencing third party assemblies, such as unit testing and ASP.NET MVC support)

The exercises are structured into numbered solution folders. Each folder contains one or more projects, and the exercises themselves are usually described in comments inside the source to these projects. Simply open the files and work through the exercises at your own pace.

The exercises are:

  • 00-EssentialShortcuts - introduces the handful of keyboard shortcuts you need to know in order to get started with ReSharper. These shortcuts invoke the "entry points" to the majority of ReSharper and Rider functionality.
  • 01-Navigation - demonstrates the various ways of navigating around your codebase, looking at Go To, Find Usages, navigating class hierarchies and more.
  • 02-Editing - exercises for editing your code, including code completion, completing statements, rearranging code, etc.
  • 03-Inspections - an introduction to the many code inspections that ReSharper and Rider provide, seeing how they can find potential issues with your code, and how to fix them, and manage them. Also looks at the very powerful value tracking analysis feature.
  • 04-Refactoring - exercises to see how ReSharper and Rider supportsrefactoring your code base, from simple renames to introducing and inlining variables, to extracting classes, moving members up and down type hierarchies and more.
  • 05-LanguagesAndFrameworks - a large part of ReSharper and Rider functionality applies to all languages that ReSharper supports. However, ReSharper and Rider also provides specific support for certain frameworks and languages, such as asp.net MVC, XAML or regular expressions.
  • 06-UnitTesting - exercises to show how ReSharper and Rider support unit testing
  • 07-LiveTemplates - looks at the powerful text snippet expansion, with interactive macros and editable hotspots. Also looks at creating files and surrounding selected text based on templates.
  • 08-StructuralSearchAndReplace - learn how to use ReSharper and Rider's very powerful search and replace functionality that is based on code patterns rather than text.
  • 09-Tools - useful tools, such as code cleanup, stack trace explorer and the To Do explorer.

Learn essential shortcuts

In this workshop, you can learn the essential functions provided by ReSharper and Rider that you need to master. These essential functions can be easily and directly accessed with shortcuts.

There are many shortcut keys, but if you have trouble, you can search for them. We recommend that you print out the cheat sheet described below and mark it with a marker, as it will show you how to find them when you have trouble.

Shortcuts And Actions

Through out this guided experience, you will see "shortcut" tags. These tags include the official name of each action and can be found using the the Find Action... feature of your IDE. Reference your preferences to find out what that shortcut is, but here are a few known shortcut combinations:

  • ReSharper Keymap on Windows: Ctrl + Shift + A
  • Visual Studio Keymap on Windows: Ctrl + Shift + A
  • Visual Studio Keymap on macOS: Command (⌘) + Shift (⇧) + A

There are cheat sheets for shortcut keys in the menu: Help | Keymap Reference.

It is recommended that you go to above, select the cheat sheet for your chosen Keymap, print it out, and keep it deskside.

Also the Keymap reference guide is also available online :

Open Source

The workshop is Open Source, licensed under the Apache 2 license. If you would like to contribute to the workshop materials, please feel free to fork the repo and send us a pull request. Or if you have a comment, question, or suggestion for improvements, please raise an issue.

resharper-rider-samples's People

Contributors

bitbonk avatar citizenmatt avatar cwoodruff avatar hhariri avatar khalidabuhakmeh avatar maartenba avatar mfilippov avatar simoncropp avatar sun-flat-yamada avatar vicp-iq avatar yusjoel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

resharper-rider-samples's Issues

Proposal to improving the workshop description

Hi, @maartenba .

I am re-conducting the workshop in order to translate it into Japanese.

During this process, I noticed a few things that I think could be improved in the explanation.

I would like to feed back the explanations that are supplemented in the Japanese translation to the English version as well.

I will send out a PR, could you check the content?
If you like, I will send out a PR tied to this issue.

For example, here is the content :

# Shortcuts And Actions

Through out this guided experience, you will see "shortcut" tags. 
These tags include the official name of each action and can be found
using the the `Find Action...` feature of your IDE. Reference your
preferences to find out what that shortcut is, but here are a few known
shortcut combinations: 

- ReSharper Keymap on Windows: `Ctrl + Shift + A`
- Visual Studio Keymap on Windows: `Ctrl + Shift + A`
- Visual Studio Keymap on macOS: `Command (⌘) + Shift (⇧) + A`

The Keymap reference guide is also available online :

- Rider: https://www.jetbrains.com/help/rider/Reference_Keymap_Rider.html
- ReSharper: https://www.jetbrains.com/help/resharper/Reference__Keyboard_Shortcuts.html

I think it would be better if the purpose of this section was explicitly stated. Currently, there is no explanation of how to get people to remember the required shortcuts.

So I thought of improving it as follows :

# Learn essential shortcuts

In this workshop, you can learn the essential functions provided by ReSharper and Rider that you need to master.
These essential functions can be easily and directly accessed with shortcuts.

There are many shortcut keys, but if you have trouble, you can search for them.
We recommend that you print out the cheat sheet described below and mark it with a marker, as it will show you how to find them when you have trouble.


## Shortcuts And Actions

Through out this guided experience, you will see "shortcut" tags. 
These tags include the official name of each action and can be found
using the the `Find Action...` feature of your IDE. Reference your
preferences to find out what that shortcut is, but here are a few known
shortcut combinations: 

- ReSharper Keymap on Windows: `Ctrl + Shift + A`
- Visual Studio Keymap on Windows: `Ctrl + Shift + A`
- Visual Studio Keymap on macOS: `Command (⌘) + Shift (⇧) + A`

There are cheat sheets for shortcut keys :

- [Help] > [Keymap Reference]

It is recommended that you go to above, select the cheat sheet for your chosen Keymap, print it out, and keep it deskside.

Also the Keymap reference guide is also available online :

- Rider: https://www.jetbrains.com/help/rider/Reference_Keymap_Rider.html
- ReSharper: https://www.jetbrains.com/help/resharper/Reference__Keyboard_Shortcuts.html

Reflect improvements from Japanese translation

Summary

In the process of Japanese translation, the following improvements have been made.
In order to backport it to the English version, which is the root asset, in stages, it will be managed in this issue.

  • In each workshop, the keymaps for Resharper and Rider are now written together ( related to #26 ).
  • If there is a difference in functionality between ReSharper and Rider, the explanation has been enhanced.
  • (We'll add new perspectives as we get them.)

Please check the PR associated with this issue from this perspective.

Not working 4.7-Navigate_To_menu_related_files.html

Summary

  • Not working 01-Navigation/4-Contextual_navigation/4.7-Navigate_To_menu_related_files.html
  • When I followed the instructions and executed the "Navigate to (Ctrl+Shift+G)" shortcut in the HTML comment, nothing responded.
  • I want to see what your expectations are.

Glance at the problem code

<!DOCTYPE html>
<html>
<head>
    <title>Navigate To menu - related files</title>


    <!-- Navigate To menu
         
         Displays a contextual menu of options you can use to navigate to from
         your current location
         
         Very useful way of navigating without having to learn ALL of the shortcuts!
         
         <shortcut id="Navigate To...">Alt+`</shortcut>
                  
         
         1. Navigate to related files. E.g. referenced files from HTML
            Put text caret here →
            Navigate to Related Files shows list of other files containing definitions of PartialClass
        -->
    <script type="text/javascript" src="ExampleCode/script1.js"></script>
    <script type="text/javascript" src="ExampleCode/script2.js"></script>
    <script type="text/javascript" src="ExampleCode/script3.js"></script>

    <link rel="stylesheet" type="text/css" href="ExampleCode/style1.css">
    <link rel="stylesheet" type="text/css" href="ExampleCode/style2.css">
    <link rel="stylesheet" type="text/css" href="ExampleCode/style3.css">
</head>
<body>

</body>
</html>

Environment

  • Rider 2021.1.2
  • Keymap : Default IntelliJ Style

Prevent adding invalid windows filenames

When I am on Linux, I can add files like "List?Trigger.sql".
This should actually be List_Trigger.sql, the "? to _ mixup" comes from keyboard-layout mixup.
When I commit changes to the git repo on Linux, this works.
When I want to pull the latest version from the git repo on Windows, this creates errors.

Rider should warn on pushing illegal windows filenames to a git repo.

Proposal for shortcut description

Hi. @maartenba .
I have a proposal, will you listen to it?

Problem Statement

  • The description of the shortcut keys in the workshop is limited to the VisualStudio style for ReSharper.
  • This is often confusing for users who are new to the JetBrains IDE, especially those who are starting to use Rider.

Proposed improvement

I came up with the following three ideas.
Please let me know what you think.

  1. Include typical shortcut keys in all places (VisualStudio Style in ReSharper, and Default IntelliJ Style in Rider).
  2. Create a link to the keymap correspondence table and do not include specific shortcuts in the workshop, just the function names (ex. Search Everywhere).
  3. Maintain the current ReSharper's VisualStudio Style, but prepare a script for batch replacement according to the Keymap used, so that users can build the text according to their own environment.

Typo in 1.3-Go_to_symbol

Hi,

there is a little typo in that file, the shortcut should be: Shift+Alt+T instead of Ctrl+Shift+Alt+T for Visual Studio.

Greetings,
Selonka

Proposal for improvement of "3.1-Navigate_back.cs"

Summary

  • "3.1-Navigate_back.cs" is a workshop for "BACK" navigation.
  • However, We are usually familiar with "BACK" and "FORWARD".
  • So, I propose that this workshop be improved to include both "BACK" and "FORWARD" operations.

Are you sure you want to make this change @maartenba ?

Specific proposed changes

There are two changes :

  1. Rename filename (include both "back" and "forward" operations)
  2. Add content for a workshop on "FORWARD.
01-Navigation\3-Navigate_to_somewhere_youve_already_been\3.1-Navigate_back.cs
  -> 3.1-Navigate_back_and_forward.cs

Related issues

#20
Proposal for creating a Japanese localized version

Incorrect file name for "Recent Edits" workshop

Summary

  • The following workshop contents are not "Recently changed files" but "Recent edits".
  • Because, I propose to rename the files appropriately.
01-Navigation\3-Navigate_to_somewhere_youve_already_been\3.3-Recently_changed_files.cs
  -> 3.3-Recent_edits.cs

This topic is touched upon in the following discussion:

#28 (comment)

Target scope

  • English and Japanese (All currently available language versions)

NOTE

  • The English version will simultaneously reflect some of the improvements found in the process of creating the Japanese translation.
  • See #20, #26 and #28 (comment) for details.

@maartenba

Proposal for creating a Japanese localized version

Nice to meet you. And thank you for the great sample.

I am in awe of JetBrains' tools, they are really well done. I want my colleagues to get more familiar with this tool, so I am conducting my own Hands on.

I'm teaching it while translating it into Japanese, and I'd be happy to contribute step by step, and I'd like to send out a PR when I make a localized version in Japanese.

So I would like to discuss the directory structure of the Japanese localized version.

I think it would be better to have separate repositories, would the following structure be ok?

ex.

JetBrains
 `- resharper-rider-samples (current english version)
 `- resharper-rider-samples-ja (japanese localized version)

Best regards.

Question: How could I use ReSharper's SSR rule for Rider

I've already created a workable SSR inspection rule in ReSharper, and try to save it to computer and team-shared dotSetting file. But when I open my Rider and the same project, it still didn't hint in Rider inspections. Is it possible that use the same SSR custom patterns in ReSharper and Rider?

Confirmation of expected behavior @ 01-Navigation/6-Find_usages/6.2-Find_usages.cs

Summary

I want to check the expected behavior.

I didn't know what to expect from what was written in this workshop.
01-Navigation/6-Find_usages/6.2-Find_usages.cs

    :
        // 1. Put the caret on ButtonText and Find Usages
        //    Note that ReSharper has found read and write usages
-->     //    It has also found usages of the type in a XAML control
-->     //    And has inferred a dynamic usage in the XAML control where no type is specified
    :

When I tried it with ReSharper, I got the following results, is this what you expect?
What part of this do you want me to look at?

jetbrains-resharper-find-usages

Update JetBrains configuration files

NOTE

  • This issue has undergone changes to the proposal during the discussion process.
  • I note that the title and summary have been updated to reflect what I expect them to say so as not to give incorrect information when referred to later.
  • If you want to see the original process, check the record.

Summary

  • When I clone this workshop repository and open it with Rider, the personal configuration file of Rider is detected as a change.
  • In my environment, the following appears in the diff (@rider 2021.1.2).
        .idea/.idea.resharper-rider-samples/.idea/.gitignore
        .idea/.idea.resharper-rider-samples/.idea/.name
        .idea/.idea.resharper-rider-samples/.idea/encodings.xml
        .idea/.idea.resharper-rider-samples/.idea/indexLayout.xml
        .idea/.idea.resharper-rider-samples/.idea/vcs.xml

Proposed improvement

  • Add all project configuration recorded by the latest Rider (2021.1.2) to the repository.

(Initially, I thought that it was a personal setting that should not be included in the repository and I thought to add it to ".gitignore", but I was wrong; the update of Rider increased the number of configuration files, but it was not reflected in the repository.)

The following describes the idea of sharing the configurations:
https://www.jetbrains.com/help/idea/creating-and-managing-projects.html#share-project-through-vcs

Related issues

#20
Proposal for creating a Japanese localized version

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.