рефакторинг
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Constants.Constants;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Global;
|
||||
@@ -188,7 +189,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
//предполагаем что оба объекта есть и мы можем получить с них текст.
|
||||
protected void Compare() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = Utils.Nan;
|
||||
current_diff_line = Constants.Nan;
|
||||
colors.clear();
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
@@ -252,7 +253,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
}
|
||||
public void Show() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = Utils.Nan;
|
||||
current_diff_line = Constants.Nan;
|
||||
colors.clear();
|
||||
//----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
@@ -339,7 +340,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
//</editor-fold>
|
||||
slave.master = this;
|
||||
bPrevious.addActionListener(e -> {
|
||||
if (current_diff_line != Utils.Nan) {
|
||||
if (current_diff_line != Constants.Nan) {
|
||||
if (current_diff_line > 0)
|
||||
current_diff_line--;
|
||||
else
|
||||
@@ -348,7 +349,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
}
|
||||
});
|
||||
bNext.addActionListener(e -> {
|
||||
if (current_diff_line != Utils.Nan) {
|
||||
if (current_diff_line != Constants.Nan) {
|
||||
if (current_diff_line < colors.size() - 1)
|
||||
current_diff_line++;
|
||||
else
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Constants.Constants;
|
||||
import Common.Global;
|
||||
import Common.UI.Editor.Viewer;
|
||||
import Common.UI.Menus_2023.FileMenuBar.FileMenuBar;
|
||||
import Common.UI.Trees.TreeForm;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.UI.Editor.SPFEditor;
|
||||
@@ -29,7 +29,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
//контролы в столбцах
|
||||
//https://stackoverflow.com/questions/7137786/how-can-i-put-a-control-in-the-jtableheader-of-a-jtable
|
||||
//todo _ временно
|
||||
public static int current_file_line = Utils.Nan;
|
||||
public static int current_file_line = Constants.Nan;
|
||||
private final Viewer compilationOutput;
|
||||
private final Viewer runOutput;
|
||||
private final Viewer gcovLog;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Constants.Constants;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar;
|
||||
import Common.UI.TextField.StyledTextField;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.Credentials.Credentials;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||
@@ -355,48 +355,48 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
@Override
|
||||
public void RestoreLastCredentials() {
|
||||
Credentials credentials = (Credentials) Current.get(Current.Credentials);
|
||||
if (credentials.machine_id != Utils.Nan) {
|
||||
if (credentials.machine_id != Constants.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);
|
||||
} else {
|
||||
credentials.user_id = Utils.Nan;
|
||||
credentials.user_id = Constants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
if (Global.db.compilers.containsKey(credentials.compiler_id)) {
|
||||
Global.db.compilers.ShowUI(credentials.compiler_id);
|
||||
} else {
|
||||
credentials.compiler_id = Utils.Nan;
|
||||
credentials.compiler_id = Constants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (Global.db.makefiles.containsKey(credentials.makefile_id)) {
|
||||
Global.db.makefiles.ShowUI(credentials.makefile_id);
|
||||
} else {
|
||||
credentials.makefile_id = Utils.Nan;
|
||||
credentials.makefile_id = Constants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (Global.db.runConfigurations.containsKey(credentials.runconfiguration_id)) {
|
||||
Global.db.runConfigurations.ShowUI(credentials.runconfiguration_id);
|
||||
} else {
|
||||
credentials.runconfiguration_id = Utils.Nan;
|
||||
credentials.runconfiguration_id = Constants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
if (Global.db.remoteSapfors.containsKey(credentials.remotesapfor_id)) {
|
||||
Global.db.remoteSapfors.ShowUI(credentials.remotesapfor_id);
|
||||
} else {
|
||||
credentials.remotesapfor_id = Utils.Nan;
|
||||
credentials.remotesapfor_id = Constants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
} else {
|
||||
credentials.machine_id = Utils.Nan;
|
||||
credentials.user_id = Utils.Nan;
|
||||
credentials.compiler_id = Utils.Nan;
|
||||
credentials.remotesapfor_id = Utils.Nan;
|
||||
credentials.makefile_id = Utils.Nan;
|
||||
credentials.runconfiguration_id = Utils.Nan;
|
||||
credentials.machine_id = Constants.Nan;
|
||||
credentials.user_id = Constants.Nan;
|
||||
credentials.compiler_id = Constants.Nan;
|
||||
credentials.remotesapfor_id = Constants.Nan;
|
||||
credentials.makefile_id = Constants.Nan;
|
||||
credentials.runconfiguration_id = Constants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user