no message
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user