рефакторинг. вынес в обобщенную часть бд, но еще не все
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
public interface FormWithSplitters {
|
||||
default void LoadSplitters() {
|
||||
Global.db.splitters.Load(this);
|
||||
CommonUtils.db.splitters.Load(this);
|
||||
}
|
||||
default void SaveSplitters() {
|
||||
Global.db.splitters.Save(this);
|
||||
CommonUtils.db.splitters.Save(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.BaseEditor;
|
||||
import Common_old.UI.Editor.Viewer;
|
||||
@@ -162,7 +163,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
BugReportCommentAddition.setWrapStyleWord(true);
|
||||
//----------------------------------------------
|
||||
//тут развилка на то вкладки или поля.
|
||||
SwitchScreen(Global.db.settings.get(SettingName.SmallScreen).toBoolean());
|
||||
SwitchScreen(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.SmallScreen).toBoolean());
|
||||
//-
|
||||
Global.componentsServer.db.bugReports.mountUI(bugReportsPanel);
|
||||
Global.componentsServer.db.subscribers.mountUI(subscribersPanel);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import Visual_DVM_2021.UI.Interface.DebugWindow;
|
||||
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
|
||||
|
||||
@@ -67,22 +68,22 @@ public class DebugForm implements DebugWindow, FormWithSplitters {
|
||||
//-
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
Global.db.makefiles.ShowUI();
|
||||
Global.db.runConfigurations.ShowUI();
|
||||
Global.db.compilationTasks.ShowUI(); //их видимость зависит от текущего проекта.
|
||||
Global.db.runTasks.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).makefiles.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).runConfigurations.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).compilationTasks.ShowUI(); //их видимость зависит от текущего проекта.
|
||||
((GlobalDatabase)CommonUtils.db).runTasks.ShowUI();
|
||||
}
|
||||
public DebugForm(){
|
||||
LoadSplitters();
|
||||
//--
|
||||
Global.db.makefiles.mountUI(makefilesPanel);
|
||||
Global.db.modules.mountUI(modulesPanel);
|
||||
Global.db.runConfigurations.mountUI(runConfigurationsPanel);
|
||||
Global.db.environmentValues.mountUI(environmentsPanel);
|
||||
Global.db.dvmParameters.mountUI(dvmParametersPanel);
|
||||
((GlobalDatabase)CommonUtils.db).makefiles.mountUI(makefilesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).modules.mountUI(modulesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).runConfigurations.mountUI(runConfigurationsPanel);
|
||||
((GlobalDatabase)CommonUtils.db).environmentValues.mountUI(environmentsPanel);
|
||||
((GlobalDatabase)CommonUtils.db).dvmParameters.mountUI(dvmParametersPanel);
|
||||
//-
|
||||
Global.db.compilationTasks.mountUI(compilationTasksPanel);
|
||||
Global.db.runTasks.mountUI(runTasksPanel);
|
||||
((GlobalDatabase)CommonUtils.db).compilationTasks.mountUI(compilationTasksPanel);
|
||||
((GlobalDatabase)CommonUtils.db).runTasks.mountUI(runTasksPanel);
|
||||
//--
|
||||
singleCompilationTaskMaster = new CompilationTasksComparisonForm(singleCompilationTaskSlave = new CompilationTasksComparisonForm(null));
|
||||
singleRunTaskMaster = new RunTasksComparisonForm(singleRunTaskSlave = new RunTasksComparisonForm(null));
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.Viewer;
|
||||
import Common_old.UI.Menus_2023.FileMenuBar.FileMenuBar;
|
||||
@@ -171,29 +173,29 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
//----
|
||||
@Override
|
||||
public void ShowWarningsCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(1, (flag ? "Предупреждения: " : "") + file.father.db.warnings.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowErrorsCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(2, (flag ? "Ошибки: " : "") + file.father.db.errors.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowNotesCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(0, (flag ? "Примечания: " : "") + file.father.db.notes.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowRecommendationsCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(3, (flag ? "Рекомендации: " : "") + file.father.db.recommendations.getVisibleKeys().size());
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public void RefreshTabsNames() {
|
||||
UI.ShowTabsNames(graphsTabs);
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
//--
|
||||
ShowNotesCount();
|
||||
ShowWarningsCount();
|
||||
@@ -235,7 +237,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
}
|
||||
@Override
|
||||
public void ShowNoMessages() {
|
||||
boolean full_tiles = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean full_tiles = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
file.father.db.notes.ClearUI();
|
||||
file.father.db.warnings.ClearUI();
|
||||
file.father.db.errors.ClearUI();
|
||||
@@ -367,7 +369,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
//--
|
||||
@Override
|
||||
public void CollapseGraphs() {
|
||||
Global.db.splitters.get("SC12").position = SC12.getDividerLocation();
|
||||
CommonUtils.db.splitters.get("SC12").position = SC12.getDividerLocation();
|
||||
CommonUI.Clear(editorBackground);
|
||||
editorBackground.add(editorPanel);
|
||||
}
|
||||
@@ -377,12 +379,12 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
SC12.setRightComponent(editorPanel);
|
||||
editorBackground.add(SC12);
|
||||
//--
|
||||
SC12.setDividerLocation(Global.db.splitters.get("SC12").position);
|
||||
SC12.setDividerLocation(CommonUtils.db.splitters.get("SC12").position);
|
||||
SC12.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void CollapseMessages() {
|
||||
Global.db.splitters.get("SC1").position = SC1.getDividerLocation();
|
||||
CommonUtils.db.splitters.get("SC1").position = SC1.getDividerLocation();
|
||||
CommonUI.Clear(content);
|
||||
content.add(editorBackground);
|
||||
}
|
||||
@@ -391,7 +393,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
CommonUI.Clear(content);
|
||||
SC1.setLeftComponent(editorBackground);
|
||||
content.add(SC1);
|
||||
SC1.setDividerLocation(Global.db.splitters.get("SC1").position);
|
||||
SC1.setDividerLocation(CommonUtils.db.splitters.get("SC1").position);
|
||||
SC1.updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Menus_2023.MainMenuBar.MainWindow;
|
||||
import Common_old.UI.UI;
|
||||
@@ -61,7 +62,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
if (UI.debugWindow != null)
|
||||
((FormWithSplitters) UI.debugWindow).SaveSplitters();
|
||||
//--
|
||||
Global.db.SaveCredentials();
|
||||
((GlobalDatabase)CommonUtils.db).SaveCredentials();
|
||||
//--
|
||||
Global.FinishApplication();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.UI.Windows.Dialog.DialogFields;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -15,7 +16,7 @@ public class ProfilesFields implements DialogFields, FormWithSplitters {
|
||||
return content;
|
||||
}
|
||||
public ProfilesFields(){
|
||||
Global.db.sapforProfiles.mountUI(profilesPanel);
|
||||
Global.db.sapforProfilesSettings.mountUI(settingsPanel);
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfiles.mountUI(profilesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfilesSettings.mountUI(settingsPanel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common_old.UI.Windows.FormType;
|
||||
import GlobalData.FormsParams.DBForm;
|
||||
import GlobalData.GlobalDatabase;
|
||||
public class ProfilesForm extends Dialog<Object, ProfilesFields> {
|
||||
private DBForm info = null;
|
||||
public ProfilesForm() {
|
||||
@@ -17,13 +18,13 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
|
||||
}
|
||||
@Override
|
||||
public void Init(Object... params) {
|
||||
if (Global.db.sapforProfiles.size() > 0) {
|
||||
for (Object key : Global.db.sapforProfiles.Data.keySet()) {
|
||||
Global.db.sapforProfiles.ShowUI(key);
|
||||
if (((GlobalDatabase)CommonUtils.db).sapforProfiles.size() > 0) {
|
||||
for (Object key : ((GlobalDatabase)CommonUtils.db).sapforProfiles.Data.keySet()) {
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfiles.ShowUI(key);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Global.db.sapforProfiles.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfiles.ShowUI();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -54,8 +55,8 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
|
||||
}
|
||||
}
|
||||
public void LoadWindowParameters() throws Exception {
|
||||
if (Global.db.forms.Data.containsKey(FormType.Profiles)) {
|
||||
info = Global.db.forms.Data.get(FormType.Profiles);
|
||||
if (((GlobalDatabase)CommonUtils.db).forms.Data.containsKey(FormType.Profiles)) {
|
||||
info = ((GlobalDatabase)CommonUtils.db).forms.Data.get(FormType.Profiles);
|
||||
info.Apply(this);
|
||||
return;
|
||||
}
|
||||
@@ -64,8 +65,8 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
|
||||
public void SaveWindowParameters() throws Exception {
|
||||
if (info != null) {
|
||||
info.Init(this);
|
||||
Global.db.Update(info);
|
||||
CommonUtils.db.Update(info);
|
||||
} else
|
||||
Global.db.Insert(new DBForm(FormType.Profiles, this));
|
||||
CommonUtils.db.Insert(new DBForm(FormType.Profiles, this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.Viewer;
|
||||
import Common_old.UI.Menus_2023.ProjectMenuBar.ProjectMenuBar;
|
||||
@@ -83,7 +84,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
UI.getDebugWindow().ShowAll();
|
||||
ShowAllAnalyses();
|
||||
ShowProjectView();
|
||||
SwitchScreen(Global.db.settings.get(SettingName.SmallScreen).toBoolean());
|
||||
SwitchScreen(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.SmallScreen).toBoolean());
|
||||
RefreshTabsNames();
|
||||
//--
|
||||
if (Global.properties.collapseProjectTrees)
|
||||
@@ -293,7 +294,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
//--
|
||||
@Override
|
||||
public void CollapseProjectTrees() {
|
||||
Global.db.splitters.get("SC3").position = SC3.getDividerLocation();
|
||||
CommonUtils.db.splitters.get("SC3").position = SC3.getDividerLocation();
|
||||
//---
|
||||
CommonUI.Clear(projectBackground);
|
||||
projectBackground.add(fileBackground);
|
||||
@@ -302,7 +303,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
public void ExpandProjectTrees() {
|
||||
SC3.setLeftComponent(fileBackground);
|
||||
projectBackground.add(SC3);
|
||||
SC3.setDividerLocation(Global.db.splitters.get("SC3").position);
|
||||
SC3.setDividerLocation(CommonUtils.db.splitters.get("SC3").position);
|
||||
SC3.updateUI();
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@ package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Menus_2023.MenuBarButton;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersion_json;
|
||||
@@ -82,10 +82,10 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
||||
} else {
|
||||
if (isReady()) {
|
||||
if (getMaster().isReady()) {
|
||||
boolean ExtensionsOn = Global.db.settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
boolean ExtensionsOn = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : CommonUtils.getFileNameWithoutExtension(getMaster().file.file);
|
||||
String name2 = ExtensionsOn ? file.file.getName() : CommonUtils.getFileNameWithoutExtension(file.file);
|
||||
if (Global.db.settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (name1.equalsIgnoreCase(name2))
|
||||
master.DoComparePass(true);
|
||||
} else
|
||||
@@ -155,7 +155,7 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
||||
cbFile.setSelectedIndex(-1);
|
||||
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
||||
ProjectFile projectFile = cbFile.getItemAt(i);
|
||||
if (Global.db.settings.get(SettingName.ExtensionsOn).toBoolean()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean()) {
|
||||
//если учитываем расширения, ищем полное совпадение
|
||||
if (projectFile.file.getName().equals(file_name)) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.UI.Menus_2023.MenuBarButton;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -28,7 +29,7 @@ public abstract class TasksComparisonForm<T extends DBObject> extends Comparison
|
||||
//в отличие от комбо боксов, тут события нажатия на кнопку, нет.
|
||||
if (isReady()) {
|
||||
if (slave.isReady()) {
|
||||
if (Global.db.settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
DoComparePass(true);
|
||||
} else
|
||||
DoShowPass(true);
|
||||
@@ -39,7 +40,7 @@ public abstract class TasksComparisonForm<T extends DBObject> extends Comparison
|
||||
} else {
|
||||
if (isReady()) {
|
||||
if (master.isReady()) {
|
||||
if (Global.db.settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
master.DoComparePass(true);
|
||||
} else
|
||||
master.DoShowPass(true);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.TextField.StyledTextField;
|
||||
import Common_old.UI.UI;
|
||||
@@ -128,9 +130,9 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
SC65.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc65Listener);
|
||||
SC66.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc66Listener);
|
||||
//-
|
||||
Global.db.machines.mountUI(machinesPanel);
|
||||
Global.db.users.mountUI(usersPanel);
|
||||
Global.db.compilers.mountUI(compilersPanel);
|
||||
((GlobalDatabase)CommonUtils.db).machines.mountUI(machinesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).users.mountUI(usersPanel);
|
||||
((GlobalDatabase)CommonUtils.db).compilers.mountUI(compilersPanel);
|
||||
//-
|
||||
Global.testingServer.db.dvm_configurations.mountUI(configurationsPanel);
|
||||
Global.testingServer.db.dvmPackages.mountUI(dvmPackagesPanel);
|
||||
@@ -148,7 +150,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
//-
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
Global.db.machines.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).machines.ShowUI();
|
||||
Global.testingServer.db.dvm_configurations.ShowUI();
|
||||
Global.testingServer.db.dvmPackages.ShowUI();
|
||||
Global.testingServer.db.sapforPackages.ShowUI();
|
||||
@@ -271,33 +273,33 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
public void RestoreLastCredentials() {
|
||||
Credentials credentials = (Credentials) CurrentAnchestor.get(Current.Credentials);
|
||||
if (credentials.machine_id != CommonConstants.Nan) {
|
||||
if (Global.db.machines.containsKey(credentials.machine_id)) {
|
||||
Global.db.machines.ShowUI(credentials.machine_id);
|
||||
if (Global.db.users.containsKey(credentials.user_id)) {
|
||||
Global.db.users.ShowUI(credentials.user_id);
|
||||
if (((GlobalDatabase)CommonUtils.db).machines.containsKey(credentials.machine_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).machines.ShowUI(credentials.machine_id);
|
||||
if (((GlobalDatabase)CommonUtils.db).users.containsKey(credentials.user_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).users.ShowUI(credentials.user_id);
|
||||
} else {
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
if (Global.db.compilers.containsKey(credentials.compiler_id)) {
|
||||
Global.db.compilers.ShowUI(credentials.compiler_id);
|
||||
if (((GlobalDatabase)CommonUtils.db).compilers.containsKey(credentials.compiler_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).compilers.ShowUI(credentials.compiler_id);
|
||||
} else {
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (Global.db.makefiles.containsKey(credentials.makefile_id)) {
|
||||
Global.db.makefiles.ShowUI(credentials.makefile_id);
|
||||
if (((GlobalDatabase)CommonUtils.db).makefiles.containsKey(credentials.makefile_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).makefiles.ShowUI(credentials.makefile_id);
|
||||
} else {
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (Global.db.runConfigurations.containsKey(credentials.runconfiguration_id)) {
|
||||
Global.db.runConfigurations.ShowUI(credentials.runconfiguration_id);
|
||||
if (((GlobalDatabase)CommonUtils.db).runConfigurations.containsKey(credentials.runconfiguration_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).runConfigurations.ShowUI(credentials.runconfiguration_id);
|
||||
} else {
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
} else {
|
||||
credentials.machine_id = CommonConstants.Nan;
|
||||
@@ -306,13 +308,13 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
credentials.remotesapfor_id = CommonConstants.Nan;
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void CollapseCredentials() {
|
||||
Global.db.splitters.get("SC71").position = SC71.getDividerLocation();
|
||||
CommonUtils.db.splitters.get("SC71").position = SC71.getDividerLocation();
|
||||
CommonUI.Clear(credentialsPanel);
|
||||
credentialsPanel.add(UI.credentialsBar);
|
||||
SC71.setDividerLocation(30);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
@@ -35,10 +35,10 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
||||
} else {
|
||||
if (isReady()) {
|
||||
if (getMaster().isReady()) {
|
||||
boolean ExtensionsOn = Global.db.settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
boolean ExtensionsOn = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : CommonUtils.getFileNameWithoutExtension(getMaster().file.file);
|
||||
String name2 = ExtensionsOn ? file.file.getName() : CommonUtils.getFileNameWithoutExtension(file.file);
|
||||
if (Global.db.settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (name1.equalsIgnoreCase(name2))
|
||||
master.DoComparePass(true);
|
||||
} else
|
||||
@@ -83,7 +83,7 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
||||
cbFile.setSelectedIndex(-1);
|
||||
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
||||
ProjectFile projectFile = cbFile.getItemAt(i);
|
||||
if (Global.db.settings.get(SettingName.ExtensionsOn).toBoolean()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean()) {
|
||||
//если учитываем расширения, ищем полное совпадение
|
||||
if (projectFile.file.getName().equals(file_in.file.getName())) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
@@ -106,6 +106,6 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected boolean fortranWrapsOn() {
|
||||
return Global.db.settings.get(SettingName.FortranWrapsOn).toBoolean();
|
||||
return ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FortranWrapsOn).toBoolean();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user