Keyboard shortcut to navigate to spring bean declaration in XML file

HI All,

Am wondering if it is possible to navigate to the spring bean declaration in the XML using a keyboard shortcut. Any pointers?

Thanks,
MM

7 comments
Comment actions Permalink

Click anywhere on the classname (class attribute in the bean declaration) and then press F4.

0
Comment actions Permalink

I am using a Mac and Ctrl-F12 does nothing. Apple-F12 however popups a window to navigate within the class. So, Ctrl-F12 works for you?

0
Comment actions Permalink

Thanks for the reply. Actually, I am trying to do the reverse. Navigating from class file to the XML declaration.

0
Comment actions Permalink

Not a problem - so you're trying to traverse from the Java class to the Spring bean declaration. Position your cursor at the end of the line where you have your class declaration in your java file e.g. public  class OrderValidator implements Validatorand then click alt-enter. Then select Navigate to the spring bean declaration in the popup that emerges. Make sure that your cursor is on the same line (preferably at the end of the line) as the class declaration before you do this. See attached screenshot. You didn't think that JetBrains would give us 95% of a well-thought Spring integration in IntelliJ - did you  ?


Please note that this discussion is specific to IntelliJ IDEA 8.x (Diana). I'm not sure if it works with IntelliJ IDEA 7.



Attachment(s):
Screenshot.png
0
Comment actions Permalink

I misunderstood, I thought you were asking about navigation within a
spring xml file.

For navigating from Java class to spring xml location(s), using
Alt-Enter to invoke the "navigate to spring beans(s)" intention is
indeed the way to go.

In some cases Ctrl-Alt-F7 would also be a solution.

-tt

0
Comment actions Permalink

Taras and Viraf, thank you very much. Alt-Enter and Ctrl-Alt-F7 both works fine. Great!! Thankyou.

0

Please sign in to leave a comment.