Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[eclipse] shortcut to enclose block of code (like inteliJ)

 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does anyone know the shortcut? with InteliJ I select a block and with a command I can enclose that block with a switch, if, loop, you name it.
and if some of the methods throw an exception inteliJ automatically adds all check exceptions. sweet.
Any similarity with eclipse?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I remember correctly, quick fix (Ctrl-1) does the trick. Code Assist (Ctrl-Space) might also be worth a try. (It basically lists all templates containing a line-selection variable, so it's quite easy to extend. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=44806 )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic