We have to move either forward or backwards with newparse #4441
a step back anticipating changes
This commit is contained in:
parent
537a073e04
commit
e0172a170d
Binary file not shown.
|
@ -3,10 +3,6 @@ package com.rusefi.ldmp;
|
||||||
import com.devexperts.logging.Logging;
|
import com.devexperts.logging.Logging;
|
||||||
import com.rusefi.ConfigDefinition;
|
import com.rusefi.ConfigDefinition;
|
||||||
import com.rusefi.ReaderState;
|
import com.rusefi.ReaderState;
|
||||||
import com.rusefi.RusefiParseErrorStrategy;
|
|
||||||
import com.rusefi.newparse.ParseState;
|
|
||||||
import com.rusefi.newparse.outputs.OutputChannelWriter;
|
|
||||||
import com.rusefi.newparse.parsing.Definition;
|
|
||||||
import com.rusefi.output.*;
|
import com.rusefi.output.*;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
|
|
||||||
|
@ -78,7 +74,7 @@ public class UsagesReader {
|
||||||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
||||||
String tsOutputsDestination = "console/binary/";
|
String tsOutputsDestination = "console/binary/";
|
||||||
|
|
||||||
OutputChannelWriter outputChannelWriter = new OutputChannelWriter(tsOutputsDestination + File.separator + "generated/output_channels.ini");
|
ConfigurationConsumer outputsSections = new OutputsSectionConsumer(tsOutputsDestination + File.separator + "generated/output_channels.ini");
|
||||||
|
|
||||||
ConfigurationConsumer dataLogConsumer = new DataLogConsumer(tsOutputsDestination + File.separator + "generated/data_logs.ini");
|
ConfigurationConsumer dataLogConsumer = new DataLogConsumer(tsOutputsDestination + File.separator + "generated/data_logs.ini");
|
||||||
|
|
||||||
|
@ -91,11 +87,11 @@ public class UsagesReader {
|
||||||
log.info("Starting " + name + " at " + startingPosition);
|
log.info("Starting " + name + " at " + startingPosition);
|
||||||
|
|
||||||
ReaderState state = new ReaderState();
|
ReaderState state = new ReaderState();
|
||||||
String definitionInputFile = folder + File.separator + name + ".txt";
|
state.setDefinitionInputFile(folder + File.separator + name + ".txt");
|
||||||
state.setDefinitionInputFile(definitionInputFile);
|
|
||||||
state.withC_Defines = withCDefines;
|
state.withC_Defines = withCDefines;
|
||||||
|
|
||||||
state.addDestination(javaSensorsConsumer,
|
state.addDestination(javaSensorsConsumer,
|
||||||
|
outputsSections,
|
||||||
dataLogConsumer
|
dataLogConsumer
|
||||||
);
|
);
|
||||||
FragmentDialogConsumer fragmentDialogConsumer = new FragmentDialogConsumer(name);
|
FragmentDialogConsumer fragmentDialogConsumer = new FragmentDialogConsumer(name);
|
||||||
|
@ -106,26 +102,6 @@ public class UsagesReader {
|
||||||
state.addJavaDestination("../java_console/models/src/main/java/com/rusefi/config/generated/" + javaName);
|
state.addJavaDestination("../java_console/models/src/main/java/com/rusefi/config/generated/" + javaName);
|
||||||
state.doJob();
|
state.doJob();
|
||||||
|
|
||||||
{
|
|
||||||
ParseState parseState = new ParseState(state.enumsReader);
|
|
||||||
|
|
||||||
parseState.setDefinitionPolicy(Definition.OverwritePolicy.NotAllowed);
|
|
||||||
|
|
||||||
if (prepend != null && !prepend.isEmpty()) {
|
|
||||||
RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), prepend);
|
|
||||||
}
|
|
||||||
|
|
||||||
RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), definitionInputFile);
|
|
||||||
|
|
||||||
// if (outputNames.length == 0) {
|
|
||||||
outputChannelWriter.writeOutputChannels(parseState, null);
|
|
||||||
// } else {
|
|
||||||
// for (int i = 0; i < outputNames.length; i++) {
|
|
||||||
// outputChannelWriter.writeOutputChannels(parseState, outputNames[i]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
fancyNewStuff.append(fragmentDialogConsumer.getContent());
|
fancyNewStuff.append(fragmentDialogConsumer.getContent());
|
||||||
|
|
||||||
fancyNewMenu.append(fragmentDialogConsumer.menuLine());
|
fancyNewMenu.append(fragmentDialogConsumer.menuLine());
|
||||||
|
|
Loading…
Reference in New Issue