aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes [eclipse] shortcut to enclose block of code (like inteliJ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "[eclipse] shortcut to enclose block of code (like inteliJ)" Watch "[eclipse] shortcut to enclose block of code (like inteliJ)" New topic
Author

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

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
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?


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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 )


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
 
subject: [eclipse] shortcut to enclose block of code (like inteliJ)