Struct array for outputs #4442

extra option might help
This commit is contained in:
rusefillc 2022-08-16 20:04:43 -04:00
parent 8d8b5e5fc4
commit 4593c96979
3 changed files with 12 additions and 2 deletions

View File

@ -2,7 +2,15 @@
rm gen_live_documentation.log
if [ -n "$1" ]; then
echo "With prepend $1"
EXTRA_PREPEND="-DUsagesReader.extra_prepend=$1"
else
fi
java -DSystemOut.name=logs/gen_live_documentation \
${EXTRA_PREPEND} \
-cp ../java_tools/ConfigDefinition.jar \
com.rusefi.ldmp.UsagesReader integration/LiveData.yaml
[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; }

Binary file not shown.

View File

@ -1,7 +1,6 @@
package com.rusefi.ldmp;
import com.devexperts.logging.Logging;
import com.rusefi.ConfigDefinition;
import com.rusefi.ReaderState;
import com.rusefi.output.*;
import org.yaml.snakeyaml.Yaml;
@ -12,7 +11,6 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class UsagesReader {
@ -33,6 +31,8 @@ public class UsagesReader {
private final StringBuilder fragmentsContent = new StringBuilder(header);
private final String extraPrepend = System.getProperty("UsagesReader.extra_prepend");
public static void main(String[] args) throws IOException {
if (args.length != 1) {
System.err.println("One parameter expected: name of live data yaml input file");
@ -97,6 +97,8 @@ public class UsagesReader {
FragmentDialogConsumer fragmentDialogConsumer = new FragmentDialogConsumer(name);
state.addDestination(fragmentDialogConsumer);
if (extraPrepend != null)
state.addPrepend(extraPrepend);
state.addPrepend(prepend);
state.addCHeaderDestination(folder + File.separator + name + "_generated.h");
state.addJavaDestination("../java_console/models/src/main/java/com/rusefi/config/generated/" + javaName);