рефакторинг. вынес в обобщенную часть бд, но еще не все
This commit is contained in:
@@ -3,12 +3,12 @@ import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.DebugPrintLevel;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Files.VDirectoryChooser;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.DBLastProject.DBLastProject;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.LanguageStyle;
|
||||
import ProjectData.Project.db_project_info;
|
||||
@@ -118,13 +118,13 @@ public class OpenCurrentProject extends Pass_2021<db_project_info> {
|
||||
SettingName.FREE_FORM, target.style.equals(LanguageStyle.free) ? "1" : "0")
|
||||
;
|
||||
DBLastProject lastProject;
|
||||
if (Global.db.lastProjects.containsKey(target.Home.getAbsolutePath())) {
|
||||
lastProject = Global.db.lastProjects.get(target.Home.getAbsolutePath());
|
||||
if (((GlobalDatabase)CommonUtils.db).lastProjects.containsKey(target.Home.getAbsolutePath())) {
|
||||
lastProject = ((GlobalDatabase)CommonUtils.db).lastProjects.get(target.Home.getAbsolutePath());
|
||||
lastProject.RefreshOpenTime();
|
||||
Global.db.Update(lastProject);
|
||||
CommonUtils.db.Update(lastProject);
|
||||
} else {
|
||||
lastProject = new DBLastProject(target);
|
||||
Global.db.Insert(lastProject);
|
||||
CommonUtils.db.Insert(lastProject);
|
||||
}
|
||||
target.setInfo(lastProject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user