Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate to Japanese 01-Navigation #27

Merged
merged 5 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions localized/ja/00-EssentialShortcuts/0.2-GoToEverything.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
Search Everywhere (どこでも検索) という、必ず覚えて欲しい必須機能のショートカットがあります。
名前であらゆる場所を検索し、タイプ、シンボル、アクション、ファイルへの移動を全てここから行うことができます。

| IDE種類 | ショートカット |
| :--- | :--- |
| ReSharper | <shortcut id="Search Everywhere">Ctrl+T</shortcut> |
| Rider | <shortcut id="Search Everywhere">Shift, Shift (Double Shift)</shortcut> |
| Keymap | Shortcut |
| :--- | :--- |
| ReSharper VisualStudio | <shortcut id="Search Everywhere">Ctrl+T</shortcut> |
| Rider Default IntelliJ | <shortcut id="Search Everywhere">Shift, Shift (Double Shift)</shortcut> |

`Escape` でキャンセルできます。

詳細は次のセクションで説明します。


## 参考情報

選択しているKeymap毎のショートカットキーの確認にはチートシートが便利です。

- [Help] > [Keymap Reference]

Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
# Search Everywhere

Navigate anywhere by name

Combines go to type, symbol and file in one menu.

<shortcut id="Search Everywhere">Ctrl+T (VS)</shortcut>

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`
# Search Everywhere, Anything (どこでも、何でも検索)

名前でどこへでも移動できます。

型、シンボル、ファイルへの移動が1つのメニューから行えます。

<shortcut id="Search Everywhere">Ctrl+T (ReSharper VisualStudio Keymap)</shortcut>
<shortcut id="Search Everywhere">Shift, Shift (Double Shift) (Rider Default IntelliJ Keymap)</shortcut>

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" とタイプすれば良いです。
Original file line number Diff line number Diff line change
@@ -1,36 +1,57 @@
# Search By Type
# Search By Type (型で検索)

Navigate to type by type name
型名で検索してみましょう。

<shortcut id="Search Everywhere">Ctrl+T</shortcut> 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 | <shortcut id="Search Everywhere">Ctrl+T</shortcut> |
| Rider Default IntelliJ | <shortcut id="Search Everywhere">Shift, Shift (Double Shift)</shortcut> |

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" とタイプしましょう。
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Go to Symbol

Navigate to any symbol - type, method, property, variable
型、メソッド、プロパティ、変数など、任意のシンボルへ移動します。

<shortcut id="Go to Symbol...">Ctrl+Shift+Alt+T (VS)</shortcut>
<shortcut id="Go to Symbol...">Ctrl+Alt+Shift+T (ReSharper VisualStudio Keymap)</shortcut>
<shortcut id="Go to Symbol...">Ctrl+Alt+Shift+N (Rider Default IntelliJ Keymap)</shortcut>

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 <shortcut id="Search Everywhere">Ctrl+T (VS)</shortcut> 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` 関数に移動してみましょう。

Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Go To File

Navigate directly to a file
ファイルに直接移動します。

<shortcut id="Go to File...">Ctrl+Shift+T (VS)</shortcut>
<shortcut id="Go to File...">Ctrl+Shift+T (ReSharper VisualStudio Keymap)</shortcut>
<shortcut id="Go to File...">Ctrl+Shift+N (Rider Default IntelliJ Keymap)</shortcut>

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
5. "EC" とタイプしてフォルダーに移動します。
Solution Explorer の ExampleCodeフォルダに移動できることを確認しましょう。
(フォルダは下の方にリストされていると思います)

Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
namespace JetBrains.ReSharper.Koans.Navigation
{
// Go to File Member
// ファイルメンバーへの移動
//
// Navigate to any members defined in the current file
// 現在のファイルで定義されているメンバーに移動します。
//
// <shortcut id="File Member">Alt+\ (VS)</shortcut>
// <shortcut id="File Member">Alt+\ (ReSharper VisualStudio Keymap)</shortcut>
// <shortcut id="File Member">Ctrl+F12 (Rider Default IntelliJ Keymap)</shortcut>
//
// 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" とタイプします。


// ----------
Expand All @@ -36,4 +38,4 @@ public GoToFileMemberExample(string foo, int bar)

public string Foo { get; private set; }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Go to File Member in JS
// ファイルメンバーへの移動 (JavaScript)
//
// Navigate to any members defined in the current file
// 現在のファイルで定義されているメンバーに移動します。
//
// <shortcut id="File Member">Alt+\ (VS)</shortcut>
// <shortcut id="File Member">Alt+\ (ReSharper VisualStudio Keymap)</shortcut>
// <shortcut id="File Member">Ctrl+F12 (Rider Default IntelliJ Keymap)</shortcut>
//
// 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) {
// ...
Expand All @@ -22,4 +27,4 @@ function other() {

function really_interesting_function() {
// ...
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<!--
Go to File Member in xml files

<shortcut id="File Member">Alt+\ (VS)</shortcut>
XMLファイルのメンバーを検索します

1. Filter for element - type "person" in popup
2. Special support for attributes called "name"
Change the "named" attribute to "name"
Show popup, can now filter by "Dave" or "Angela"
<shortcut id="File Member">Alt+\ (ReSharper VisualStudio Keymap)</shortcut>
<shortcut id="File Member">Ctrl+F12 (Rider Default IntelliJ Keymap)</shortcut>

1. element でフィルターします - "person" とポップアップにタイプします
2. "name" という attributes の特別サポート (特別扱い) を確認します
下のサンプルコードの "named" という attribute を "name" に変更します。
ポップアップを表示すると、 "Dave" や "Angela" でフィルターできるようになっています。
-->
<people>
<person named="Dave" age="32" />
<person named="Angela" age="31" />
</people>
</people>
Loading