Eric
Eric

Reputation: 24984

IDEA decompile instead of download source code from maven when click into source code

In Eclipse, when ctrl + left click into a type of 3rd party library from maven repository, it will download the source code jar automatically, then show the source code of that type.

But, it seems IDEA (2018 version) simply decompile the .class files, and show the result, without downloading the source code.

The question is:

Upvotes: 2

Views: 696

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 402433

IntelliJ IDEA has an option to download the sources automatically:

download sources

If you enable it in the existing project, you will need to Reimport in the Maven tool window to get the sources downloaded, or use the button to forcibly download the sources:

Reimport

Download

Yet another option is to Download sources or specify the sources location manually via the panel at the top of the decompiled file in the editor:

Download sources

Upvotes: 2

Related Questions