no message
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.DebugPrintLevel;
|
||||
import Common_old.UI.UI;
|
||||
@@ -25,7 +26,7 @@ public interface Loggable {
|
||||
default void Print(String message) {
|
||||
try {
|
||||
FileWriter Log = new FileWriter(getLogFile(), true);
|
||||
String datedMessage = Utils.Brackets(new Date()) + " " + message;
|
||||
String datedMessage = CommonUtils.Brackets(new Date()) + " " + message;
|
||||
Log.write(datedMessage + "\n");
|
||||
Log.close();
|
||||
} catch (Exception ignored) {
|
||||
@@ -33,7 +34,7 @@ public interface Loggable {
|
||||
}
|
||||
default void Print(DebugPrintLevel level, String message) {
|
||||
if (level.isEnabled())
|
||||
Print(Utils.Brackets(level.getDescription()) + " " + message);
|
||||
Print(CommonUtils.Brackets(level.getDescription()) + " " + message);
|
||||
}
|
||||
default void PrintException(Exception ex) {
|
||||
StringWriter out = new StringWriter();
|
||||
@@ -43,6 +44,6 @@ public interface Loggable {
|
||||
Print(out.toString());
|
||||
if (Current.hasUI())
|
||||
UI.Error("Возникло исключение. Подробности в файле журнала\n" +
|
||||
Utils.Brackets(getLogFile().getAbsolutePath()));
|
||||
CommonUtils.Brackets(getLogFile().getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.BaseEditor;
|
||||
@@ -6,7 +7,6 @@ import Common_old.UI.Editor.Viewer;
|
||||
import Common_old.UI.Menus_2023.VisualiserMenuBar;
|
||||
import Common_old.UI.TextField.StyledTextField;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import Repository.BugReport.BugReport;
|
||||
import Repository.BugReport.BugReportInterface;
|
||||
@@ -434,9 +434,9 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowAccount() {
|
||||
lAccountName.setText(Utils.Brackets(Current.getAccount().name));
|
||||
lAccountMail.setText(Utils.Brackets(Current.getAccount().email));
|
||||
lAccountRole.setText(Utils.Brackets(Current.getAccount().role.getDescription()));
|
||||
lAccountName.setText(CommonUtils.Brackets(Current.getAccount().name));
|
||||
lAccountMail.setText(CommonUtils.Brackets(Current.getAccount().email));
|
||||
lAccountRole.setText(CommonUtils.Brackets(Current.getAccount().role.getDescription()));
|
||||
switch (Current.getAccount().role) {
|
||||
case Undefined:
|
||||
/// UI.Clear(accountPanel);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common_old.Constants;
|
||||
import Common.CommonConstants;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
@@ -105,7 +105,7 @@ public abstract class ComparisonForm<T> {
|
||||
//предполагаем что оба объекта есть и мы можем получить с них текст.
|
||||
protected void Compare() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = Constants.Nan;
|
||||
current_diff_line = CommonConstants.Nan;
|
||||
colors.clear();
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
@@ -169,7 +169,7 @@ public abstract class ComparisonForm<T> {
|
||||
}
|
||||
public void Show() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = Constants.Nan;
|
||||
current_diff_line = CommonConstants.Nan;
|
||||
colors.clear();
|
||||
//----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
@@ -259,7 +259,7 @@ public abstract class ComparisonForm<T> {
|
||||
//</editor-fold>
|
||||
slave.master = this;
|
||||
bPrevious.addActionListener(e -> {
|
||||
if (current_diff_line != Constants.Nan) {
|
||||
if (current_diff_line != CommonConstants.Nan) {
|
||||
if (current_diff_line > 0)
|
||||
current_diff_line--;
|
||||
else
|
||||
@@ -268,7 +268,7 @@ public abstract class ComparisonForm<T> {
|
||||
}
|
||||
});
|
||||
bNext.addActionListener(e -> {
|
||||
if (current_diff_line != Constants.Nan) {
|
||||
if (current_diff_line != CommonConstants.Nan) {
|
||||
if (current_diff_line < colors.size() - 1)
|
||||
current_diff_line++;
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common_old.Constants;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.Viewer;
|
||||
import Common_old.UI.Menus_2023.FileMenuBar.FileMenuBar;
|
||||
@@ -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 = Constants.Nan;
|
||||
public static int current_file_line = CommonConstants.Nan;
|
||||
private final Viewer compilationOutput;
|
||||
private final Viewer runOutput;
|
||||
private final Viewer gcovLog;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
@@ -82,8 +83,8 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
||||
if (isReady()) {
|
||||
if (getMaster().isReady()) {
|
||||
boolean ExtensionsOn = Global.db.settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : Utils.getFileNameWithoutExtension(getMaster().file.file);
|
||||
String name2 = ExtensionsOn ? file.file.getName() : Utils.getFileNameWithoutExtension(file.file);
|
||||
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 (name1.equalsIgnoreCase(name2))
|
||||
master.DoComparePass(true);
|
||||
@@ -112,7 +113,7 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
||||
@Override
|
||||
protected void showObject() {
|
||||
lObjectName.setText(object.toString());
|
||||
lObjectName.setToolTipText(object.Home.getName() + " : " + Utils.Brackets(object.description));
|
||||
lObjectName.setToolTipText(object.Home.getName() + " : " + CommonUtils.Brackets(object.description));
|
||||
cbFile.removeAllItems();
|
||||
for (ProjectFile file : object.files.values())
|
||||
cbFile.addItem(file);
|
||||
@@ -161,8 +162,8 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (Utils.getNameWithoutExtension(projectFile.file.getName()).equals(
|
||||
Utils.getNameWithoutExtension(file_name))) {
|
||||
if (CommonUtils.getNameWithoutExtension(projectFile.file.getName()).equals(
|
||||
CommonUtils.getNameWithoutExtension(file_name))) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common_old.Constants;
|
||||
import Common.CommonConstants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.TextField.StyledTextField;
|
||||
@@ -268,42 +268,42 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
}
|
||||
public void RestoreLastCredentials() {
|
||||
Credentials credentials = (Credentials) Current.get(Current.Credentials);
|
||||
if (credentials.machine_id != Constants.Nan) {
|
||||
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);
|
||||
} else {
|
||||
credentials.user_id = Constants.Nan;
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
if (Global.db.compilers.containsKey(credentials.compiler_id)) {
|
||||
Global.db.compilers.ShowUI(credentials.compiler_id);
|
||||
} else {
|
||||
credentials.compiler_id = Constants.Nan;
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (Global.db.makefiles.containsKey(credentials.makefile_id)) {
|
||||
Global.db.makefiles.ShowUI(credentials.makefile_id);
|
||||
} else {
|
||||
credentials.makefile_id = Constants.Nan;
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (Global.db.runConfigurations.containsKey(credentials.runconfiguration_id)) {
|
||||
Global.db.runConfigurations.ShowUI(credentials.runconfiguration_id);
|
||||
} else {
|
||||
credentials.runconfiguration_id = Constants.Nan;
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
credentials.machine_id = CommonConstants.Nan;
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
credentials.remotesapfor_id = CommonConstants.Nan;
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
Global.db.UpdateCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -35,8 +36,8 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
||||
if (isReady()) {
|
||||
if (getMaster().isReady()) {
|
||||
boolean ExtensionsOn = Global.db.settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : Utils.getFileNameWithoutExtension(getMaster().file.file);
|
||||
String name2 = ExtensionsOn ? file.file.getName() : Utils.getFileNameWithoutExtension(file.file);
|
||||
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 (name1.equalsIgnoreCase(name2))
|
||||
master.DoComparePass(true);
|
||||
@@ -89,8 +90,8 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (Utils.getNameWithoutExtension(projectFile.file.getName()).equals(
|
||||
Utils.getNameWithoutExtension(file_in.file.getName()))) {
|
||||
if (CommonUtils.getNameWithoutExtension(projectFile.file.getName()).equals(
|
||||
CommonUtils.getNameWithoutExtension(file_in.file.getName()))) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user