diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index ff61096049..b3284edd41 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/com/rusefi/CHeaderConsumer.java b/java_tools/configuration_definition/src/com/rusefi/CHeaderConsumer.java index aeb850d840..375dd808b7 100644 --- a/java_tools/configuration_definition/src/com/rusefi/CHeaderConsumer.java +++ b/java_tools/configuration_definition/src/com/rusefi/CHeaderConsumer.java @@ -35,9 +35,4 @@ public class CHeaderConsumer implements ConfigurationConsumer { public void handleEndStruct(ConfigStructure structure) throws IOException { ConfigStructure.headerWrite(structure, cHeader); } - - @Override - public void onTotalEnd() { - - } } diff --git a/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java b/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java index 0d02fc6f1f..87450d6672 100644 --- a/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java +++ b/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java @@ -55,11 +55,10 @@ public class ConfigDefinition { ConfigurationConsumer cHeaderConsumer = new CHeaderConsumer(cHeader); ConfigurationConsumer tsProjectConsumer = new TSProjectConsumer(tsWriter, tsPath, state); - ConfigurationConsumer javaFieldsConcumer = new JavaFieldsConsumer(javaFieldsWriter, state); + ConfigurationConsumer javaFieldsConsumer = new JavaFieldsConsumer(javaFieldsWriter, state, javaConsolePath); - processFile(state, br, cHeaderConsumer, tsProjectConsumer, javaFieldsConcumer); + processFile(state, br, cHeaderConsumer, tsProjectConsumer, javaFieldsConsumer); - JavaFieldsConsumer.writeFields(javaConsolePath, javaFieldsWriter); TSProjectConsumer.writeTunerStudioFile(tsPath, tsWriter.toString()); @@ -136,6 +135,7 @@ public class ConfigDefinition { } } cHeaderConsumer.endFile(); + javaFieldsConcumer.endFile(); } private static void handleCustomLine(ReaderState state, String line) { diff --git a/java_tools/configuration_definition/src/com/rusefi/ConfigurationConsumer.java b/java_tools/configuration_definition/src/com/rusefi/ConfigurationConsumer.java index cc428771d3..a6b02ca29b 100644 --- a/java_tools/configuration_definition/src/com/rusefi/ConfigurationConsumer.java +++ b/java_tools/configuration_definition/src/com/rusefi/ConfigurationConsumer.java @@ -8,6 +8,4 @@ public interface ConfigurationConsumer { void endFile() throws IOException; void handleEndStruct(ConfigStructure structure) throws IOException; - - void onTotalEnd(); } diff --git a/java_tools/configuration_definition/src/com/rusefi/JavaFieldsConsumer.java b/java_tools/configuration_definition/src/com/rusefi/JavaFieldsConsumer.java index 2b348df369..7e701f3e03 100644 --- a/java_tools/configuration_definition/src/com/rusefi/JavaFieldsConsumer.java +++ b/java_tools/configuration_definition/src/com/rusefi/JavaFieldsConsumer.java @@ -7,13 +7,15 @@ public class JavaFieldsConsumer implements ConfigurationConsumer { private final CharArrayWriter javaFieldsWriter; private final ReaderState state; + private final String javaConsolePath; - public JavaFieldsConsumer(CharArrayWriter javaFieldsWriter, ReaderState state) { + public JavaFieldsConsumer(CharArrayWriter javaFieldsWriter, ReaderState state, String javaConsolePath) { this.javaFieldsWriter = javaFieldsWriter; this.state = state; + this.javaConsolePath = javaConsolePath; } - static void writeFields(String javaConsolePath, CharArrayWriter javaFieldsWriter) throws IOException { + private static void writeFields(String javaConsolePath, CharArrayWriter javaFieldsWriter) throws IOException { BufferedWriter javaFields = new BufferedWriter(new FileWriter(javaConsolePath + File.separator + FIELDS_JAVA)); javaFields.write("package com.rusefi.config;" + ConfigDefinition.EOL + ConfigDefinition.EOL); javaFields.write("// this file " + ConfigDefinition.MESSAGE + ConfigDefinition.EOL); @@ -31,7 +33,7 @@ public class JavaFieldsConsumer implements ConfigurationConsumer { @Override public void endFile() throws IOException { - + JavaFieldsConsumer.writeFields(javaConsolePath, javaFieldsWriter); } @Override @@ -40,9 +42,4 @@ public class JavaFieldsConsumer implements ConfigurationConsumer { structure.writeJavaFields(state,"", javaFieldsWriter, 0); } } - - @Override - public void onTotalEnd() { - - } } diff --git a/java_tools/configuration_definition/src/com/rusefi/TSProjectConsumer.java b/java_tools/configuration_definition/src/com/rusefi/TSProjectConsumer.java index 1d41f34a88..3140e6bb7d 100644 --- a/java_tools/configuration_definition/src/com/rusefi/TSProjectConsumer.java +++ b/java_tools/configuration_definition/src/com/rusefi/TSProjectConsumer.java @@ -89,9 +89,4 @@ public class TSProjectConsumer implements ConfigurationConsumer { // TSProjectConsumer.writeTunerStudioFile(tsPath, tsWriter.toString()); } } - - @Override - public void onTotalEnd() { - - } }