IntelliJ Navigation

I am using IntelliJ to develop Java for an application where we use JSF in multiple places. In the .jsp file I have defined my base class and the code is working correctly.
My question is how to set up my environment so that when clicking on method names that use EL format, IntelliJ navigates to the correct method in the corresponding class.

+2


source to share


2 answers


If you quickly browse my IntelliJ installation, if you go to File-> Preferences, there should be a keyboard layout section under the IDE Settings. Create a new keyboard layout profile other than the default. You can probably just copy the default and give it a new name. In the action window open Main Menu-> Go To and there should be an action called "Implementation (s)". The description of this action is similar to what you are looking for. Click "Add Mouse Shortcut" and click the center click to install it. I didn't want to change the settings so I didn't finish the steps myself, but this should do what you want to do. It might warn you that you are rewriting the shortcut for a different action, so keep that in mind.

Hope it helps.



This is using IntelliJ version 9 beta.

+1


source


in JSP I am using something like this

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

      

This is a comment for intellij I think. This way, when the owner variable is used anywhere:

${owner.name} 

      



it is known to be of the owner type. Intellij then automatically jumps to the class definition by pressing CTRL + B or middle mouse button.

This works with intellij idea 9 beta and I remember that this feature was broken in 8.1.1. It probably works again in 8.1.x

Probably the same approach will work for JSF as well.

+1


source







All Articles