intellij-platform-gradle-plugin
intellij-platform-gradle-plugin copied to clipboard
Download intellij platform sources does nothing
What happened?
I opened the com.intellij.openapi.application.ModalityState class, and I asked to download intellij platform sources in order to see the ModalityState.java sources. I see progress bar saying it's downloading sources, then nothing happen. I still see the "Download intellij platform sources" button, and I don't see the ModalityState.java sources.
Please see uploaded logs and video: Upload id: 2024_08_27_jBSbyVSkvqo9xAgEWYB6Cr (files: 2024-08-27 13-36-35.mkv and 2 more)
Relevant log output or stack trace
No response
Steps to reproduce
try to open ModalityState and download sources
Gradle IntelliJ Plugin version
2.0.1
Gradle version
8.10
Operating System
Windows
Link to build, i.e. failing GitHub Action job
No response
Thanks for reporting.
Which IntelliJ Platform do you target? What happens if you manually trigger the Gradle project refresh after downloading sources?
I'm targeting IC 2024.2.1.
I can see sources if I trigger the Gradle project refresh after downloading sources. I have to do this in all my projects.
Thanks for confirming. This is a problem that should be somehow addressed within the DevKit plugin inside the IntelliJ IDEA.
Related issue: https://youtrack.jetbrains.com/issue/IJPL-158473/Support-more-cases-of-attaching-IntelliJ-Platform-sources-by-DevKit-plugin
Just for info, with IJ 2024.2.2 Ult, Plugin DevKit 242.22855.74, Gradle 8.10.2 and org.jetbrains.intellij.platform 2.0.1, I had to download platform sources + reload Gradle project twice. So, even this workaround sometimes fails.
I struggled with the same issue and I was able to solve this by enabling the following setting.
For me, an extra Gradle sync does not work on Linux (it works fine on Windows), but the following process seems to do it:
- Click 'Download sources' after opening a class file
- Sync Gradle project
- Invalidate caches & restart
- Sync Gradle project (twice?)
- Open class file and select 'Download sources' again
- Now I can click 'open source file'
Which IntelliJ Platform do you target? What happens if you manually trigger the Gradle project refresh after downloading sources?
I'm targeting IU 2024.3.3. Triggering the gradle project refresh after downloading the sources doesn't do anything for me. These steps also didn't work
I'm targeting IU 2024.3, I found a way working for me.
- Invalidate caches & restart
- Choose sources, the path is like
~/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIU/2024.3/121370e6540ab51077c63628fdddfd60741455eb/ideaIU-2024.3-sources.jar. You can get the path in the Run tool window output after click "download intellij platform sources". - Now I can click 'open source file'
Targeting IC 2024.3 in a fork of IdeaVim, it doesn't work for me even if I manually find the sources jar...
I don't know if it's caused by the awful decision to make IntelliJ no longer download sources by default, or some bug in the gradle plugin, but the fact I can't even tell between the two is unbelievably frustrating. I already have "Download sources" enabled in the "Advanced Settings", because wanting a functioning IDE is an "advanced" feature apparently. It doesn't even work.
2+ years ago this basic plugin development feature worked fine, at least when targeting IC. Now it's constantly broken.
EDIT: Changing the target to from 2024.3 to 2024.3.3 made it work, so the sources for 2024.3 are just broken I guess...