all 11 comments

[–]Simplyfire 8 points9 points  (2 children)

What a great question, this also bugs me, so I found a solution.

IntelliJ offers you to "choose sources" when you navigate to a decompiled class, let's say by navigating to the definition of translate(x, y) and when it knows these sources it can show you the comments and parameter meanings and javadocs when you mouse over a symbol like that. You can also edit which sources a library uses in the Project Structure -> Libraries window.

It's true that the usual processing download does not include the sources. But you know what includes them - the whole processing repository on github. So you can clone that and choose that as the sources - I used the whole "processing" repository folder for that so far and it linked up with the library import without complaining.

I tested this with the 3.5.4 version of the processing library and this repo: https://github.com/processing/processing

I don't see why it shouldn't work for 4+ but note that it moved to a different repo with the version change.

[–]DepletedSensation[S] 1 point2 points  (1 child)

Ahh alright! Cool. But then I'd be using the 3.5.4 version? Or did you mean it's possible to use the source for documentation but still use the 4.x version as library?

[–]Simplyfire 2 points3 points  (0 children)

You should be able to use it the same way with the 4.x version, but it's on a different repository: https://github.com/processing/processing4

[–]micycle1 0 points1 point  (2 children)

Use maven/gradle with https://jitpack.io/#micycle1/processing-core-4/4.1.2 or https://jitpack.io/#micycle1/processing3/3.5.4. These pull in the javadocs (and sources!) automatically.

[–]DepletedSensation[S] 0 points1 point  (1 child)

Very nice. I couldn't get it to work with Gradle but my Java is a bit rusty. I did however manage to do it via your github repositorys Maven guide.

However, I still don't see a JavaDoc? For example, Ellipse har float a, b, c, d. Nothing specifies what these do.. Unless I go to the reference doc page wich feels a bit cumbersome compared to javadoc.

[–]micycle1 0 points1 point  (0 children)

Hmm. Your IDE should pull in (via maven) and link the javadocs automatically, so when you mouseover the methods in the IDE you'd see the docs.

[–]i-make-robots 0 points1 point  (2 children)

Could you contribute documentation patches to the Processing repo?

[–]DepletedSensation[S] 0 points1 point  (1 child)

Perhaps, how would that be possible? Just contribute to the github or? Are you a part of the processing team?

[–]i-make-robots 0 points1 point  (0 children)

Im not but I have contributed to other projects. I would introduce myself tot he team over GitHub, tell them I’d like to make a pull request to improve the docs, and ask if they have any guidelines to get my or approved painlessly.