| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
The content for the reference lives inside /content/references. This folder has two subfolders, translations and examples:
This folder contains a separate folder for every language, with en being the default one. Each json file within the folders will be rendered as a web reference page.
Most of the files in the en folder should not be edited manually since they are auto-generated from Javadoc annotations in the Processing and core libraries source codes using the Doclet script. Web reference files within en that are created and edited manually generally fall into one of two categories:
The folder is divided into subfolders that correspond to each of the core libraries and a processing folder that contains the core processing reference.
Libraries DFX Export, PDF Export and SVG Export don't have individual references so their pages are created from Markdown files in content/pages/libraries. The intro blurbs to each of the core libraries are also found in this folder.
See the processing-doclet instructions on how to generate the json files after having made changes to the reference in any of the Java source files.
The doclet script converts the Javadoc annotations to a json file for every class, field or method annotated with a @webref tag. (Note: GitHub search only works for files smaller than 384 KB which means PApplet.java is NOT searchable using GitHub's code search feature.)
Unlike standard Javadoc (where every method signature gets its own documentation), all methods with the same name are pooled together into one reference page (even static and non-static methods of the same name only get one json file!). Only one of the overloaded methods needs to have a @webref tag. The @ annotations of all methods with the same name will be pooled together in one json file.
A typical Javadoc block will look like this:
/**
* This is a full length description of this method or field, and what it does. It can be as long or short as you want.
*
* Line breaks are <em>ignored</em>, so the first sentence and this one are displayed in the same paragraph. If you want to split the descriptions into paragraphs, use line break tags, like so:
* <br/><br/>
* It is not unusual for descriptions to have more than one paragraph, so go for it.
*
* <h3>Advanced</h>
* Advanced description
*
* @webref category:subcategory
* @webBrief This is a <em>short</em> description of the method that's shown on the reference index page, and also on the method listing of the class page if this is a class method.
* @param someArg the meaning or purpose of this method argument, allowed range etc.
* @param anotherArg same thing but for another argument
* @return <b>true</b> if one thing is the case, <b>false</b> otherwise
* @see AnotherClass#anotherField
* @see YetAnotherClass#anotherMethod()
* ...
*/
public boolean someMethod(int someArg, float anotherArg) {
...
For code-like (i.e. looking like this) styling, use <b></b> tags. For emphasis (currently rendered as italics) use <em></em>.
Javadoc tags such as @inheritDoc and @link are not currently supported.
This folder contains all the examples used inside the references. They are organized in the same folder structure as the translations folder. These folders contain all the .pde and .png files necessary for the examples. Each example image should have a size of 800x800px and should be named after the corresponding example, e.g. the bezier_0.pde example has an image named bezier_0.png.
The examples live inside the /content/references/examples/ folder. The main processing references are inside the folder processing and references for the libraries are in separate folders named as the library. For each reference (both for processing and libraries) there needs to be a folder, named exactly as the corresponding json file without the .json part (those files are in /content/references/translations/en/processing). The file should contain:
For re-scaling the images and updating the examples codes the workflow should be:
If you want to add a translation, copy the en folder, rename it to the language code1 and translate away. The individual files should also be renamed to include the code e.g. if the english reference file is bezier_.json, the german would be bezier_.de.json.
Translations of the .pde example files in the reference should be added next to the english version .pde files in content/references/examples.
| Back | FazBrowse Home | New Git URL |