1

I have imported a maven project through SVN in my organization. I am not able to see JavaDocs on hovering over any class, method neither is the class or method highlighting so that I can go into the respective implementation. Also, I cannot see javadocs even for core java classes. Whenever, I press Shift + F2, I get error saying, "The resource is not on the build path of a Java Project." I have tried the different answers on this forum and others as well. None seems to work. Can anyone help regarding this solution?

UPDATE: Just to add, open call hierarchy is also not working.

sds
  • 23
  • 5
  • Have you tried right click on project -> Maven -> Download Java Doc ? – Pankaj Oct 25 '18 at 04:22
  • Yes. Didn't work with that. – sds Oct 25 '18 at 04:24
  • If your Maven project has modules, Eclipse will show you a project for the parent project, and a project for each of the modules. But the files in the parent project will not be "seen" as Java files, since the parent project is just a container for all the modules in it. You would have to open the same file in the appropriate module project - those will be seen as Java files. – moilejter Oct 25 '18 at 04:28
  • Right. This works. I just posted this from a separate answer from a different question – sds Oct 25 '18 at 04:33

1 Answers1

0

Finding a solution for this, I stumbled upon this which solved the problem for me: Make sure you are not editing the file in maven parent project. https://stackoverflow.com/a/7415743/3662041

I don't have enough points to upvote the above answer. Whoever checks this answer, please upvote the answer mentioned in the link.

sds
  • 23
  • 5