Do you Google for Javadoc? Isn't it annoying? Picture this: you're in a flow state, with a full stack on your mind, and a good couple dozen business concepts thrown in, and you just want to double-check the behavior of a given library method. Do you really want to stop what you're doing, open a browser, search for the library documentation, make sure you are looking at the right version, and then navigate to the class and method in question?
You don't have to!
Here are two fast and easy ways to add Javadoc to IntelliJ so you can see it using the "Quick Documentation" feature: simply hover your mouse on any piece of code or use the Quick Documentation shortcut key, Ctrl+Q for Linux or Windows and F1 on macOS!
Now, on to the first way.
On Maven projects, run the
dependency:resolve
phase with
classifier=javadoc
and IntelliJ will automatically acquire documentation superpowers.
There are two ways to run this. First, you can run the following Maven command from the terminal inside the root directory for the project:
With Javadoc just a mouse-hover away, you can remain focused on the task at hand rather than disrupting your flow and going on a wild goose chase.
Photo by Miriam Espacio from Pexels
Built on
Forem
— the
open source
software that powers
DEV
and other inclusive communities.
Made with love and
Ruby on Rails
. DEV Community
©
2016 - 2024.