@@ -7,9 +7,44 @@ it doesn't work with the popups in common IDE's and isn't as searchable.
77Gist makes source embedding trivial since you can embed a single sample in multiple methods/classes and manage the sample
88itself in a centeral location.
99
10- The JavaDoc source embed tool allows you to use gist embeds directly in your javadoc without any change! When you want to
11- generate local JavaDoc for use in the IDE it queries github for the gist contents and embeds it as a ` <noscript> `
12- alternative right into the code.
10+ With this tool you can get JavaDoc that looks like this: https://www.codenameone.com/javadoc/com/codename1/location/LocationManager.html
11+
12+ With JavaScript enabled you see this:
13+
14+ ![ With JavaScript] ( with-javascipt-gist.png )
15+
16+ Without JavaScript (or in IDE/search engine) you will see this:
17+
18+ ![ Without JavaScript] ( without-javascript-gist.png )
19+
20+
21+ The JavaDoc source embed tool allows you to use gist embeds directly in your javadoc without any change! When you
22+ generate JavaDoc it queries github for the gist contents and embeds it as a ` <noscript> `
23+ alternative right into the code. This means IDE code completion will "just work" as it will have a sensible fallback.
1324
1425Just pass the source directory and an output directory to the jar file and then generate the javadoc based on the output
1526directory.
27+
28+ E.g:
29+
30+ ``` bash
31+ rm -Rf dist/javadoc
32+ rm -Rf build/tempJavaSources
33+ java -jar JavaDocSourceEmbed-1.0-SNAPSHOT.jar pathToSrcDir/src build/tempJavaSources
34+
35+ javadoc -protected -d dist/javadoc -windowtitle " Codename One API" build/tempJavaSources
36+ ```
37+
38+ Or using ant you can do something like:
39+
40+ ``` xml
41+ <delete dir =" temp/javadocsources" />
42+ <java fork =" true" jar =" JavaDocSourceEmbed-1.0-SNAPSHOT.jar" >
43+ <arg file =" src" />
44+ <arg file =" temp/javadocsources" />
45+ </java >
46+ <javadoc author =" Me Me Me Me" protected =" true" windowtitle =" My Great New API" destdir =" javadoc" >
47+ <packageset dir =" temp/javadocsources" >
48+ </packageset >
49+ </javadoc >
50+ ```
0 commit comments