Skip to content

Commit db38abb

Browse files
Merge pull request #38 from sun-flat-yamada/translate-into-ja-01-navigation-4-contextual-navigation
(#20) Translate into Japanese @ 01-Navigation/4-Contextual_navigation
2 parents 92f046c + 9f3dad2 commit db38abb

21 files changed

+302
-165
lines changed

localized/ja/.idea/.idea.resharper-rider-samples/.idea/vcs.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,43 @@
1-
// Navigate To menu
1+
// 移動メニュー (Navigate to) を使ってみます。 - 基本
22
//
3-
// Displays a contextual menu of options you can use to navigate to from
4-
// your current location
3+
// 現在の場所から移動する機能を呼び出すコンテキストメニューを表示します。
4+
// これだけ覚えておけば、移動に関する個別のショートカットを覚える必要がない便利な方法です。
55
//
6-
// Very useful way of navigating without having to learn ALL of the shortcuts!
6+
// https://www.jetbrains.com/help/resharper/Navigation_and_Search__Navigate_from_Here.html
7+
// https://www.jetbrains.com/help/rider/Navigation_and_Search__Navigate_from_Here.html
78
//
8-
// <shortcut id="Navigate To...">Alt+`</shortcut>
9+
// <shortcut id="Navigate to">Alt+` (ReSharper VisualStudio Keymap)</shortcut>
10+
// <shortcut id="Navigate to">Ctrl+Shift+G (Rider Default IntelliJ Keymap)</shortcut>
11+
//
12+
// 対象の上にキャレットを置き、実行してみましょう。
13+
// ReSharper や Rider は、キャレットが置かれている対象を賢く識別し、
14+
// その対象、文脈、背景から実装者が欲しくなる移動の機能を提供します。
15+
// (つまり、キャレットが置かれた場所によってメニューの内容が変わります。)
16+
//
17+
// 補足
18+
// Rider Default IntelliJ Keymap の場合、Go! と覚えましょう (Ctrl+Shift+G の "G" の意味)。
19+
// 対象の上でこのキーを押せば、そこから移動するための何かしらのアクションがリストされます。
20+
// これには、定義箇所や利用箇所のリスト表示といった、移動のための表示機能も含まれます。
21+
// ツールに問い合わせる感覚で気軽に押すようにすると、自然と活用の幅が広がって行くでしょう。
922
//
1023

11-
12-
// 1. Works on all symbols, including using statements
24+
// 1. ステートメントを含むすべてのシンボルで動作します。
25+
// using している名前空間の上で操作して、
26+
// 以下のようなメニューがリストされることを確認し、実行してみましょう。
27+
// Declaration
28+
// Implementation
29+
// Find Usage of Symbol
30+
// Usage of Symbol
31+
//
32+
// 注意
33+
// resharper-rider-samples/localized/ja のディレクトリをルートで開いてください。
34+
// resharper-rider-samples のディレクトリを開いていると、
35+
// 英語版のプロジェクト側が読み込まれてしまい参照関係がリストに表示されません。
1336
using System;
1437
using System.Collections.Generic;
1538
using System.ComponentModel;
1639

17-
// 2. Works on namespaces
40+
// 2. 自分で定義した名前空間の上で操作してみましょう。
1841
namespace JetBrains.ReSharper.Koans.Navigation
1942
{
20-
}
43+
}

localized/ja/01-Navigation/4-Contextual_navigation/4.2-Navigate_To_menu_on_type.cs

+69-35
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,61 @@
44

55
namespace JetBrains.ReSharper.Koans.Navigation
66
{
7-
// Navigate To menu
7+
// 移動メニュー (Navigate to) を使ってみます。 - Menu on Type
88
//
9-
// Displays a contextual menu of options you can use to navigate to from
10-
// your current location
9+
// 現在の場所から移動する便利な方法です。
10+
// 基本的な仕組みは 基本編 4.1-Navigate_To_menu.cs を参照してください。
1111
//
12-
// Very useful way of navigating without having to learn ALL of the shortcuts!
12+
// Navigate to の操作方法
13+
// <shortcut id="Navigate to">Alt+` (ReSharper VisualStudio Keymap)</shortcut>
14+
// <shortcut id="Navigate to">Ctrl+Shift+G (Rider Default IntelliJ Keymap)</shortcut>
1315
//
14-
// <shortcut id="Navigate To...">Alt+`</shortcut>
16+
// 対象の上にキャレットを置き、実行してみましょう。
1517
//
1618

17-
18-
// 1. When the caret is on a type definition (DerivedClass)
19-
// (Find Usages, related files covered later)
20-
// a) Go to Base Symbols + Derived Symbols
21-
// b) Extension methods
22-
// c) Object Browser, Windows Explorer, Command Prompt
23-
// d) Locate in Solution Explorer
24-
// d) Referenced Code finds all code referenced by the type, e.g. BaseClass
25-
public class DerivedClass // <- Text caret on DerivedClass
19+
// 1. 型定義 (継承クラス) にキャレットがある場合、以下のような候補が表示されます。
20+
// それぞれ試してみましょう。
21+
// - Declaration : 宣言に移動します
22+
// - Implementation : 実装に移動します
23+
// - Base Symbols : 基底クラスに移動します
24+
// - Find Usages of Symbol : (*1)
25+
// - Related Files... : (*1)
26+
// - Usages of Symbol : (*1)
27+
// - Derived Symbols : 派生クラスに移動します
28+
// - Extension methods : 拡張メソッドに移動します
29+
// - Consuming APIs : 自身をパラメーターで受け取る箇所に移動します
30+
// - Exposing APIs : 自身を戻り値として返す箇所に移動します
31+
// - Referenced Code : 型が参照されるすべてのコードを見つけます (例: BaseClass)。
32+
// - Locate in Solution Explorer : (Only ReSharper) Solution Explorer で現在のファイルに移動します
33+
//
34+
// (*1) Find Usages of Symbol, Usages of Symbol, Related files は後の演習で詳細に説明します。
35+
public class DerivedClass // <- DerivedClass を選択してキャレットを置き、試してみてください
2636
: BaseClass
2737
{
2838
}
2939

3040

31-
// 2. When the caret is on a base class (BaseClass)
32-
// a) As above (find usages, base symbols, etc.)
33-
// b) Declaration navigates to the declaration of BaseClass
34-
// c) Implementation navigates to the implementations of BaseClass - deriving symbols
35-
// d) Overriding members highlights all members that override from BaseClass
36-
// Escape clears the highlight
41+
// 2. 型定義 (基底クラス) にキャレットがある場合も同様の候補が表示されます。
42+
// このクラスの場合、 override したメソッド定義があるので、
43+
// ReSharper や Rider は正しく認識して候補に表示します。
44+
// - Overriding members : 全ての override されているメソッドをハイライト表示します
45+
// Escape を押すとハイライトはクリアされます
46+
//
47+
// (参考) 候補間の移動方法
48+
//
49+
// TODO: Rider のショートカットはデフォルトで未定義(設定なし)であり、独自に設定しなければ動作しない
50+
// [Settings] > [Keymap] > [Main Manu] > [Edit] > [Find Usages]
51+
// - Next Highlited Usage
52+
// - Previous Highlited Usage
53+
//
54+
// <shortcut id="Go to Next/Previous">Ctrl+Alt+PageUp/Ctrl+Alt+PageDown (ReSharper VisualStudio Keymap)</shortcut>
55+
// <shortcut id="Find Next/Previous"> F3 / Shift+F3 (Rider Default IntelliJ Keymap)</shortcut>
3756
//
38-
// <shortcut id="Find Next / Move to Next Occurrence">Ctrl+Alt+PgUp/Ctrl+Alt+PgDown (VS)</shortcut> to navigate between
57+
// (ReSharper) https://www.jetbrains.com/help/resharper/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
58+
// (Rider) https://www.jetbrains.com/help/rider/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
3959
//
4060
public class DerivedClass2
41-
: BaseClass // <- Text caret on BaseClass
61+
: BaseClass // <- BaseClass を選択してキャレットを置き、試してみてください
4262
{
4363
public override void VirtualMethod()
4464
{
@@ -51,14 +71,26 @@ public override string VirtualProperty
5171
}
5272

5373

54-
// 3. When the caret is on an implemented interface (ISimpleInterface)
55-
// a) as above (find usages, base symbols, declarations, implementations, etc.)
56-
// b) Implementing Members highlights all members of the interface
57-
// Escape clears the highlight
58-
// <shortcut id="Find Next / Move to Next Occurrence">Ctrl+Alt+PgUp/Ctrl+Alt+PgDown (VS)</shortcut> to navigate between
74+
// 3. 実装時のインターフェース型 (ここでは ISimpleInterface ) にキャレットがある場合も同様の候補が表示されます。
75+
// ReSharper や Rider は Interface であることを正しく認識して候補に表示します。
76+
// - Implementing Members : Interface で定義されている全てのメンバーをハイライト表示します
77+
// Escape を押すとハイライトはクリアされます
78+
//
79+
// (参考) 候補間の移動方法
80+
//
81+
// TODO: Rider のショートカットはデフォルトで未定義(設定なし)であり、独自に設定しなければ動作しない
82+
// [Settings] > [Keymap] > [Main Manu] > [Edit] > [Find Usages]
83+
// - Next Highlited Usage
84+
// - Previous Highlited Usage
85+
//
86+
// <shortcut id="Go to Next/Previous">Ctrl+Alt+PageUp/Ctrl+Alt+PageDown (ReSharper VisualStudio Keymap)</shortcut>
87+
// <shortcut id="Find Next/Previous"> F3 / Shift+F3 (Rider Default IntelliJ Keymap)</shortcut>
88+
//
89+
// (ReSharper) https://www.jetbrains.com/help/resharper/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
90+
// (Rider) https://www.jetbrains.com/help/rider/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
5991
//
6092
public class SimpleClass
61-
: ISimpleInterface // <- Text caret on ISimpleInterface
93+
: ISimpleInterface // <- ISimpleInterface を選択してキャレットを置き、試してみてください
6294
{
6395
public void SayHello()
6496
{
@@ -72,13 +104,15 @@ public void SayGoodbye()
72104
}
73105

74106

75-
// 4. When the caret is on an implementing interface defined in another assembly
76-
// a) Doing Go To Derived Symbols on IComponent will only show SimpleComponent
77-
// b) Navigate to Declaration of IComponent and then doing Go To Derived Symbols
78-
// widens the scope, and includes all referenced assemblies, showing many more
79-
// derived types
107+
// 4. 他のアセンブリで定義された実装インターフェース (ここでは IComponent)
108+
// にキャレットがある場合も同様の候補が表示されます。
109+
// ここでのポイントは、
110+
// - Derived Symbols で派生クラスを探すとこのSolutionに関係したものだけがフィルターして表示されます
111+
// - Declaration で宣言に移動した後で、 IComponent に対して Derived Symbols を実行すると、
112+
// 全ての参照アセンブリを含み、もっと多くの派生型を探すことが出来ます。
113+
//
80114
public class SimpleComponent
81-
: System.ComponentModel.IComponent // <- Text caret on IComponent
115+
: System.ComponentModel.IComponent // <- IComponent を選択してキャレットを置き、試してみてください
82116
{
83117
#region Implementation details
84118

@@ -92,4 +126,4 @@ public void Dispose()
92126

93127
#endregion
94128
}
95-
}
129+
}

localized/ja/01-Navigation/4-Contextual_navigation/4.3-Navigate_To_menu_on_method.cs

+43-16
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,61 @@
22

33
namespace JetBrains.ReSharper.Koans.Navigation
44
{
5-
// Navigate To menu
5+
// 移動メニュー (Navigate to) を使ってみます。 - Menu on Method
66
//
7-
// Displays a contextual menu of options you can use to navigate to from
8-
// your current location
7+
// 現在の場所から移動する便利な方法です。
8+
// 基本的な仕組みは 基本編 4.1-Navigate_To_menu.cs を参照してください。
99
//
10-
// Very useful way of navigating without having to learn ALL of the shortcuts!
10+
// Navigate to の操作方法
11+
// <shortcut id="Navigate to">Alt+` (ReSharper VisualStudio Keymap)</shortcut>
12+
// <shortcut id="Navigate to">Ctrl+Shift+G (Rider Default IntelliJ Keymap)</shortcut>
1113
//
12-
// <shortcut id="Navigate To...">Alt+`</shortcut>
14+
// 対象の上にキャレットを置き、実行してみましょう。
1315
//
1416

15-
16-
// 5. When the caret is on a method
17+
// 1. メソッド上にキャレットがある場合
1718
public class NavigateToMenuOnMethod
1819
{
19-
// a) Member overloads highlights overloads of the method
20-
// Escape clears the highlight
21-
// <shortcut id="Find Next / Move to Next Occurrence">Ctrl+Alt+PgUp/Ctrl+Alt+PgDown (VS)</shortcut> to navigate between
20+
// a) Member Overloads を選択してみましょう
21+
// 対象メソッドがハイライト表示されます。
22+
// Escape を押すとハイライトはクリアされます。
23+
//
24+
// (参考) 候補間の移動方法
25+
//
26+
// TODO: Rider のショートカットはデフォルトで未定義(設定なし)であり、独自に設定しなければ動作しない
27+
// [Settings] > [Keymap] > [Main Manu] > [Edit] > [Find Usages]
28+
// - Next Highlited Usage
29+
// - Previous Highlited Usage
30+
//
31+
// <shortcut id="Go to Next/Previous">Ctrl+Alt+PageUp/Ctrl+Alt+PageDown (ReSharper VisualStudio Keymap)</shortcut>
32+
// <shortcut id="Find Next/Previous"> F3 / Shift+F3 (Rider Default IntelliJ Keymap)</shortcut>
33+
//
34+
// (ReSharper) https://www.jetbrains.com/help/resharper/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
35+
// (Rider) https://www.jetbrains.com/help/rider/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
2236
//
23-
public bool OverloadedMethod()
37+
public bool OverloadedMethod() // <- OverloadedMethod を選択してキャレットを置き、試してみてください
2438
{
2539
return true;
2640
}
2741

28-
// b) Function exit(s) highlights return statements
29-
// Escape clears the highlight
30-
// <shortcut id="Find Next / Move to Next Occurrence">Ctrl+Alt+PgUp/Ctrl+Alt+PgDown (VS)</shortcut> to navigate between
42+
// b) Function exit(s) を選択してみましょう。
43+
// 関数からの出口がハイライト表示されます。
44+
// Escape を押すとハイライトはクリアされます。
45+
//
46+
// (参考) 候補間の移動方法
47+
//
48+
// TODO: Rider のショートカットはデフォルトで未定義(設定なし)であり、独自に設定しなければ動作しない
49+
// [Settings] > [Keymap] > [Main Manu] > [Edit] > [Find Usages]
50+
// - Next Highlited Usage
51+
// - Previous Highlited Usage
52+
//
53+
// <shortcut id="Go to Next/Previous">Ctrl+Alt+PageUp/Ctrl+Alt+PageDown (ReSharper VisualStudio Keymap)</shortcut>
54+
// <shortcut id="Find Next/Previous"> F3 / Shift+F3 (Rider Default IntelliJ Keymap)</shortcut>
55+
//
56+
// (ReSharper) https://www.jetbrains.com/help/resharper/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
57+
// (Rider) https://www.jetbrains.com/help/rider/Navigation_and_Search__Navigate_from_Here__Overriding_Members.html
3158
//
32-
public bool OverloadedMethod(string arg1)
59+
public bool OverloadedMethod(string arg1) // <- OverloadedMethod を選択してキャレットを置き、試してみてください
3360
{
3461
if (string.IsNullOrEmpty(arg1))
3562
return false;
@@ -44,4 +71,4 @@ public bool OverloadedMethod(string arg1, string arg2)
4471
return false;
4572
}
4673
}
47-
}
74+
}

0 commit comments

Comments
 (0)