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.

Vasanth Dharmaraj is a Java Architect currently working for Western Union living in the Bay Area. He is interested in programming, gadgets, formula one... You can follow him on Twitter.

Posted in Eclipse, Java, Software

Ads By Google