From 537c79d8d648a8b5eb6cf39093ace8670fe2d489 Mon Sep 17 00:00:00 2001 From: "sun.flat.yamada" Date: Sat, 1 May 2021 00:09:05 +0900 Subject: [PATCH 1/4] Translate to Japanese --- .../ja/00-EssentialShortcuts/0.0-Shortcuts.md | 27 +++-- .../ja/00-EssentialShortcuts/0.1-AltEnter.cs | 98 ++++++++++++++----- .../0.2-GoToEverything.md | 14 ++- .../0.3-ContextualMenus.cs | 67 +++++++------ 4 files changed, 140 insertions(+), 66 deletions(-) diff --git a/localized/ja/00-EssentialShortcuts/0.0-Shortcuts.md b/localized/ja/00-EssentialShortcuts/0.0-Shortcuts.md index 02d5096..802af3f 100644 --- a/localized/ja/00-EssentialShortcuts/0.0-Shortcuts.md +++ b/localized/ja/00-EssentialShortcuts/0.0-Shortcuts.md @@ -1,16 +1,27 @@ -# 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 や Rider が提供する機能のうち、必須で習得して欲しい機能を学びます。 +この必須機能は、ショートカットで簡単、かつ、ダイレクトに呼び出すことが出来ます。 + +ショートカットキーはたくさんありますが、困ったら検索することが出来ます。 +困った時に探す方法を紹介するので、後述するチートシートを印刷して、マーカーを引いておくことを推奨します。 + + +## ショートカットキーと機能 + +`Find Action...` の機能を使うと、たくさんあるショートカットキーに割り当てられた機能を見つけ出すことが出来ます。ショートカットキーの設定はいくつかの代表的な設定があります。自分がどの設定を使っているか、InstallしたReSharper や Rider の Preferences (設定) を確認してください。 + +`Find Action...` の機能を呼び出す代表的なショートカットキーは以下の通りです: - 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 : +ショートカットキーのチートシートがあります。 + +[Help] > [Keymap Reference] から自分が選択している Keymap のチートシートを選んで印刷し、デスクサイドに置いておくことを推奨します。 + +また、キーマップのリファレンスガイドはオンラインで参照できます: - Rider: https://www.jetbrains.com/help/rider/Reference_Keymap_Rider.html -- ReSharper: https://www.jetbrains.com/help/resharper/Reference__Keyboard_Shortcuts.html \ No newline at end of file +- ReSharper: https://www.jetbrains.com/help/resharper/Reference__Keyboard_Shortcuts.html diff --git a/localized/ja/00-EssentialShortcuts/0.1-AltEnter.cs b/localized/ja/00-EssentialShortcuts/0.1-AltEnter.cs index c506fcb..c408873 100644 --- a/localized/ja/00-EssentialShortcuts/0.1-AltEnter.cs +++ b/localized/ja/00-EssentialShortcuts/0.1-AltEnter.cs @@ -2,23 +2,53 @@ { // Alt+Enter // - // Used to apply quick fixes to inspections ("squigglies"), or apply - // context specific actions, depending on location of text caret + // QuickFix 機能を使ってみましょう。 // - // Also allows searching and applying all ReSharper commands direct - // from the menu. + // QuickFix は、Inspections (コード検査機能 = 波線で表示されるところ) や、 + // 現在のキャレット位置に応じて ReSharper や Rider が提供する機能を + // 簡単に (ダイレクトに) 適用することが出来ます。 + // + // もちろん、メニューから機能を選ぶことで、ReSharper や Rider が提供する + // 全ての機能を選択して適用することもできます。 + // + // QuickFix があることは、エディタの左側余白(行番号付近)に表示されます。 + // 例えば、以下のようなバリエーションがあります。 + // - 黄色の電球: 警告の修正 + // - 赤色の電球: エラーの修正 + // - ハンマー : コンテキストアクションの適用 (選択箇所特有の機能適用) + // - などなど + // + // (補足) + // 「コンテキスト」という言葉は日本語だと「文脈」と翻訳されますが、 + // 「その時の状況」といったイメージで理解すると良いでしょう。 + // ReSharper や Rider は、選択箇所そのものの問題だけでなく、 + // その時の状況 (前後関係やそこに至る文脈) に応じて + // 推奨する改善や修正を提示してくれます。 + // ソフトウエア業界では、こういった前後関係の文脈や + // 時間的連続性を言うときに「コンテキスト」という表現を + // 使うことが多いです。 + // https://ja.wikipedia.org/wiki/%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AF%E3%82%B9%E3%83%88 // - // Icon is displayed in gutter margin on left of editor, e.g. yellow - // light bulb to fix warning, red light bulb to fix error, hammer to - // apply a context action, etc. - // 1. Apply QuickFix for an inspection - // The class doesn't match ReSharper's naming style - // Place text caret on "squiggly". Note the lightbulb in the margin on the left - // Click the light bulb, or hit Alt+Enter - // Select "Rename to 'BadlyNamedClass'" to fix + // 1. Inspection (コード検査結果) に QuickFix を適用してみます + // 設定で定義している命名スタイルと一致しないクラス名があったとします。 + // ReSharper や Rider は 波線で教えてくれます。 + // + // badlyNamedClass に波線が引かれていると思います (*1)。 + // Alt+Enter を押すか、 + // エディター左側の余白、行番号付近にある電球アイコンをクリックしましょう。 // - // (More on inspections in section 3) + // "Rename to 'BadlyNamedClass'" とコードスタイルに設定されている + // 命名規則に適合した修正が提案されているはずです。選択して修正してみましょう。 + // + // (*1) + // もし、badlyNamedClass に波線が引かれていない場合は、 + // あなたが使っている ReSharper や Rider のコードスタイル設定が、 + // この演習が期待している前提と違っている可能性が高いです。 + // コードスタイルの設定に関しては以下を参照してください。 + // https://www.jetbrains.com/resharper/features/code_formatting.html + // + // (Inspections (コード検査) については Section 3 で詳しく説明します) public class badlyNamedClass { } @@ -27,20 +57,42 @@ public class ContextAction { public static string FormatString(string arg) { - // 2. Apply context action - // Place text caret on "arg" - // Note the hammer action - a context action is available (no squiggly!) - // Hit Alt+Enter, select "To String.Format invocation" + // 2. コンテキストアクションを適用してみます + // 下の "arg" を選択してキャレットを置いてください。 + // ハンマーのアイコンが表示されましたか? + // コンテキストアクションを使うことが出来ます(波線は出ませんので注意!)。 + // Alt+Enter を押して、 + // "To String.Format invocation" を選択してください。 + // String.Format 形式に簡単に修正できます。 + // + // (注意) + // C#での文字列操作は気付かずパフォーマンス悪化に陥ることが多いです。 + // 言語仕様を理解していないと、メモリ消費、実行速度の2つの面で課題が出ます。 + // メモリ消費の観点では '+' 演算は使うべきではありません。 + // StringBuilder 、または内部的に StringBuilder を使っている + // 文字列補完機能 '$' を使うべきです。 + // もし、実行速度にこだわるのであればもう少し実装方式を考える必要が出てくるでしょう。 + // + // String 型と StringBuilder 型 の違い + // https://docs.microsoft.com/ja-jp/dotnet/api/system.text.stringbuilder?view=net-5.0#the-string-and-stringbuilder-types + // + // Performance Of String Concatenation In C# (C#における文字列結合の性能考察) + // https://dotnetcoretutorials.com/2020/02/06/performance-of-string-concatenation-in-c/ + // return "Hello" + arg + "World"; } } - // 3. Go to action - // Place text caret on class name below - // Alt+Enter, note magnifying glass - // Click magnifying glass, start typing "rename" - // Or, just start typing "rename" from menu - // Filters ReSharper commands and applies + // 3. Go to action 機能を使ってみます。 + // 下のクラス名のどこかにキャレットを置き、 + // Alt+Enter を押します。 + // + // コンテキストメニューが表示されている状態で 'rename' とタイプし、 + // たくさんの機能からフィルターして表示される 'Rename...' を選択します。 + // + // このように、 ReSharper や Rider は、 + // 様々な場所で直接タイプすることで機能をフィルターし、 + // 直接呼び出すことが出来ます。 public class GoToAction { } diff --git a/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md b/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md index de3ab26..cb5ff8d 100644 --- a/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md +++ b/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md @@ -1,9 +1,13 @@ -# Essential Shortcuts - Search Everywhere +# 必須ショートカット - Search Everywhere (どこでも検索) -Search everywhere by name combines go to type, symbol, actions and file in one menu. +Search Everywhere (どこでも検索) という、必ず覚えて欲しい必須機能のショートカットがあります。 +名前であらゆる場所を検索し、タイプ、シンボル、アクション、ファイルへの移動を全てここから行うことができます。 -Ctrl+T +| IDE種類 | ショートカット | +| :--- | :--- | +| ReSharper | Ctrl+T | +| Rider | Shift, Shift (Double Shift) | -`Escape` to cancel. +`Escape` でキャンセルできます。 -Covered in more detail in next section +詳細は次のセクションで説明します。 diff --git a/localized/ja/00-EssentialShortcuts/0.3-ContextualMenus.cs b/localized/ja/00-EssentialShortcuts/0.3-ContextualMenus.cs index 1c2259b..3820a05 100644 --- a/localized/ja/00-EssentialShortcuts/0.3-ContextualMenus.cs +++ b/localized/ja/00-EssentialShortcuts/0.3-ContextualMenus.cs @@ -1,65 +1,72 @@ namespace EssentialShortcuts { - // Navigate To menu + // Navigate To メニューを使ってみます。 // - // Displays a contextual menu of options you can use to navigate to from - // your current location + // 現在の場所から移動したい時に利用できるコンテキストメニューを表示します。 + // これ1つ覚えておけば目的ごとの個別ショートカットを憶える必要がない便利なナビゲーション機能です。 // - // Very useful way of navigating without having to learn ALL of the shortcuts! + // Ctrl+Shift+G (Rider Default Keymap) + // Alt+` (Rider VisualStudio Keymap) // - // Alt+` (VS) + // 下の例で試してみましょう。2つの方法があります。 + // クラス名にキャレットを置き、 + // 1. 上で示したショートカットで 'Navigate to...' を起動します。 + // 2. Alt+Enter を押し、'Navigate To' とタイプします。 // - // 1. Place text caret on class name, invoke menu - // 2. Alt+Enteron class name, start typing (e.g. "Navigate To", "Extension methods") + // いずれの場合も表示されたコンテキストメニューで任意のワードをタイプすると、その内容で機能がフィルターできます。 + // 例えば、 'Navigate to...' を起動したコンテキストメニューで 'Extension methods' とタイプしてみてください。 // - // (Most options not useful with this example. Covered in more detail in next section) + // (ここで表示されるほとんどの選択肢はこの演習例では意味をなしません。後のセクションで詳しく説明します。) public class NavigateTo { } - // Refactor This menu + // Refactor This メニューを使ってみます。 // - // Displays a contextual menu of options for refactoring available at the current location + // 現在の場所で利用可能なリファクタリングのメニューを表示します。 + // これも1つ覚えておけば目的ごとの個別ショートカットを憶える必要がない便利な機能です。 // - // Very useful for invoking refactorings without requiring to know ALL shortcuts + // Ctrl+Alt+Shift+T (Rider Default Keymap) + // Ctrl+Shift+R (Rider VisualStudio Keymap) // - // Ctrl+Shift+R (VS + IntelliJ) + // クラス名にキャレットを置き、 + // 3. 上で示したショートカットで 'Refactor This' を起動します。 + // rename を選択し、クラス名を rename してみましょう。 + // 4. Alt+Enter を押し、'Refactor This' とタイプします。 + // 続けて 'Rename' とタイプして rename してみましょう。 // - // 3. Place text caret on class name, invoke menu - // Select rename, rename class - // 4. Alt+Enter on class name, start typing (e.g. "Refactor This", "Rename") - // - // Covered in more detail in next section + // (詳細は次のセクションで説明します。) public class RefactorThis { } - // Generate Code menu + // Generate Code メニューを使ってみます。 // - // Displays a contextual menu of options for generating code available at the current location + // 現在の場所で利用可能なコード生成のメニューを表示します。 // - // Alt+Insert (in text editor) + // Alt+Insert (in text editor / Rider Default Keymap) + // Ctrl+N (in text editor / Rider VisualStudio Keymap) // - // Covered in more detail in the Editing section + // (詳細は Editing のセクションで説明します。) public class GenerateCode { } - // Inspect This menu - // - // Displays a contextual menu of options for analysing code and control flow - // at the current location + // Inspect This メニューを使ってみます。 // - // Very useful for invoking value analysis without learning ALL shortcuts! + // 現在の場所で利用可能なコード解析とコントロールフローを分析するためのメニューを表示します。 + // これ1つ覚えておけば変数解析の個別ショートカットを憶える必要がない便利な機能です。 // - // Ctrl+Shift+Alt+A (VS + IntelliJ) + // Ctrl+Shift+Alt+A (Common) // - // 4. Place text caret on class name, invoke menu - // 5. Alt+Enter on class name, start typing (e.g. "Inspect This", "Hierarchies") + // クラス名にキャレットを置き、 + // 5. 上で示したショートカットで 'Inspect This...' を起動します。 + // 6. Alt+Enter を押し、 'Inspect This' とタイプします。 + // 続けて 'TypeHierarchy' とタイプして 継承関係を確認してみましょう。 // - // (Most options not useful with this example. Covered in more detail in later section) + // (ここで表示されるほとんどの選択肢はこの演習例では意味をなしません。後のセクションで詳しく説明します。) public class InspectThis { } From c06d431f7f689bbf27f4f5af45f18c7d4f072a6a Mon Sep 17 00:00:00 2001 From: "sun.flat.yamada" Date: Sun, 2 May 2021 20:39:28 +0900 Subject: [PATCH 2/4] Update keymap table --- .../00-EssentialShortcuts/0.2-GoToEverything.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md b/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md index cb5ff8d..cc54a0f 100644 --- a/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md +++ b/localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md @@ -3,11 +3,19 @@ Search Everywhere (どこでも検索) という、必ず覚えて欲しい必須機能のショートカットがあります。 名前であらゆる場所を検索し、タイプ、シンボル、アクション、ファイルへの移動を全てここから行うことができます。 -| IDE種類 | ショートカット | -| :--- | :--- | -| ReSharper | Ctrl+T | -| Rider | Shift, Shift (Double Shift) | +| Keymap | Shortcut | +| :--- | :--- | +| ReSharper VisualStudio | Ctrl+T | +| Rider Default IntelliJ | Shift, Shift (Double Shift) | `Escape` でキャンセルできます。 詳細は次のセクションで説明します。 + + +## 参考情報 + +選択しているKeymap毎のショートカットキーの確認にはチートシートが便利です。 + +- [Help] > [Keymap Reference] + From 99284b10465c4931d430aa613142c9fa3bf04e81 Mon Sep 17 00:00:00 2001 From: "sun.flat.yamada" Date: Sun, 2 May 2021 20:39:54 +0900 Subject: [PATCH 3/4] Add progress comment --- localized/ja/readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/localized/ja/readme.md b/localized/ja/readme.md index 73113d4..65fe649 100644 --- a/localized/ja/readme.md +++ b/localized/ja/readme.md @@ -1,5 +1,11 @@ # ReSharper/Rider の演習 (Workshop) +> 順次翻訳作業中です +> +> 日本語版はOfficial英語版の以下バージョンを元にしています。 +> +> 2021-04-28 80c5afcd6a971b03be02392b9cf96be1a6147581 + この場所では、 [ReSharper](https://jetbrains.com/resharper) や [Rider](https://jetbrains.com/rider) で利用することが出来る多くの機能や、生産性を上げる方法を学ぶことが出来ます。 ステップ・バイ・ステップ の演習として用意してあり、navigation (コードの移動・探索)、 editing (編集)、 inspections (静的解析などの検査)、 refactoring (リファクタリング) などです。 ReSharper や Rider の全ての機能を網羅しているわけではありませんが、初心者から玄人までを対象に、数多くの役立つテクニック (TIPSとトリック) を掲載しています。 From f73786c049163b7bbb55919bad5957f29d25aa42 Mon Sep 17 00:00:00 2001 From: "sun.flat.yamada" Date: Sun, 2 May 2021 20:40:53 +0900 Subject: [PATCH 4/4] Translate to Japanese --- .../1.1-Search_everything.md | 101 ++++++++++-------- .../1.2-Search_by_type.md | 67 ++++++++---- .../1.3-Go_to_symbol.md | 34 +++--- .../1.4-Go_to_file.md | 18 ++-- .../1.5-Go_to_file_member.cs | 32 +++--- .../1.5-Go_to_file_member.js | 23 ++-- .../1.5-Go_to_file_member.xml | 17 +-- .../1.6-Go_to_tips.md | 17 +-- .../1.7-View_breakpoints.cs | 24 +++-- 9 files changed, 197 insertions(+), 136 deletions(-) diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.1-Search_everything.md b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.1-Search_everything.md index 9eb63ab..ce64546 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.1-Search_everything.md +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.1-Search_everything.md @@ -1,43 +1,58 @@ -# Search Everywhere - -Navigate anywhere by name - -Combines go to type, symbol and file in one menu. - -Ctrl+T (VS) - -1. Navigate to type, symbol or file - Type "example", showing `ExampleCode.cs`, `Example_code.js`, the "GoToFileMemberExample" type, - the "example" function in `Example_code.js` and the "ExampleCode" folder - Open these files - -2. Displays recently open files by default - Filter by typing - -3. Use CamelHumps to navigate to the `DocumentViewModel` type - Type "DVM" in popup - Can also use lowercase "dvm" - -4. Use middle matching - type "view" to match `DocumentViewModel`, - `SettingsViewModel` and more - -5. Use wildcards - type "D*M" to match `DocumentViewModel` - -6. Search for "Person" will yield a variety of results, including methods - like `AddPerson`, `RemovePerson`, ... - Use exact search - add quotes ("") around the search - literal search - for "Person" will return only `Person` type and some text results. - -7. Navigate to library types when type not defined in current project - type "Console" in popup - -8. Include library types in search when type matches - Navigate to `System.Data.DataViewManager` - Type "DVM" in popup, then hit `Alt+N` to include library types - -9. Navigate to type with namespace - Type `System.Data.DataViewManager` - -10. Use space to delimit paths - type "1-n exa" to filter to files - in the "1-Navigation\ExampleCode" folder - Type "s d dvm" for `System.Data.DataViewManager` \ No newline at end of file +# Search Everywhere, Anything (どこでも、何でも検索) + +名前でどこへでも移動できます。 + +型、シンボル、ファイルへの移動が1つのメニューから行えます。 + +Ctrl+T (ReSharper VisualStudio Keymap) +Shift, Shift (Double Shift) (Rider Default IntelliJ Keymap) + +1. 型、シンボル、ファイルへ移動してみます。 + "example"とタイプすると、`ExampleCode.cs` や `Example_code.js` 、 + 他にも `GoToFileMemberExample` という型や、 + `Example_code.js` にある "example" という関数、 + "ExampleCode" というフォルダーなどが表示されます。 + これらを選択して開いてみましょう。 + +2. 最近開いたファイルがデフォルトで表示されます。 + 検索欄に何も入力していない場合でも、最近開いたファイルがデフォルトで表示されます。 + タイプしてフィルターしてみましょう。 + (2回目以降は前回の検索ワードが検索欄に保持されています。クリアして挙動を確認してみてください。) + +3. CamelHumps (略語入力) という機能を使って `DocumentViewModel` という型へ移動してみます。 + "DVM" とタイプしてみてください。 + 小文字の "dvm" を使うこともできます。 + 頭文字などのより少ない入力で迅速に検索、移動が出来ます。 + +4. 中間マッチングを使います。 + "view" とタイプすると、`DocumentViewModel` や `SettingsViewModel` といった + 中間に指定したワードを含む対象も候補に出てくることが分かります。 + +5. ワイルドカードを使ってみましょう。 + "D*M" とタイプして、`DocumentViewModel` が候補に出てくることを確認してください。 + ワイルドカードは CamelHumps (略語入力) とあわせて使うことが出来ます。 + +6. "Person" で検索すると `AddPerson`、 `RemovePerson` といったメソッド含む、 + 様々な結果が表示されます。 + ""Person"" をダブルクウォーと付きのリテラルとして検索すると、`Person` という型や、 + いくつかのテキストの結果しか得られなくなります。 + +7. 現在のプロジェクトで利用しているライブラリの型が定義されていない場合、 + "Console" とタイプすると設定のページにジャンプする項目が出て来ます。 + (Package Reference の設定) + +8. 型が一致した場合、ライブラリの型も検索に含まれます。 + `System.Data.DataViewManager` に移動してみましょう。 + "DVM" とタイプし、 `Alt+N` を押してライブラリの型を検索結果に含めます。 + `Alt+N` は、検索ポップアップ右上にある Include non-solution items + というチェックボックスを操作するショートカットです。 + +9. 名前空間 (namespace) を持つ型への移動。 + `System.Data.DataViewManager` とタイプしてみましょう。 + Include non-solution items が無効になっていても検索結果に表示されます。 + +10. スペースでパスを区切ることが出来ます。 + "1-n exa" とタイプすると、"1-Navigation\ExampleCode" フォルダ内の + ファイルにフィルタリングされます。 + 先ほどの `System.Data.DataViewManager` を検索したい場合は、 + "s d dvm" とタイプすれば良いです。 diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.2-Search_by_type.md b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.2-Search_by_type.md index dc6b2e5..6b71e8c 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.2-Search_by_type.md +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.2-Search_by_type.md @@ -1,36 +1,57 @@ -# Search By Type +# Search By Type (型で検索) -Navigate to type by type name +型名で検索してみましょう。 -Ctrl+T then `Tab` to focus on only "Classes". -Search by Type is invoked by first invoking Go to Everything, then navigating to the "Classes" tab. -It's a means of narrowing the search to just types. +## 前置き -1. Navigate to the `Person` type - type "Person" in popup +この演習の内容は `1.1-Search_everything.md` と極めて似ています。 +違いは検索対象が `All` か `Classes` か、というところだけです。 -2. Navigate to the `DocumentViewModel` type - type "DocumentViewModel" in popup -3. Use "CamelHumps" to navigate to `DocumentViewModel` - type "DVM" in popup +## 参考 - Search Everywhere のショートカットキー確認 -4. Mix "CamelHumps" and naming to navigate to `SettingsViewModel` - Type "SVM" in popup - Shows `SettingsViewManager` and `SettingsViewModel` - Continue typing to narrow search - "SVMod" filters to `SettingsViewModel` +Search Everywhere を呼び出すショートカットキーは以下です。 -5. Navigate to any view model with middle matching - type "view" in popup - Matches the middle of the symbol name - also works with CamelHumps +| Keymap | Shortcut | +| :--- | :--- | +| ReSharper VisualStudio | Ctrl+T | +| Rider Default IntelliJ | Shift, Shift (Double Shift) | -6. Navigate to `DocumentViewModel` using wildcard matching - type "D*M" in popup -7. Navigate to library types when type not defined in current project - type "Console" in popup +## 演習 -8. Include library types in search when type matches - Navigate to `System.Data.DataViewManager` - Type "DVM" in popup, then hit Alt+N to include library types +Search Everywhere の検索ポップアップが表示されたら、 `Tab` を押して、 "Classes" タブに移動させます。 +こうすることで、全てを検索対象としている `All` タブから、検索対象を型だけに絞ることが出来ます。 -9. Navigate to type with namespace Type `System.Data.DataViewManager` +1. `Person` 型を検索してみます - "Person" と検索欄にタイプします -10. Uses spaces to allow quick matching of namespace - Type "s d dvm" for `System.Data.DataViewManager` +2. `DocumentViewModel` 型を検索します - "DocumentViewModel" と検索欄にタイプします + +3. CamelHumps (略語入力) を使って `DocumentViewModel` 型を検索します - "DVM" と検索欄にタイプします + +4. CamelHumps (略語入力) と名前混成で `SettingsViewModel` 型を検索します + "SVM" と検索欄にタイプします。 + `SettingsViewManager` と `SettingsViewModel` が表示されます。 + "SVMod" になるように "od" を続けてタイプすると、 `SettingsViewModel` がフィルターされます。 + +5. 中間一致で任意の view model を検索する - "view" と検索欄にタイプします + シンボル名の真ん中に "view" を含む対象も候補に表示されます。 + この機能は CamelHumps (略語入力) でも機能します。 + +6. ワイルドカードを使って `DocumentViewModel` を検索します - "D*M" と検索欄にタイプします + +7. 現在のプロジェクトでライブラリ型が未定義の場合、 "Console" と検索欄にタイプします。 + Package Reference の設定ページにジャンプする項目が出て来ます。 + +8. 型名が一致している場合はライブラリの型が検索結果に含まれることを確認します。 + `System.Data.DataViewManager` を検索するため、"DVM" と検索欄にタイプします。 + そこで `Alt+N` を押して "Include non-solution items" を有効にし、 + ライブラリの型が検索結果に含まれるようになることを確認してください。 + +9. 名前空間付きの型で `System.Data.DataViewManager` を検索します。 + "Include non-solution items" が無効でも、 + 検索結果に含まれることを確認してください。 + +10. スペースを使って名前空間を素早くマッチさせます。 + `System.Data.DataViewManager` を検索するためには、 "s d dvm" とタイプしましょう。 diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.3-Go_to_symbol.md b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.3-Go_to_symbol.md index c352be6..5141f1f 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.3-Go_to_symbol.md +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.3-Go_to_symbol.md @@ -1,24 +1,30 @@ # Go to Symbol -Navigate to any symbol - type, method, property, variable +型、メソッド、プロパティ、変数など、任意のシンボルへ移動します。 -Ctrl+Shift+Alt+T (VS) +Ctrl+Alt+Shift+T (ReSharper VisualStudio Keymap) +Ctrl+Alt+Shift+N (Rider Default IntelliJ Keymap) -1. Navigate to `Person.Name` - type "Person" in popup +1. `Person.Name` に移動します - "Person" とポップアップにタイプします -2. Use CamelHumps, wildcards and middle matching +2. CamelHumps (略語入力)、ワイルドカードや中間一致を使ってみましょう -3. Narrow search by more fully qualifying the search - Type "Person." in the popup, filters to `Person.Name` and `Person.Age` +3. 絞り込み検索でより詳細な検索条件を設定することができます + "Person." とポップアップにタイプします。 + `Person.Name` と `Person.Age` がフィルターされます。 -4. Use a space to delimit words, e.g. namespaces, classes and symbols - Type "person name" in popup +4. スペースを使うことで、名前空間、クラス、シンボルなどの単語の区切りを指定できます。 + "person name" とポップアップにタイプします。 -5. To Include non-project symbols - Type "Name" and hit Ctrl+T (VS) to toggle the checkbox. +5. ライブラリなどのプロジェクト外のシンボルを検索対象に含めてみましょう + "Name" とタイプし、"Include non-solution items" チェックボックスを有効にします。 + ReSharper の VisualStudio Style では `Ctrl+T` です。 + Rider の Default Style では `Alt+N` です。 -6. Navigate to library symbols if no matching symbols found - Type "console WL" +6. ライブラリのシンボルに移動したいのに一致するシンボルが見つからない場合、 + "console WL" とタイプします。 + "System.Console.WriteLine" が見つかりましたか? -7. Find symbols in JS files - Type "calc", navigate to the `calculate` function in `Example_code.js` +7. JSファイルでシンボルを検索します + "calc" とタイプして、 `Example_code.js` の `calculate` 関数に移動してみましょう。 + diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.4-Go_to_file.md b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.4-Go_to_file.md index ed9d62c..b956439 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.4-Go_to_file.md +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.4-Go_to_file.md @@ -1,15 +1,19 @@ # Go To File -Navigate directly to a file +ファイルに直接移動します。 -Ctrl+Shift+T (VS) +Ctrl+Shift+T (ReSharper VisualStudio Keymap) +Ctrl+Shift+N (Rider Default IntelliJ Keymap) -1. Navigate to `Go_to_file.txt` +1. `Go_to_file.txt` に移動してみましょう -2. Use middle matching "Go" or file +2. 中間一致を使って "Go" や "file" をタイプして移動してみましょう -3. Use wild cards - "*.cs" or "*.xml" +3. ワイルドカードを使ってみましょう - "*.cs" や "*.xml" -4. Use CamelHumps - "EC" to navigate to `ExampleCode.cs` +4. CamelHumps (略語入力) を使ってみましょう - `ExampleCode.cs` に移動するため "EC" とタイプしてみましょう -5. Navigate to folder with "EC" to show ExampleCode folder in Solution Explorer \ No newline at end of file +5. "EC" とタイプしてフォルダーに移動します。 + Solution Explorer の ExampleCodeフォルダに移動できることを確認しましょう。 + (フォルダは下の方にリストされていると思います) + \ No newline at end of file diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.cs b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.cs index 4645093..147a316 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.cs +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.cs @@ -1,25 +1,27 @@ namespace JetBrains.ReSharper.Koans.Navigation { - // Go to File Member + // ファイルメンバーへの移動 // - // Navigate to any members defined in the current file + // 現在のファイルで定義されているメンバーに移動します。 // - // Alt+\ (VS) + // Alt+\ (ReSharper VisualStudio Keymap) + // Ctrl+F12 (Rider Default IntelliJ Keymap) // - // 1. Navigate to type by name, CamelHumps, middle matching or wildcard - // Type "GoToFileMemberExample" - // Type "GTFME" - // Type "FileMember" - // Type "GoTo*Example" + // 1. 名前、CamelHumps (略語入力)、中間一致やワイルドカードで移動します。 + // 以下のようなキーワードをタイプして結果を確認してみましょう。 + // "GoToFileMemberExample" + // "GTFME" + // "FileMember" + // "GoTo*Example" // - // 2. Navigate to class member by name - // Type "foo" to navigate to GoToFileMemberExample.Foo + // 2. 名前で Class メンバーに移動します。 + // "foo" とタイプして、 "GoToFileMemberExample.Foo" に移動しましょう。 // - // 3. Navigate to constructor - // Type "new" or "ctor" + // 3. コンストラクターに移動します。 + // "new" 、または "ctor" とタイプします。 // - // 4. Navigate to members by visibility - // Type "public" or "private" + // 4. 可視属性 (Visibility - public / private) で移動します。 + // "public" 、または "private" とタイプします。 // ---------- @@ -36,4 +38,4 @@ public GoToFileMemberExample(string foo, int bar) public string Foo { get; private set; } } -} \ No newline at end of file +} diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.js b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.js index 58998f7..915825c 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.js +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.js @@ -1,16 +1,21 @@ -// Go to File Member in JS +// ファイルメンバーへの移動 (JavaScript) // -// Navigate to any members defined in the current file +// 現在のファイルで定義されているメンバーに移動します。 // -// Alt+\ (VS) +// Alt+\ (ReSharper VisualStudio Keymap) +// Ctrl+F12 (Rider Default IntelliJ Keymap) // -// 1. Navigate to "example" or "other" +// 1. "example" 、または "other" とタイプして移動してみましょう。 // -// 2. Navigate with middle matching and wildcards -// Type "interesting", "really*function" +// 2. 中間一致とワイルドカードを使って移動してみましょう。 +// 以下の様にタイプして動きを確認してみましょう。 +// "interesting" +// "really*function" // -// 3. Navigate underscore styled names -// Type "rif" (note case - NOT "RIF") +// 3. アンダースコアで区切られた名前に移動する方法を確認してみます。 +// "rif" とタイプしてみましょう。 +// 古いバージョンの場合大文字小文字を区別します - "RIF" ではありません。 +// (参考) Rider 2021.1.2 では "RIF" でもマッチします。 function example(name, age) { // ... @@ -22,4 +27,4 @@ function other() { function really_interesting_function() { // ... -} \ No newline at end of file +} diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.xml b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.xml index 5608a6a..21ff5ae 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.xml +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.5-Go_to_file_member.xml @@ -1,14 +1,15 @@  - \ No newline at end of file + diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.6-Go_to_tips.md b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.6-Go_to_tips.md index 861a8b7..b8fb953 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.6-Go_to_tips.md +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.6-Go_to_tips.md @@ -1,11 +1,12 @@ -# Go To - Tips +# Go To - Tips (ReSharper特有) -1. Toggle between Go to Everything and Go to Type by repeatedly - hitting the Ctrl+T shortcut +1. ReSharper を Visual Studio Style の Keymap を使っている場合、 + Ctrl+T を押すたびに + Go to Everything と Go to Type を行き来できます。 -2. Switching (`Tab`) between Search Everywhere, type and symbol while - the popup is displayed maintains the search text - Type "Go" and switch between the go to popups +2. ポップアップ表示中に `Tab` で検索対象を切り替えても、検索文字列は維持されます。 + (Search Everywhere, type, symbol...) + "Go" とタイプすると go to ポップアップと行き来できます。 -3. Click the "Open In Find Tool Window" icon in the top right of the popup - to display the results in the Find Results window +3. ポップアップの右上にある「Open in Find Tool Window」アイコンをクリックすると、 + 検索結果ウィンドウに結果が表示されるようになります。 diff --git a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.7-View_breakpoints.cs b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.7-View_breakpoints.cs index 95d4942..72436eb 100644 --- a/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.7-View_breakpoints.cs +++ b/localized/ja/01-Navigation/1-Navigate_to_something_you_know/1.7-View_breakpoints.cs @@ -1,25 +1,31 @@ namespace JetBrains.ReSharper.Koans.Navigation { - // View Breakpoints + // ブレイクポイントの表示 // - // Navigate to breakpoints in solution. + // Solution 内の ブレイクポイント を探索します。 // - // Ctrl+Alt+B + // ブレイクポイントの表示 + // Ctrl+Alt+B (ReSharper VisualStudio Keymap) + // Ctrl+Shift+F8 (Rider Default IntelliJ Keymap) + // + // ブレイクポイント設定(トグル) + // F9 (ReSharper VisualStudio Keymap) + // Ctrl+F8 (Rider Default IntelliJ Keymap) public class ViewBreakpoints { public void Foo() { - // 1. Place a breakpoint at the start of this method + // 1. このメソッドの開始地点にブレイクポイントを設定してください (上の行にキャレットを置きましょう) } public void Bar() { - // 2. Place a breakpoint at the start of this method + // 2. このメソッドの開始地点にブレイクポイントを設定してください (上の行にキャレットを置きましょう) } - // 3. Go to Breakpoint - // Use the keyboard shortcut Ctrl+Alt+B - // See that both of the breakpoints we created are listed, hit enter to navigate. + // 3. ブレイクポイントに移動してみます。 + // 前述のショートカットを使って "View Breakpoints..." を起動します。 + // 追加したブレイクポイントがリストされていることを確認したら、Enter を押して移動してみてください。 } -} \ No newline at end of file +}