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 Ctrl+Shift+Arrow
Left or select Edit > Expands Selection To > Previous Element, which
will expand the selection with the statement (if any exists) that is immediately
before the selected statements.
Pressing Ctrl+Shift+Arrow Down or selecting Edit > Expands 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