I’m trying to generate a structured overview of my code in Processing (similar to a JavaDoc I believe). I added some doc comments, after which I do: ‘file --> export application --> windows’, from the PDE. According to this reference:
This should then create an index.html file, with the comments in it. This is the file I use to test with:
void setup(){
size(100,100);
}
void draw(){
exit();
}
/**
This is a description for function T1
@param t temperature
@param tp previous temperature
*/
float calculateT1 (float t, float tp){
return t + tp;
}
However, the index.html file is not generated. Am I missing something here? Thanks in advance.
Match the linux32 part with whatever folder it was created when exporting. That creates a docs/ folder with the documentation coming from the javadoc annotations.
Idea and other IDEs have integrated javadoc I think, so no need for command line work.
Thank you @hamoid for your quick response. Unfortunately, this does not work for me. I’m on Windows 10, installed Java and added the JAVA_HOME system variable to my path (am I missing any other?). I get the following error:
javadoc : The term 'javadoc' is not recognized as the name of a cmdlet, function, script file, or operable program. Che
ck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ javadoc -d docs ./application.windows64/source/*java
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (javadoc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What else can I try? Also, I did not understand the difference between Java jre and jdk? Thanks in advance
I downloaded doxygen from here: http://www.doxygen.nl/download.html
Everything was straightforward from there on.
Strange that this functionality is not included in the Processing IDE
As per the issue, it looks like that documentation was long out of date – creating a documentation index.html hasn’t been a PDE feature for a long time:
that dates back to applet export. It should just be removed
I submitted a pull request to fix it up with mention of javadoc, Doxygen, and IDEs as alternatives.