views:

348

answers:

4

I looked through this list of “Hidden” features/tricks for Eclipse?", but it doesn't have anything for web-developement (jsp). A very useful list of tricks for a general eclipse user!

I work with jsp pages in Eclipse Ganymede, and I would like to find out a list of shortcuts commonly used to facilitate development. I always seem to struggle with the following, among other issues:

  • always traverse a directory tree to find a file (no Ctrl-shift-t just like java classes)
  • search is always ends up with either ctrl-f or searching the entire project

I would appreciate if you guys list tricks for eclipse, specifically for web-development (jsp/tomcat)

I am a noob, so don't hesitate to list anything even if you think it is TOO NOOB!!!

Thanks

+2  A: 

First of all, be certain you use the JEE version of Eclipse.


Edit:

Use Ctrl-Shift-R to locate a given resource (also known as "file").

You can use F3 on java identifiers in <%...%> to go to their definition.

The best tip I can give you is to learn JSF or similar so your JSP files only contain tags, and not java snippets.

Thorbjørn Ravn Andersen
I am certain that I am using the version...thx
vehomzzz
+1  A: 

I use the MyEclipse plugin. I have been very happy with it and it has a lot of jsp support.

MyEclipse

Ben
+3  A: 

my favorite:

ctrl + shift + r will open a resource dialog like the type dialog

check this out (i have it taped to my wall):

http://rayfd.wordpress.com/2007/05/20/10-eclipse-navigation-shortcuts-every-java-programmer-should-know/

happytime harry
+1 great shortcuts..
vehomzzz
+1  A: 

Get the Web Tools Platform plugin. I think it's included by default in the Jave EE edition of Eclipse, but you can also install it separately. To see if it's installed in your Eclipse, open the Help|About screen and look for a "WTP" icon.

It doesn't provide any web-specific shortcuts, but it will give you syntax highlighting and some auto-completion for HTML and CSS files, and for JSP files, enable many of the navigation features that you're used to from Java editing. (Such as Ctrl+Space to import a class and F3 to see its definition.)

Regardless of whether you have WTP installed or not:

  • Use Ctrl+Shift+R to open files; this works much like Ctrl+Shift+T for opening classes.
  • Use Ctrl+H to search the whole of your project, or parts of it. If you pick the "File search" tab, you can specify file patterns (such as *.jsp) to search in. If you click on a folder in the Package Explorer, you can select "Selected resources" from the "Scope" box to search only in that folder (and its sub-folders).
jqno