intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Download intellij platform sources does nothing

Open jonathanlermitage opened this issue 1 year ago • 9 comments

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

jonathanlermitage avatar Aug 27 '24 11:08 jonathanlermitage

Thanks for reporting.

Which IntelliJ Platform do you target? What happens if you manually trigger the Gradle project refresh after downloading sources?

hsz avatar Sep 02 '24 14:09 hsz

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.

jonathanlermitage avatar Sep 03 '24 00:09 jonathanlermitage

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

hsz avatar Sep 03 '24 15:09 hsz

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.

jonathanlermitage avatar Sep 24 '24 20:09 jonathanlermitage

I struggled with the same issue and I was able to solve this by enabling the following setting. Intellij-Download-Sources

IsaacHayes1995 avatar Oct 23 '24 23:10 IsaacHayes1995

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'

PHPirates avatar Jan 14 '25 07:01 PHPirates

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

tamj0rd2 avatar Feb 22 '25 13:02 tamj0rd2

I'm targeting IU 2024.3, I found a way working for me.

  1. Invalidate caches & restart
  2. 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".
  3. Now I can click 'open source file'

binfeiruci avatar Mar 11 '25 06:03 binfeiruci

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...

chylex avatar Mar 25 '25 14:03 chylex