refactoring
This commit is contained in:
parent
88c11cadb0
commit
b3d3a2ee9c
|
@ -123,10 +123,10 @@ public class ConfigDefinition {
|
|||
} catch (RuntimeException e) {
|
||||
throw new IllegalStateException("While processing " + fileName, e);
|
||||
}
|
||||
state.inputFiles.add(fileName);
|
||||
state.addInputFile(fileName);
|
||||
case KEY_FIRING:
|
||||
firingEnumFileName = args[i + 1];
|
||||
state.inputFiles.add(firingEnumFileName);
|
||||
state.addInputFile(firingEnumFileName);
|
||||
break;
|
||||
case "-triggerInputFolder":
|
||||
triggersInputFolder = args[i + 1];
|
||||
|
@ -151,15 +151,17 @@ public class ConfigDefinition {
|
|||
case KEY_BOARD_NAME:
|
||||
String boardName = args[i + 1];
|
||||
pinoutLogic = PinoutLogic.create(boardName, PinoutLogic.CONFIG_BOARDS);
|
||||
if (pinoutLogic != null)
|
||||
state.inputFiles.addAll(pinoutLogic.getInputFiles());
|
||||
if (pinoutLogic != null) {
|
||||
for (String inputFile : pinoutLogic.getInputFiles())
|
||||
state.addInputFile(inputFile);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (tsInputFileFolder != null) {
|
||||
// used to update .ini files
|
||||
state.inputFiles.add(TSProjectConsumer.getTsFileInputName(tsInputFileFolder));
|
||||
state.addInputFile(TSProjectConsumer.getTsFileInputName(tsInputFileFolder));
|
||||
}
|
||||
|
||||
if (!enumInputFiles.isEmpty()) {
|
||||
|
@ -172,7 +174,7 @@ public class ConfigDefinition {
|
|||
|
||||
ParseState parseState = new ParseState(state.enumsReader);
|
||||
// Add the variable for the config signature
|
||||
FirmwareVersion uniqueId = new FirmwareVersion(IoUtil2.getCrc32(state.inputFiles));
|
||||
FirmwareVersion uniqueId = new FirmwareVersion(IoUtil2.getCrc32(state.getInputFiles()));
|
||||
SignatureConsumer.storeUniqueBuildId(state, parseState, tsInputFileFolder, uniqueId);
|
||||
|
||||
ExtraUtil.handleFiringOrder(firingEnumFileName, state.variableRegistry, parseState);
|
||||
|
|
|
@ -25,7 +25,7 @@ import static com.rusefi.output.JavaSensorsConsumer.quote;
|
|||
*/
|
||||
public class ReaderState {
|
||||
// used to update other files
|
||||
public List<String> inputFiles = new ArrayList<>();
|
||||
private List<String> inputFiles = new ArrayList<>();
|
||||
|
||||
private static final Logging log = getLogging(ReaderState.class);
|
||||
|
||||
|
@ -53,6 +53,10 @@ public class ReaderState {
|
|||
this.withC_Defines = withC_Defines;
|
||||
}
|
||||
|
||||
public List<String> getInputFiles() {
|
||||
return inputFiles;
|
||||
}
|
||||
|
||||
private static void handleBitLine(ReaderState state, String line) {
|
||||
line = line.substring(BIT.length() + 1).trim();
|
||||
|
||||
|
@ -362,4 +366,8 @@ public class ReaderState {
|
|||
public void addDestination(ConfigurationConsumer... consumers) {
|
||||
destinations.addAll(Arrays.asList(consumers));
|
||||
}
|
||||
|
||||
public void addInputFile(String fileName) {
|
||||
inputFiles.add(fileName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue