only:Split ConfigGenerator around trigger_defines.txt #5051

This commit is contained in:
Andrey 2023-06-17 22:11:51 -04:00
parent 346a704935
commit d4588d91e8
11 changed files with 4 additions and 10 deletions

View File

@ -6,6 +6,5 @@ apply from: '../../java_tools/dependencies.gradle'
dependencies { dependencies {
api project(':inifile') api project(':inifile')
api global_libs.snakeyaml
api project(':enum_to_string') api project(':enum_to_string')
} }

View File

@ -16,7 +16,6 @@ import java.util.*;
import static com.devexperts.logging.Logging.getLogging; import static com.devexperts.logging.Logging.getLogging;
import static com.rusefi.ConfigFieldImpl.BOOLEAN_T; import static com.rusefi.ConfigFieldImpl.BOOLEAN_T;
import static com.rusefi.VariableRegistry.unquote; import static com.rusefi.VariableRegistry.unquote;
import static com.rusefi.output.JavaSensorsConsumer.quote;
/** /**
* We keep state here as we read configuration definition * We keep state here as we read configuration definition
@ -343,7 +342,7 @@ public class ReaderStateImpl implements ReaderState {
private static String getCommentWithIndex(ConfigFieldImpl cf, int i) { private static String getCommentWithIndex(ConfigFieldImpl cf, int i) {
String unquoted = unquote(cf.getCommentOrName()); String unquoted = unquote(cf.getCommentOrName());
String string = unquoted + " " + i; String string = unquoted + " " + i;
return quote(string); return VariableRegistry.quote(string);
} }
@Override @Override

View File

@ -114,7 +114,7 @@ public class ConfigStructureImpl implements ConfigStructure {
return tsFieldsMap.get(name); return tsFieldsMap.get(name);
} }
public void addBitPadding(ReaderStateImpl readerState) { public void addBitPadding(ReaderState readerState) {
if (readingBitState.get() == 0) if (readingBitState.get() == 0)
return; return;
int sizeAtStartOfPadding = cFields.size(); int sizeAtStartOfPadding = cFields.size();

View File

@ -3,6 +3,7 @@ package com.rusefi.output;
import com.rusefi.ConfigField; import com.rusefi.ConfigField;
import com.rusefi.ConfigFieldImpl; import com.rusefi.ConfigFieldImpl;
import com.rusefi.ReaderState; import com.rusefi.ReaderState;
import com.rusefi.VariableRegistry;
import com.rusefi.parse.TypesHelper; import com.rusefi.parse.TypesHelper;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -12,7 +13,6 @@ import java.io.IOException;
import java.util.TreeSet; import java.util.TreeSet;
import static com.rusefi.VariableRegistry.unquote; import static com.rusefi.VariableRegistry.unquote;
import static org.abego.treelayout.internal.util.java.lang.string.StringUtil.quote;
/** /**
* here we generate [Datalog] section of TS .ini file * here we generate [Datalog] section of TS .ini file
@ -99,7 +99,7 @@ public class DataLogConsumer implements ConfigurationConsumer {
throw new IllegalStateException("[" + comment + "] is too long for log files at " + comment.length()); throw new IllegalStateException("[" + comment + "] is too long for log files at " + comment.length());
if (comment.charAt(0) != '"') if (comment.charAt(0) != '"')
comment = quote(comment); comment = VariableRegistry.quote(comment);
return comment; return comment;
} }

View File

@ -1,7 +1,5 @@
package com.rusefi.output; package com.rusefi.output;
import com.rusefi.core.SensorCategory;
import com.rusefi.ConfigField; import com.rusefi.ConfigField;
import com.rusefi.ReaderState; import com.rusefi.ReaderState;

View File

@ -1,7 +1,5 @@
package com.rusefi.output.variables; package com.rusefi.output.variables;
import com.rusefi.core.Pair;
public class VariableRecord { public class VariableRecord {
public final String type; public final String type;
private final String humanName; private final String humanName;