diff --git a/java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java b/java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java index a716235a36..ce00a8e6ff 100644 --- a/java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java +++ b/java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java @@ -40,12 +40,7 @@ public class IniFileModel { private String currentXBins; private final Map xBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); private final Map yBinsByZBins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - - public static void main(String[] args) { - IniFileModel iniFile = new IniFileModel(); - iniFile.findAndReadIniFile(INI_FILE_PATH); - log.info("Dialogs: " + iniFile.dialogs); - } + private IniFileMetaInfo metaInfo; private boolean isInSettingContextHelp = false; private boolean isInsidePageDefinition; @@ -55,6 +50,10 @@ public class IniFileModel { return readIniFile(fileName); } + public IniFileMetaInfo getMetaInfo() { + return metaInfo; + } + public IniFileModel readIniFile(String fileName) { File input = null; if (fileName != null) @@ -66,6 +65,7 @@ public class IniFileModel { log.info("Reading " + fileName); RawIniFile content = IniFileReader.read(input); + metaInfo = new IniFileMetaInfo(content); readIniFile(content); return this; diff --git a/java_console/inifile/src/test/java/com/opensr5/ini/IniFileModelSandbox.java b/java_console/inifile/src/test/java/com/opensr5/ini/IniFileModelSandbox.java new file mode 100644 index 0000000000..a3cb904d37 --- /dev/null +++ b/java_console/inifile/src/test/java/com/opensr5/ini/IniFileModelSandbox.java @@ -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()); + } +}