Structured Selection lets you quickly select Java code in a syntax-aware way.
To use Structured Selection:
When a statement or a list of statements is selected, you can press Alt+Shift+Arrow Left or select Edit > Expand Selection To > Previous
Element, which will expand the selection with the statement (if any exists) that is immediately before the selected statements.
Pressing Alt+Shift+Arrow Down or selecting Edit > Expand Selection To > Restore Last Selection from the menu bar lets you restore the previous structured selection.
Using the Java editor
Using Surround with Try/Catch
Extracting a method
Extracting a local variable
Inlining a local variable
Replacing a local variable with a query