template substitution for tsInfo part of the definition

This commit is contained in:
rusefi 2019-06-11 21:43:46 -04:00
parent 5f0000edc1
commit 6b7baaaecc
3 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -59,7 +59,7 @@ public class ConfigField {
this.type = type;
this.arraySizeVariableName = arraySizeAsText;
this.arraySize = arraySize;
this.tsInfo = tsInfo;
this.tsInfo = VariableRegistry.INSTANCE.applyVariables(tsInfo);
this.isIterate = isIterate;
}

View File

@ -32,6 +32,8 @@ public class VariableRegistry extends TreeMap<String, String> {
* @return string with variable values inlined
*/
public String applyVariables(String line) {
if (line == null)
return null;
Matcher m;
while ((m = VAR.matcher(line)).find()) {
String key = m.group(2);