To surround statements with an if / while / for statement or a block, select the lines to surround and press Ctrl+1 (Edit > Quick Fix). This lists all templates that contain the variable ${line_selection}.

Templates can be configured on Window > Preferences > Java > Editor > Templates. Edit the corresponding templates or define your own templates to customize the resulting code.