Closedown
This commit is contained in:
@@ -286,6 +286,7 @@ public class TestingList extends Panel {
|
||||
public static Path TESTS_DEVICES_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "devices");
|
||||
public static Path TESTS_TESTS_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "tests");
|
||||
public static Path TESTS_CONFIG_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "config");
|
||||
public static Path TESTS_PROPERTIES_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "tests.properties");
|
||||
public final Path TESTS_LOG_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "log", "TestsLog" + getnow() + ".txt");
|
||||
public static String TESTS_CONFIG_FILENAME = ".config";
|
||||
public static String TESTS_HELP_FILENAME = "help.html";
|
||||
@@ -299,6 +300,7 @@ public class TestingList extends Panel {
|
||||
initLogger();
|
||||
buildTable();
|
||||
closeCustomPanel();
|
||||
loadProperties();
|
||||
try {
|
||||
loadTests();
|
||||
//if not administrator, then show only enabled tests
|
||||
@@ -315,6 +317,27 @@ public class TestingList extends Panel {
|
||||
}
|
||||
|
||||
|
||||
private void loadProperties(){
|
||||
File configFile = TESTS_PROPERTIES_DEFAULT_DIR.toFile();
|
||||
if (!configFile.isFile()) return;
|
||||
|
||||
try {
|
||||
FileReader reader = new FileReader(configFile);
|
||||
Properties props = new Properties();
|
||||
props.load(reader);
|
||||
|
||||
String customPanel = props.getProperty("customPanel");
|
||||
|
||||
System.out.print("Custom Panel: " + customPanel);
|
||||
reader.close();
|
||||
} catch (FileNotFoundException ex) {
|
||||
// file does not exist
|
||||
} catch (IOException ex) {
|
||||
// I/O error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* close the custom panel if present
|
||||
*/
|
||||
@@ -333,7 +356,7 @@ public class TestingList extends Panel {
|
||||
Path pluginsPath = Paths.get(".", "home", "config", "plugins.properties");
|
||||
List<String> stringBuffer =new ArrayList<String>() ;
|
||||
try {
|
||||
File file = new File(pluginsPath.toString());
|
||||
File file = pluginsPath.toFile();
|
||||
FileReader fileReader = new FileReader(file);
|
||||
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
||||
String line, fileName;
|
||||
|
||||
Reference in New Issue
Block a user