I am using same version of IntelliJ IDEA (2016.3.5) on Windows and Linux. The problem is that on Linux IntelliJ IDEA doesn't show java documentation after clicking "Ctrl" + left mouse button , but it shows decompiled .class file. It's not big problem but it's annoying. What may be wrong? I tried to restore default settings but it didn't help.
-
You are using the wrong action, probably because of the different keymap or the quick documentation settings. Please [refer to this answer](http://stackoverflow.com/a/11053374/104891). – CrazyCoder Mar 10 '17 at 09:52
1 Answers
You're not showing docs, you're drilling down into the implementation of a library method. You haven't attached the sources for the library, so the ide has no choice but to decompile the code in order to let you see the method you're trying to reach. If you're using maven you can download the sources and then when you drill down you'll see real code. Restoring default settings won't help, because this is how its meant to work.
Further; when IntelliJ shows documentation (ctrl-q on my machine) it tries to build the javadocs directly from the source, not from the published javadocs which it ignores. This is another reason to download the sources along with your libs.
BTW: When you 'release' your own libs to your corporate repo you should be building and releasing sources too, so that the users of your libs get the ability to drill down into the implementation, and so that they get access to your api's javadocs.

- 15,457
- 7
- 74
- 102
-
Thank you very much. The problem was connected with project SDK. I was using something called defualt-java , after I installed java-8 like this : https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04 problem disappeared – tomo_s Mar 10 '17 at 15:50
-
what if you're not using maven? this answer isn't very specific. it's clear why intellij is drilling down into the decompiled code but not clear on how to fix it. – fIwJlxSzApHEZIl Feb 15 '18 at 21:12
-
Seriously though, unless you're doing something seriously weird you should be using maven. Gradle, like Ant before it, is fundamentally flawed in its approach to building java things. It's true that maven can't do everything, and sometimes you really do need Gradle, and it's great that there's a purpose built modern tool available to help you out. But maven is the simplest answer for the vast majority of java projects. It's not perfect, but it's declarative and very well supported by a massive community, and, almost every java developer already knows it pretty well. – Software Engineer Feb 16 '18 at 22:56