bringing up to date with master

This commit is contained in:
Rune Madsen
2021-06-15 10:48:54 +02:00
55 changed files with 1334 additions and 1155 deletions
@@ -11,8 +11,8 @@ REFERENCES_OUT_PATH=../../../processing-website/content/references/translations/
echo "[REFERENCE GENERATOR] Source Path :: $PROCESSING_SRC_PATH"
echo "[REFERENCE GENERATOR] Library Path :: $PROCESSING_LIB_PATH"
#you can pass one argument "sound" or "video" to generate those libraries separately
#if there is no argument it will generate everything
# You can pass one argument "sound" or "video" to generate those libraries separately
# if there is no argument it will generate everything
if [ $# -eq 0 ]
then
echo "No arguments supplied, generating everything"
@@ -34,7 +34,7 @@ if [ $# -eq 0 ]
$PROCESSING_LIB_PATH/serial/src/processing/serial/*.java \
$PROCESSING_LIB_PATH/../../../processing-video/src/processing/video/*.java \
$PROCESSING_LIB_PATH/../../../processing-sound/src/processing/sound/*.java"
elif [ $1 = "processing" ]
elif [ $1 = "processing" ]
then
echo "Generating processing references"
echo "[REFERENCE GENERATOR] Removing previous version of the ref..."
@@ -53,7 +53,7 @@ if [ $# -eq 0 ]
$PROCESSING_LIB_PATH/io/src/processing/io/*.java \
$PROCESSING_LIB_PATH/net/src/processing/net/*.java \
$PROCESSING_LIB_PATH/serial/src/processing/serial/*.java"
else
else
echo "Generating $1 library"
echo "[REFERENCE GENERATOR] Removing previous version of the ref..."
rm -rf $REFERENCES_OUT_PATH/$1
@@ -73,4 +73,4 @@ javadoc -doclet ProcessingWeblet \
-imagedir images \
-encoding UTF-8 \
$FOLDERS \
-noisy
-noisy
@@ -137,6 +137,9 @@ public class ClassWriter extends BaseWriter {
{
constructor = constructor.substring(0, constructor.length()-2) + ")";
}
else {
constructor += ")";
}
constructors.add(constructor);
}
return constructors;
@@ -22,16 +22,22 @@ public class FieldWriter extends BaseWriter {
public static void write(HashMap<String, String> vars, FieldDoc doc, String classname) throws IOException
{
String filename = getAnchor(doc);
TemplateWriter templateWriter = new TemplateWriter();
JSONObject fieldJSON = new JSONObject();
String fieldName;
if (getName(doc).contains("[]")) {
fieldName = getName(doc).replace("[]", "");
} else {
fieldName = getName(doc);
}
String fileName;
if (classname != "") {
fileName = jsonDir + classname + "_" + getName(doc) + ".json";
fileName = jsonDir + classname + "_" + fieldName + ".json";
} else {
fileName = jsonDir + getName(doc) + ".json";
fileName = jsonDir + fieldName + ".json";
}
Tag[] tags = doc.tags(Shared.i().getWebrefTagName());
@@ -40,7 +46,6 @@ public class FieldWriter extends BaseWriter {
try
{
fieldJSON.put("type", "field");
fieldJSON.put("description", getWebDescriptionFromSource(doc));
fieldJSON.put("brief", getWebBriefFromSource(doc));
fieldJSON.put("category", category);
@@ -49,8 +54,9 @@ public class FieldWriter extends BaseWriter {
fieldJSON.put("related", getRelated(doc));
if(Shared.i().isRootLevel(doc.containingClass())){
fieldJSON.put("classname", "");
fieldJSON.put("type", "other");
} else {
fieldJSON.put("type", "field");
fieldJSON.put("classanchor", getLocalAnchor(doc.containingClass()));
fieldJSON.put("parameters", getParentParam(doc));
String syntax = templateWriter.writePartial("field.syntax.partial", getSyntax(doc));