In eclipse you can click Ctrl+I at any line, and it\'ll automatically indent the line or group of lines according to the indentation scheme you chose i
Select the lines you want to reformat (indenting), then hit Alt+Shift+F. Only the selected lines will be reformatted.