Which is why it works in IDEA (since it knows everything about the sources) but I’m surprised to hear gradle or maven might have that too. I’m suspecting either they use their PSI API outside of IDEA or they just make simplifying assumptions like: compile all .java first, hope it works