no message
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package Repository.BugReport;
|
||||
import Common.Visual.StatusEnum;
|
||||
import _VisualDVM.Syntax.VisualiserFonts;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
|
||||
import java.io.Serializable;
|
||||
public enum BugReportState implements Serializable, StatusEnum {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Repository.Component;
|
||||
import Common.Visual.StatusEnum;
|
||||
import _VisualDVM.Syntax.VisualiserFonts;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
public enum ComponentState implements StatusEnum {
|
||||
Undefined,
|
||||
Actual,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Repository.Component;
|
||||
import Common_old.Current;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.DataMenuBar;
|
||||
import Common_old.UI.Menus_2023.VisualiserMenu;
|
||||
import _VisualDVM.Syntax.VisualiserFonts;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
public class ComponentsMenuBar extends DataMenuBar {
|
||||
@@ -12,7 +12,7 @@ public class ComponentsMenuBar extends DataMenuBar {
|
||||
new VisualiserMenu(
|
||||
"Восстановление предыдущей версии компонента", "/icons/Resurrect.png") {
|
||||
{
|
||||
setFont(Current.getTheme().Fonts.get(VisualiserFonts.Menu));
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.Menu));
|
||||
add(Pass_2021.passes.get(PassCode_2021.ResurrectComponent).createMenuItem());
|
||||
add(Pass_2021.passes.get(PassCode_2021.ResurrectComponentFromServer).createMenuItem());
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ import Common.Utils.CommonUtils;
|
||||
public abstract class OSDComponent extends Component {
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return getComponentType().toString() + (CommonUtils.isWindows ? ".exe" : "");
|
||||
return getComponentType().toString() + (CommonUtils.isWindows() ? ".exe" : "");
|
||||
}
|
||||
@Override
|
||||
public String getNewFileName() {
|
||||
return getComponentType().toString() + "_new" + (CommonUtils.isWindows ? ".exe" : "");
|
||||
return getComponentType().toString() + "_new" + (CommonUtils.isWindows() ? ".exe" : "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package Repository.Component.PerformanceAnalyzer;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import analyzer.common.MessageJtoJ;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.Component.Component;
|
||||
import Repository.Component.ComponentType;
|
||||
@@ -144,7 +144,7 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
public void Start() {
|
||||
if (isActive) {
|
||||
UI.Info("Анализатор уже запущен");
|
||||
CommonUI.Info("Анализатор уже запущен");
|
||||
} else {
|
||||
main_thread = new Thread(this::ServerBody);
|
||||
main_thread.start();
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package Repository.Component.Sapfor;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -139,7 +141,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
Visualizer_2.UnpackVersionInfo(this, getResult());
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
UI.Error("Не удалось получить версию компонента " + CommonUtils.DQuotes(getComponentType().getDescription()));
|
||||
CommonUI.Error("Не удалось получить версию компонента " + CommonUtils.DQuotes(getComponentType().getDescription()));
|
||||
}
|
||||
}
|
||||
public abstract String getUpdateCommand();
|
||||
@@ -334,7 +336,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
Utils.WriteToFile(file, OldFiles.get(name));
|
||||
}
|
||||
OldFiles.clear();
|
||||
} else UI.Info("Сохранение файлов отсутствует.");
|
||||
} else CommonUI.Info("Сохранение файлов отсутствует.");
|
||||
}
|
||||
if (cuf != null)
|
||||
Pass_2021.passes.get(PassCode_2021.OpenCurrentFile).Do(cuf);
|
||||
@@ -351,20 +353,20 @@ public abstract class Sapfor extends OSDComponent {
|
||||
for (PassCode_2021 code : getAnalysesCodes())
|
||||
(Pass_2021.passes.get(code)).Reset();
|
||||
//------------------------------------------------------------------------------------------>>>> пакетный режим.
|
||||
if (CommonUtils.hasUI()) {
|
||||
if (CommonUI.isActive()) {
|
||||
Pass_2021.passes.get(PassCode_2021.Precompilation).Reset();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGCovInfo).Reset();
|
||||
}
|
||||
Global.enable_text_changed = false;
|
||||
Global.transformationPermission = TransformationPermission.None;
|
||||
if ((CommonUtils.hasUI()) && (UI.getMainWindow() != null) && (UI.getVersionsWindow() != null))
|
||||
if ((CommonUI.isActive()) && (UI.getMainWindow() != null) && (UI.getVersionsWindow() != null))
|
||||
UI.getVersionsWindow().BlockVariants();
|
||||
}
|
||||
//--------------------------------------------------------------------------->>
|
||||
//временный (?) проход, по тихому получить размерность теста, предварительно выполнив тихий парс.
|
||||
//тут все одноразовое. считаем что таблицы бд уже заполнены как надо.
|
||||
public LanguageStyle getStyle() throws Exception {
|
||||
return Global.getSetting(SettingName.FREE_FORM).toBoolean() ? LanguageStyle.free : LanguageStyle.fixed;
|
||||
return ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FREE_FORM).toBoolean() ? LanguageStyle.free : LanguageStyle.fixed;
|
||||
}
|
||||
//----------
|
||||
public static Vector<PassCode_2021> getScenariosCodes() {
|
||||
@@ -409,12 +411,12 @@ public abstract class Sapfor extends OSDComponent {
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
public String getConsoleFlags() throws Exception {
|
||||
Vector<String> res = new Vector<>();
|
||||
if (Global.getSetting(SettingName.FREE_FORM).toBoolean())
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FREE_FORM).toBoolean())
|
||||
res.add("-f90");
|
||||
if (Global.getSetting(SettingName.STATIC_SHADOW_ANALYSIS).toBoolean())
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.STATIC_SHADOW_ANALYSIS).toBoolean())
|
||||
res.add("-sh");
|
||||
res.add("-shwidth " + Global.getSetting(SettingName.MAX_SHADOW_WIDTH));
|
||||
if (Global.getSetting(SettingName.KEEP_SPF_DIRECTIVES).toBoolean())
|
||||
res.add("-shwidth " + ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.MAX_SHADOW_WIDTH));
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.KEEP_SPF_DIRECTIVES).toBoolean())
|
||||
res.add("-keepSPF");
|
||||
return String.join(" ", res);
|
||||
}
|
||||
@@ -455,7 +457,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
Utils.delete_with_check(outputFile);
|
||||
Utils.delete_with_check(errorsFile);
|
||||
//---
|
||||
File file = new File(data_workspace, name + (CommonUtils.isWindows ? ".bat" : ".sh"));
|
||||
File file = new File(data_workspace, name + (CommonUtils.isWindows() ? ".bat" : ".sh"));
|
||||
FileUtils.write(file,
|
||||
CommonUtils.DQuotes(sapfor_drv)
|
||||
+ (flags.isEmpty() ? "" : (" " + flags))
|
||||
@@ -529,7 +531,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
public static File temp_copy = null;
|
||||
public static File getTempCopy(File src) throws Exception {
|
||||
if (temp_copy == null || !temp_copy.exists()) {
|
||||
temp_copy = Utils.getTempFileName("SAPFOR" + (CommonUtils.isWindows ? ".exe" : ""));
|
||||
temp_copy = Utils.getTempFileName("SAPFOR" + (CommonUtils.isWindows() ? ".exe" : ""));
|
||||
FileUtils.copyFile(src, temp_copy);
|
||||
temp_copy.setExecutable(true);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Repository.Component.UI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Repository.Component.UI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
|
||||
import java.awt.*;
|
||||
public class ComponentsForm extends Dialog<Object, ComponentsFields> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Repository.Component.UI;
|
||||
import Common_old.UI.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Repository.Component.UI;
|
||||
import Common_old.UI.Editor.BaseEditor;
|
||||
import Common_old.UI.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Repository.Component.UI;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
public class PublishForm extends Dialog<String, PublishFields> {
|
||||
public PublishForm() {
|
||||
super(PublishFields.class);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Repository.Component;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import Visual_DVM_2021.Passes.PassException;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Visualizer_2 extends OSDComponent {
|
||||
}
|
||||
@Override
|
||||
public String getHome() {
|
||||
return CommonUtils.Home;
|
||||
return CommonUtils.getHomePath();
|
||||
}
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
@@ -66,7 +66,7 @@ public class Visualizer_2 extends OSDComponent {
|
||||
super.Update();
|
||||
SendRequest("update_server: ");
|
||||
ReplaceOldFile();
|
||||
UI.Info("Сервер успешно обновлен.\n" +
|
||||
CommonUI.Info("Сервер успешно обновлен.\n" +
|
||||
"Визуализатор завершает работу.\n" +
|
||||
"Для продолжения перезапустите визуализатор вручную.");
|
||||
System.exit(0);
|
||||
|
||||
@@ -139,20 +139,20 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
break;
|
||||
case ReceiveBugReport:
|
||||
Print("Скачать баг репорт по ключу " + request.arg);
|
||||
File bugArchive = Paths.get(CommonUtils.Home, "Bugs", request.arg).toFile();
|
||||
File bugArchive = Paths.get(CommonUtils.getHomePath(), "Bugs", request.arg).toFile();
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = CommonUtils.fileToBytes(bugArchive);
|
||||
break;
|
||||
case SendBugReport:
|
||||
Print("Отправить баг репорт " + request.arg);
|
||||
File bugArchive1 = Paths.get(CommonUtils.Home, "Bugs", request.arg).toFile();
|
||||
File bugArchive1 = Paths.get(CommonUtils.getHomePath(), "Bugs", request.arg).toFile();
|
||||
CommonUtils.bytesToFile((byte[]) request.object, bugArchive1);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
break;
|
||||
//</editor-fold>
|
||||
case GetComponentsBackups:
|
||||
Print("Получить список сохраненных версий компонента " + request.arg);
|
||||
File backupsDirectory = Paths.get(CommonUtils.Home, "Components", request.arg, "Backups").toFile();
|
||||
File backupsDirectory = Paths.get(CommonUtils.getHomePath(), "Components", request.arg, "Backups").toFile();
|
||||
//--
|
||||
if (backupsDirectory.exists()) {
|
||||
File[] files = backupsDirectory.listFiles(File::isFile);
|
||||
@@ -182,9 +182,9 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
3
|
||||
);
|
||||
Print("Опубликовать компонент " + sComponentType);
|
||||
File componentFile = Paths.get(CommonUtils.Home, "Components", sComponentType, componentFileName).toFile();
|
||||
File versionFile = Paths.get(CommonUtils.Home, "Components", sComponentType, "version.txt").toFile();
|
||||
File backupsFolder = Paths.get(CommonUtils.Home, "Components", sComponentType, "Backups").toFile();
|
||||
File componentFile = Paths.get(CommonUtils.getHomePath(), "Components", sComponentType, componentFileName).toFile();
|
||||
File versionFile = Paths.get(CommonUtils.getHomePath(), "Components", sComponentType, "version.txt").toFile();
|
||||
File backupsFolder = Paths.get(CommonUtils.getHomePath(), "Components", sComponentType, "Backups").toFile();
|
||||
//0 архивация старой версии, если она есть.
|
||||
if (componentFile.exists()) {
|
||||
String versionText = "";
|
||||
@@ -204,7 +204,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
//2 запись версии компонента
|
||||
FileUtils.writeStringToFile(versionFile, sComponentVersion);
|
||||
//3 запись в журнал компонента
|
||||
File changesLog = Paths.get(CommonUtils.Home, "Components", sComponentType, "changes.txt").toFile();
|
||||
File changesLog = Paths.get(CommonUtils.getHomePath(), "Components", sComponentType, "changes.txt").toFile();
|
||||
FileWriter writer = new FileWriter(changesLog.getAbsolutePath(), true);
|
||||
BufferedWriter bufferWriter = new BufferedWriter(writer);
|
||||
bufferWriter.write(componentChangeRecord);
|
||||
@@ -217,11 +217,11 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
String sComponentType_ = packed_[0];
|
||||
String sComponentMinimalVersion = packed_[1];
|
||||
Print("Поднять минимальную версию компонента " + sComponentType_);
|
||||
File minimal_versionFile = Paths.get(CommonUtils.Home, "Components", sComponentType_, "minimal_version.txt").toFile();
|
||||
File minimal_versionFile = Paths.get(CommonUtils.getHomePath(), "Components", sComponentType_, "minimal_version.txt").toFile();
|
||||
FileUtils.writeStringToFile(minimal_versionFile, sComponentMinimalVersion);
|
||||
//-
|
||||
//3 запись в журнал компонента
|
||||
File changesLog_ = Paths.get(CommonUtils.Home, "Components", sComponentType_, "changes.txt").toFile();
|
||||
File changesLog_ = Paths.get(CommonUtils.getHomePath(), "Components", sComponentType_, "changes.txt").toFile();
|
||||
FileWriter writer_ = new FileWriter(changesLog_.getAbsolutePath(), true);
|
||||
BufferedWriter bufferWriter_ = new BufferedWriter(writer_);
|
||||
bufferWriter_.write("Минимальная версия поднята до " + sComponentMinimalVersion + "\n");
|
||||
@@ -233,7 +233,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
case ReceiveComponent:
|
||||
String[] packed1 = request.arg.split("\n");
|
||||
//тип/имя файла
|
||||
File componentFile1 = Paths.get(CommonUtils.Home, "Components", packed1[0], packed1[1]).toFile();
|
||||
File componentFile1 = Paths.get(CommonUtils.getHomePath(), "Components", packed1[0], packed1[1]).toFile();
|
||||
Print("Получить компонент " + packed1[0]);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = CommonUtils.fileToBytes(componentFile1);
|
||||
@@ -246,7 +246,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
LinkedHashMap<ComponentType, String> response_actual_versions_ = new LinkedHashMap<>();
|
||||
for (String sType : types) {
|
||||
ComponentType componentType = ComponentType.valueOf(sType);
|
||||
File vFile = Paths.get(CommonUtils.Home, "Components", sType, "version.txt").toFile();
|
||||
File vFile = Paths.get(CommonUtils.getHomePath(), "Components", sType, "version.txt").toFile();
|
||||
String v_string = CommonUtils.removeCharacters(
|
||||
Utils.ReadAllText(vFile),
|
||||
"\n", "\r"
|
||||
@@ -262,7 +262,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
LinkedHashMap<ComponentType, String> response_minimal_versions_ = new LinkedHashMap<>();
|
||||
for (String sType : types_) {
|
||||
ComponentType componentType = ComponentType.valueOf(sType);
|
||||
File vFile = Paths.get(CommonUtils.Home, "Components", sType, "minimal_version.txt").toFile();
|
||||
File vFile = Paths.get(CommonUtils.getHomePath(), "Components", sType, "minimal_version.txt").toFile();
|
||||
String mv_string = CommonUtils.removeCharacters(
|
||||
Utils.ReadAllText(vFile),
|
||||
"\n", "\r"
|
||||
@@ -275,7 +275,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
case GetComponentChangesLog:
|
||||
Print("Получить журнал изменений компонента " + request.arg);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = CommonUtils.fileToBytes(Paths.get(CommonUtils.Home, "Components", request.arg, "changes.txt").toFile());
|
||||
response.object = CommonUtils.fileToBytes(Paths.get(CommonUtils.getHomePath(), "Components", request.arg, "changes.txt").toFile());
|
||||
break;
|
||||
case CheckURLRegistered:
|
||||
Print("Проверить учетную запись на машине");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Repository.Subscribes;
|
||||
import Common_old.Current;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common_old.UI.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import Common.Database.Tables.FKBehaviour;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Repository.Subscribes.UI;
|
||||
import Common_old.UI.TextField.StyledTextField;
|
||||
import Common_old.UI.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import GlobalData.Account.AccountRole;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
@@ -2,7 +2,7 @@ package Repository.Subscribes.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Repository.Subscribes.Subscriber;
|
||||
public class SubscriberForm extends DBObjectDialog<Subscriber, SubscriberFields> {
|
||||
|
||||
Reference in New Issue
Block a user