2019-09-13 16:02:18 +03:00
|
|
|
## Mastering the IDE: Extend Selection
|
2019-07-15 17:01:04 +03:00
|
|
|
|
2019-10-23 11:44:48 +03:00
|
|
|
When you apply refactorings like <span class="control">`Extract Property`</span>,
|
|
|
|
you need to select the expression that you'd like to extract, which might be
|
2019-09-13 16:02:18 +03:00
|
|
|
quite complicated.
|
2019-07-15 17:01:04 +03:00
|
|
|
|
2019-09-13 16:02:18 +03:00
|
|
|
The <span class="control">`Extend Selection`</span> action accessible with the
|
|
|
|
<span class="shortcut">&shortcut:EditorSelectWord;</span> shortcut is very
|
|
|
|
helpful here: it selects the outside expression, increasing the selection by
|
|
|
|
each step. The reverse action is called
|
|
|
|
<span class="control">`Shrink selection`</span> and is accessible by
|
|
|
|
<span class="shortcut">&shortcut:EditorUnSelectWord;</span>.
|
2019-07-15 17:01:04 +03:00
|
|
|
|
2019-09-13 16:02:18 +03:00
|
|
|
Try putting the caret on line `println("Incorrect input: $x should be
|
|
|
|
positive")` and extend and shrink the selection to see how it works.
|
|
|
|
Continue to extend the selection until the whole file is selected.
|