1
1
Fork 0
AtomicKotlinCourse/Introduction to Objects/Constraining Visibility/Exercise 4/task.md

16 lines
826 B
Markdown
Raw Normal View History

2019-09-13 16:02:18 +03:00
## Mastering the IDE: Extend Selection
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-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-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.