views:

156

answers:

2

I'm using IntelliJ to do Java Development for an application where we use JSF in a few places. In the .jsp file I have defined my backing class and the code runs properly.
My question is: How do I set up my environment so that when I center click on the method names, which use EL format, IntelliJ navigates to the proper method in the proper class.

A: 

Having taken a quick look at my IntelliJ install, if you go to File->Settings, there should be a keymap section under the IDE Settings header. Make a new keymap profile other than default. You can probably just copy the default and give it a new name. In the actions window, open Main Menu->Go To and there should be an action called "Implementation(s)". The description of this action seems to match what you are looking for. Click Add Mouse Shortcut, and center click in the click pad area to set it. I didn't want to actually change my settings, so I didn't finish the steps myself, but this should do what you are wanting to do. It may warn you that you are overwriting a shortcut to another action, so be aware of that.

Hope this helps.

This is using IntelliJ Version 9 beta.

FModa3
+1  A: 

Hi,

in JSP I am using something like this

<%--@elvariable id="owner" type="com.mysite.data.Owner"--%>

This is a comment specific for intellij I guess. In this way when the owner variable is used anywhere like:

${owner.name}

is known to intellij that is of a Owner type. Intellij then automatically go to the class definition by pressing CTRL+B or middle mouse button.

This is working with intellij idea 9 beta and I remember that this feature was broken in 8.1.1. Prob it is working again in 8.1.x

Probably the same approch will also work for JSF.

dawez