Is it expected that IntelliJ does not find source ...
# getting-started
j
Is it expected that IntelliJ does not find source code for all files for the Stdlib (
kotlin-stdlib-2.0.0.jar
). AFAICT the missing files only seem to contain private types/constants/etc. Using go-to-definition on a lot of stuff actually tries to go to these files which then load up as decompiled class files. If it is expected, is there a way to get the complete source code?
v
A jar with classes should never contain any sourcecode. Usually the sourcecode is in a separate jar and your IDE knows how / where to get it and displays the source from there if it is available
j
well idk where intellij is getting the source code from, i just want it to have the code for all the files Updated the post to clarify.
r
Intellij will look for the source code by fetching a sources artifact if one is available from where it fetched the dependency. You can see this information and change it for libraries in the Project Structure - https://www.jetbrains.com/help/idea/2024.1/library.html?reference.settingsdialog.project.structure.library. Info on artifact classifiers - https://www.baeldung.com/maven-artifact-classifiers