промежуточный. в процессе рефакторинга объектов с настройками
This commit is contained in:
@@ -27,7 +27,7 @@ public class Global {
|
||||
//Режим
|
||||
public static Mode mode = Mode.Undefined;
|
||||
//--------------------------------------------------
|
||||
public static GlobalProperties properties = new GlobalProperties();
|
||||
public static GlobalProperties properties = null;
|
||||
//---
|
||||
public static boolean files_multiselection = false;
|
||||
public static boolean versions_multiselection = false;
|
||||
@@ -55,16 +55,7 @@ public class Global {
|
||||
public static ComponentsServer componentsServer = new ComponentsServer();
|
||||
public static TestingServer testingServer = new TestingServer();
|
||||
public static PerformanceAnalyzer performanceAnalyzer = null;
|
||||
public static void SynschronizeProperties() {
|
||||
try {
|
||||
File new_propertiesFile = new File(Utils_.getHomeDirectory(), "properties");
|
||||
if (new_propertiesFile.exists())
|
||||
properties = (GlobalProperties) Utils_.jsonFromFile(new_propertiesFile, GlobalProperties.class);
|
||||
Utils_.jsonToFile(properties, new_propertiesFile);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckVisualiserDirectories() {
|
||||
Utils_.CheckDirectory(ComponentsDirectory = new File(Utils_.getHomeDirectory(), Constants.ComponentsDirectoryName));
|
||||
Utils_.CheckAndCleanDirectory(TempDirectory = new File(Utils_.getHomeDirectory(), Constants.TempDirectoryName));
|
||||
@@ -221,7 +212,6 @@ public class Global {
|
||||
// FoldParserManager.get().addFoldParserMapping("text/FortranSPF", new FortranFolder()); блоки кода. todo
|
||||
//light_editor.xml-------->>
|
||||
mainModule.ActivateDB();
|
||||
|
||||
/*
|
||||
mainModule.set(Current.Account, new Account() {
|
||||
{
|
||||
@@ -276,8 +266,11 @@ public class Global {
|
||||
public static void Init(String... args) {
|
||||
System.out.println("VisualSapfor.jar started..");
|
||||
System.out.println("home directory is" + Utils_.Brackets(Utils_.getHomePath()));
|
||||
//---
|
||||
SynschronizeProperties();
|
||||
//--->
|
||||
properties=Utils_.SynschronizeProperties(
|
||||
Paths.get(System.getProperty("user.dir"), "properties").toFile(),
|
||||
GlobalProperties.class);
|
||||
//--->
|
||||
mode = properties.Mode;
|
||||
System.out.println("mode is " + mode);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user