Console should get much smarter around compatibility with older units #6845

only:wow we have so much useful code
This commit is contained in:
rusefillc 2024-09-07 19:07:08 -04:00
parent dd335b4c5c
commit d5816e2236
2 changed files with 19 additions and 6 deletions

View File

@ -40,12 +40,7 @@ public class IniFileModel {
private String currentXBins; private String currentXBins;
private final Map<String, String> xBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); private final Map<String, String> xBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
private final Map<String, String> yBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); private final Map<String, String> yBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
private IniFileMetaInfo metaInfo;
public static void main(String[] args) {
IniFileModel iniFile = new IniFileModel();
iniFile.findAndReadIniFile(INI_FILE_PATH);
log.info("Dialogs: " + iniFile.dialogs);
}
private boolean isInSettingContextHelp = false; private boolean isInSettingContextHelp = false;
private boolean isInsidePageDefinition; private boolean isInsidePageDefinition;
@ -55,6 +50,10 @@ public class IniFileModel {
return readIniFile(fileName); return readIniFile(fileName);
} }
public IniFileMetaInfo getMetaInfo() {
return metaInfo;
}
public IniFileModel readIniFile(String fileName) { public IniFileModel readIniFile(String fileName) {
File input = null; File input = null;
if (fileName != null) if (fileName != null)
@ -66,6 +65,7 @@ public class IniFileModel {
log.info("Reading " + fileName); log.info("Reading " + fileName);
RawIniFile content = IniFileReader.read(input); RawIniFile content = IniFileReader.read(input);
metaInfo = new IniFileMetaInfo(content);
readIniFile(content); readIniFile(content);
return this; return this;

View File

@ -0,0 +1,13 @@
package com.opensr5.ini;
import com.devexperts.logging.Logging;
public class IniFileModelSandbox {
private static final Logging log = Logging.getLogging(IniFileModelSandbox.class);
public static void main(String[] args) {
IniFileModel iniFile = new IniFileModel();
iniFile.findAndReadIniFile(IniFileModel.INI_FILE_PATH);
log.info("Dialogs: " + iniFile.getDialogs());
}
}