You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Thomas Kellerer <sh...@gmx.net> on 2021/05/19 15:19:24 UTC

Gradle projects and attaching sources

Hello,

I am trying to attach the sources to one of the jar files used in my Gradle project.

When I right click on the "Configurations" node directly and choose "Download sources" some sources are downloaded others (the ones I need) are not.

Then I opened one of the classes I am interested in, and clicked on "Attach Sources", and selected the jar file with the sources manually.

However the "Select source" dialog doesn't list the jar file I just attached.

When I click on "Download sources" in that dialog, it downloads something and shows the source jar in the list (somewhere in Gradle's "cache" directory).

When I then close the dialog with OK, the editor still shows the "compiled sources" - it does not replace it with the just attached sources.
And it seems the previous step of downloading through the dialog didn't really work.
When I then click on "Attach sources" again, the file that was listed before disappeared.

There seems to be no way to properly attach sources to a jar file in a Gradle project. (It's a multi-module Gradle project if that makes a difference)

This is the same on 12.3 and 12.4-vc1

The reason I want to attach the sources is that I need to debug some code in there, but if I can't attach them, I can't set a breakpoint.

Any ideas?

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Gradle projects and attaching sources

Posted by Thomas Kellerer <sh...@gmx.net>.
Turns out the library in question is written in Kotlin which NetBeans apparently can't handle

Thomas


Thomas Kellerer schrieb am 19.05.2021 um 17:19:
> Hello,
>
> I am trying to attach the sources to one of the jar files used in my Gradle project.
>
> When I right click on the "Configurations" node directly and choose "Download sources" some sources are downloaded others (the ones I need) are not.
>
> Then I opened one of the classes I am interested in, and clicked on "Attach Sources", and selected the jar file with the sources manually.
>
> However the "Select source" dialog doesn't list the jar file I just attached.
>
> When I click on "Download sources" in that dialog, it downloads something and shows the source jar in the list (somewhere in Gradle's "cache" directory).
>
> When I then close the dialog with OK, the editor still shows the "compiled sources" - it does not replace it with the just attached sources.
> And it seems the previous step of downloading through the dialog didn't really work.
> When I then click on "Attach sources" again, the file that was listed before disappeared.
>
> There seems to be no way to properly attach sources to a jar file in a Gradle project. (It's a multi-module Gradle project if that makes a difference)
>
> This is the same on 12.3 and 12.4-vc1
>
> The reason I want to attach the sources is that I need to debug some code in there, but if I can't attach them, I can't set a breakpoint.
>
> Any ideas?
>
> Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists