How to jump to java source file from inside of xml file?

Hello. Is there any way to jump to java source file from inside of xml file by clicking on tag that is canonical class name? At this moment it does not work for me this way.
screenshot.png

Thanks in advance.

1 comment

IDEA will allow such in places where it knows the value it is dealing with is a class name. For example in web.xml and spring config files. For places where it does not, such as your example, you can do the following:

  1. Either:
    1. Place your cursor on the simple Classname and Type Ctrl+W once to select the class name
    2. Place your cursor anywhere in the fully qualified class name and type Ctrl+W twice to select the fully qualified classname
  2. Type Ctrl+N (Navigate to class)
    • The dialog will pre-populate with the class name selected
  3. Type enter or select the appropriate class and type enter.


If desired, you can record a macro (Edit > Macros) and map it to a short cut (File > Settings > [IDE Settings] > Keymap > [Macros]). If recording a macro, do the version which types Ctrl+W twice so it works regardless of where you are in the name (and it is more accurate since ti finds the fully qualified classname).

0

Please sign in to leave a comment.