Eclipse Tip: Structured Selections

Eclipse has a great set of keyboard shortcuts speed things up. Structured Selection shortcuts are a great way to select enclosing identifiers or adjacent statements.

Take the following example. When the cursor is on the variable aFile in the second if statement. Just press Alt+Shift+Arrow Up to quickly select the variable aFile. Press Alt+Shift+Arrow Up again to select aFile.exists(). Likewise the selection can be expanded to aFile.exists() && aFile.isFile() or the entire if statement.

Pressing Alt+Shift+Arrow Down reverses the cycle.