no message
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Database;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Repository.BugReport.BugReport;
|
||||
import Repository.BugReport.BugReportInterface;
|
||||
@@ -40,7 +40,7 @@ public class AddBugReport extends AddObjectPass<BugReport> {
|
||||
"Черновик отчёта об ошибке.\nЗаполните описание ошибочной ситуации, и нажмите 'Опубликовать'", version);
|
||||
return true;
|
||||
} else {
|
||||
if (UI.Warning("Создать отчёт об ошибке без прикрепления проекта.")) {
|
||||
if (CommonUI.Warning("Создать отчёт об ошибке без прикрепления проекта.")) {
|
||||
target = new BugReport();
|
||||
target.genName();
|
||||
target.sender_name = Current.getAccount().name;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.UI.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.DVMParameter.DVMParameter;
|
||||
import GlobalData.DVMParameter.UI.DVMParameterFields;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Text.FileNameForm;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.FileType;
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Text.ComboTextDialog;
|
||||
import Common.Visual.Windows.Dialog.Text.ComboTextDialog;
|
||||
import ProjectData.SapforData.Functions.FuncInfo;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -2,10 +2,10 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Database;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.Machine.MachineType;
|
||||
@@ -209,7 +209,7 @@ public class CloneDVMPackage extends AddObjectPass<DVMPackage> {
|
||||
target.tasksCount++;
|
||||
}
|
||||
}
|
||||
return inexistingTests.isEmpty() || UI.Question(inexistingTests.size() + " тестов отсутствует. Продолжить");
|
||||
return inexistingTests.isEmpty() || CommonUI.Question(inexistingTests.size() + " тестов отсутствует. Продолжить");
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
|
||||
@@ -2,10 +2,10 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Database;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
import TestingSystem.Common.TasksPackageState;
|
||||
@@ -174,7 +174,7 @@ public class CloneSapforPackage extends AddObjectPass<SapforPackage> {
|
||||
*/
|
||||
//--
|
||||
return inexistingTests.isEmpty() && inexistingConfigurations.isEmpty() ||
|
||||
UI.Question(
|
||||
CommonUI.Question(
|
||||
(inexistingTests.isEmpty() ? "" : (inexistingTests.size() + " тестов отсутствует;")) +
|
||||
(inexistingConfigurations.isEmpty() ? "" : (inexistingConfigurations.size() + " конфигураций отсутствует;")) +
|
||||
"Будет добавлено " + target.package_json.tasks.size() + " задач. Продолжить"
|
||||
|
||||
@@ -41,7 +41,7 @@ public class CloseCurrentProject extends Pass_2021<db_project_info> {
|
||||
Global.files_multiselection = false;
|
||||
//--
|
||||
Current.getSapfor().ResetAllAnalyses();
|
||||
Current.getSapfor().cd(new File(CommonUtils.Home));
|
||||
Current.getSapfor().cd(CommonUtils.getHomeDirectory());
|
||||
CurrentAnchestor.set(Current.Project, null);
|
||||
CurrentAnchestor.set(Current.File, null);
|
||||
CurrentAnchestor.set(Current.Function, null);
|
||||
|
||||
@@ -18,7 +18,7 @@ public class CloseProject extends Pass_2021<db_project_info> {
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
Current.getSapfor().ResetAllAnalyses();
|
||||
Current.getSapfor().cd(new File(CommonUtils.Home));
|
||||
Current.getSapfor().cd(CommonUtils.getHomeDirectory());
|
||||
CurrentAnchestor.set(Current.Project, null);
|
||||
//-
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.Text.ComboTextDialog;
|
||||
import Common.Visual.Windows.Dialog.Text.ComboTextDialog;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import Repository.Component.Sapfor.TransformationPermission;
|
||||
@@ -47,7 +47,7 @@ public class CombineFiles extends Transformation {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
result = Paths.get(target.last_version.Home.getAbsolutePath(),
|
||||
CommonUtils.isWindows ? fd.Result : CommonUtils.toU(fd.Result)).toFile();
|
||||
CommonUtils.isWindows() ? fd.Result : CommonUtils.toU(fd.Result)).toFile();
|
||||
//-----------------------
|
||||
//получить список хедеров.
|
||||
//-----------------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
@@ -25,7 +26,7 @@ public class CompareDVMRunTasks extends Pass_2021<Vector<DVMRunTask>> {
|
||||
//--
|
||||
target = Global.testingServer.db.dvmRunTasks.getCheckedItems();
|
||||
if (target.size() == 2) {
|
||||
if (UI.Question("Назначить задачу " + CommonUtils.Brackets(target.get(0).getPK()) + " эталоном" +
|
||||
if (CommonUI.Question("Назначить задачу " + CommonUtils.Brackets(target.get(0).getPK()) + " эталоном" +
|
||||
"\n(в случае отказа, будет назначена задача " + CommonUtils.Brackets(target.get(1).getPK()) + ")")) {
|
||||
master = target.get(0);
|
||||
slave = target.get(1);
|
||||
@@ -37,11 +38,11 @@ public class CompareDVMRunTasks extends Pass_2021<Vector<DVMRunTask>> {
|
||||
} else if (target.size() == 1) {
|
||||
master = target.get(0);
|
||||
slave = null;
|
||||
return UI.Question("Отобразить задачу " + CommonUtils.Brackets(master.getPK()));
|
||||
return CommonUI.Question("Отобразить задачу " + CommonUtils.Brackets(master.getPK()));
|
||||
} else if ((target.size() == 0) && (Current.HasDVMRunTask())) {
|
||||
master = Current.getDVMRunTask();
|
||||
slave = null;
|
||||
return UI.Question("Отобразить задачу " + CommonUtils.Brackets(master.getPK()));
|
||||
return CommonUI.Question("Отобразить задачу " + CommonUtils.Brackets(master.getPK()));
|
||||
} else {
|
||||
Log.Writeln_("Для сравнения требуется отметить две задачи.\nДля отображения требуется отметить одну задачу,или выделить её.");
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
@@ -25,7 +26,7 @@ public class CompareSapforPackages extends Pass_2021<Vector<SapforPackage>> {
|
||||
//--
|
||||
target = Global.testingServer.db.sapforPackages.getCheckedItems();
|
||||
if (target.size() == 2) {
|
||||
if (UI.Question("Назначить пакет " + CommonUtils.Brackets(target.get(0).getPK()) + " эталоном" +
|
||||
if (CommonUI.Question("Назначить пакет " + CommonUtils.Brackets(target.get(0).getPK()) + " эталоном" +
|
||||
"\n(в случае отказа, будет назначен пакет " + CommonUtils.Brackets(target.get(1).getPK()) + ")")) {
|
||||
master = target.get(0);
|
||||
slave = target.get(1);
|
||||
@@ -37,11 +38,11 @@ public class CompareSapforPackages extends Pass_2021<Vector<SapforPackage>> {
|
||||
} else if (target.size() == 1) {
|
||||
master = target.get(0);
|
||||
slave = null;
|
||||
return UI.Question("Отобразить пакет " + CommonUtils.Brackets(master.getPK()));
|
||||
return CommonUI.Question("Отобразить пакет " + CommonUtils.Brackets(master.getPK()));
|
||||
} else if ((target.size() == 0) && (Current.HasSapforPackage())) {
|
||||
master = Current.getSapforPackage();
|
||||
slave = null;
|
||||
return UI.Question("Отобразить пакет " + CommonUtils.Brackets(master.getPK()));
|
||||
return CommonUI.Question("Отобразить пакет " + CommonUtils.Brackets(master.getPK()));
|
||||
} else {
|
||||
Log.Writeln_("Для сравнения требуется отметить два пакета.\nДля отображения требуется отметить один пакет,или выделить его");
|
||||
return false;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class Compile extends Pass_2021<db_project_info> {
|
||||
|
||||
switch (Current.getMachine().type) {
|
||||
case Local:
|
||||
if (CommonUtils.isWindows) {
|
||||
if (CommonUtils.isWindows()) {
|
||||
subpass = passes.get(PassCode_2021.WindowsLocalCompilation);
|
||||
} else
|
||||
subpass = passes.get(PassCode_2021.LinuxLocalCompilation);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Repository.Server.ServerCode;
|
||||
@@ -30,7 +31,7 @@ public class ConvertCorrectnessTests extends TestingSystemPass<File> {
|
||||
if (!CurrentAnchestor.Check(Log, Current.ServerSapfor)){
|
||||
return false;
|
||||
}
|
||||
return UI.Warning("Загрузить полный пакет DVM тестов на корректность и производительность.");
|
||||
return CommonUI.Warning("Загрузить полный пакет DVM тестов на корректность и производительность.");
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import Common_old.Utils.Utils;
|
||||
import Visual_DVM_2021.Passes.CurrentProjectPass;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
@@ -62,7 +62,7 @@ public class CopyProject extends CurrentProjectPass {
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
if (UI.Question("копия текущего проекта успешно создана по адресу\n" + dstFile.getAbsolutePath() + "\nОткрыть её")) {
|
||||
if (CommonUI.Question("копия текущего проекта успешно создана по адресу\n" + dstFile.getAbsolutePath() + "\nОткрыть её")) {
|
||||
passes.get(PassCode_2021.CloseCurrentProject).Do();
|
||||
passes.get(PassCode_2021.OpenCurrentProject).Do(dstFile);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Text.FileNameForm;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import Visual_DVM_2021.Passes.ChangeFilePass;
|
||||
import Visual_DVM_2021.Passes.PassException;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.Text.FileNameForm;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.PassException;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
@@ -46,7 +46,7 @@ public class CreateTestsGroupFromSelectedVersions extends PublishTests {
|
||||
return false;
|
||||
}
|
||||
//---
|
||||
return UI.Question("В группу " + CommonUtils.Brackets(group.description) +
|
||||
return CommonUI.Question("В группу " + CommonUtils.Brackets(group.description) +
|
||||
"\nбудет добавлено " + target.size() + " тестов.\nПродолжить");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus_2023.PassMenuItem;
|
||||
import Common_old.UI.UI;
|
||||
@@ -140,7 +141,7 @@ public class DVMConvertProject extends ComponentsRepositoryPass<db_project_info>
|
||||
Current.getFile().form.FocusCompilationOut();
|
||||
}
|
||||
if (!badFiles.isEmpty())
|
||||
UI.Error(badFiles);
|
||||
CommonUI.Error(badFiles);
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -27,7 +28,7 @@ public class DeleteDirectory extends ChangeFilePass {
|
||||
Log.Writeln("Нельзя удалять домашнюю папку проекта.");
|
||||
return false;
|
||||
}
|
||||
return (UI.Warning("Удалить папку\n" + CommonUtils.Brackets(target_dir.getAbsolutePath())
|
||||
return (CommonUI.Warning("Удалить папку\n" + CommonUtils.Brackets(target_dir.getAbsolutePath())
|
||||
+ "\n и всё её содержимое."));
|
||||
} else Log.Writeln_("Папка не выделена.");
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.FileObject.DirInfo;
|
||||
import GlobalData.FileObject.DirInfosDataSet;
|
||||
@@ -23,7 +25,7 @@ public class DeleteDownloadedBugReports extends Pass_2021<DirInfosDataSet> {
|
||||
target = (DirInfosDataSet) passes.get(PassCode_2021.GetOldBugReports).target;
|
||||
if (target.Data.isEmpty()){
|
||||
Log.Writeln_("Не найдено отчетов, не использовавшихся " +
|
||||
Global.getSetting(SettingName.BugReportsAgeLimit).toInt32() +
|
||||
((GlobalDatabase) CommonUtils.db).settings.get(SettingName.BugReportsAgeLimit).toInt32() +
|
||||
" месяцев и более!");
|
||||
return false;
|
||||
}
|
||||
@@ -47,7 +49,7 @@ public class DeleteDownloadedBugReports extends Pass_2021<DirInfosDataSet> {
|
||||
}
|
||||
};
|
||||
if (dialog.ShowDialog("Найдено "+target.size()+" отчетов, не использовавшихся " +
|
||||
Global.getSetting(SettingName.BugReportsAgeLimit).toInt32()+
|
||||
((GlobalDatabase)CommonUtils.db).settings.get(SettingName.BugReportsAgeLimit).toInt32()+
|
||||
" месяцев и более. Удалить?")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -16,7 +17,7 @@ public class DeleteFile extends ChangeFilePass<DBProjectFile> {
|
||||
protected boolean canStart(Object... args) {
|
||||
resetArgs();
|
||||
return (CurrentAnchestor.Check(Log, Current.SelectedFile)) &&
|
||||
UI.Warning("Удалить файл "
|
||||
CommonUI.Warning("Удалить файл "
|
||||
+ CommonUtils.Brackets((target = Current.getSelectedFile()).name));
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -17,7 +18,7 @@ public class DeleteSelectedFiles extends Pass_2021 {
|
||||
Log.Writeln_("Не отмечено ни одного файла.");
|
||||
return false;
|
||||
}
|
||||
return UI.Warning("Удалить " + Current.getProject().db.files.getCheckedCount() + " файлов.");
|
||||
return CommonUI.Warning("Удалить " + Current.getProject().db.files.getCheckedCount() + " файлов.");
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
@@ -45,7 +45,7 @@ public class DeleteSelectedVersions extends Pass_2021<Vector<db_project_info>> {
|
||||
}
|
||||
}
|
||||
}
|
||||
return UI.Warning("Удалить " + q + " версий.");
|
||||
return CommonUI.Warning("Удалить " + q + " версий.");
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -21,8 +22,8 @@ public class DeleteVersion extends Pass_2021<db_project_info> {
|
||||
current = (Current.getVersion() != null) && Current.getVersion().Home.equals(target.Home);
|
||||
return true;
|
||||
} else {
|
||||
if (((target = Current.getVersion()) != null) && (!CommonUtils.hasUI() ||
|
||||
UI.Warning("Удалить " +
|
||||
if (((target = Current.getVersion()) != null) && (!CommonUI.isActive() ||
|
||||
CommonUI.Warning("Удалить " +
|
||||
((Current.HasProject() && target.Home.equals(Current.getProject().Home)) ? "текущий проект" : "версию ")
|
||||
+ CommonUtils.Brackets(target.name)))) {
|
||||
current = true;
|
||||
@@ -39,7 +40,7 @@ public class DeleteVersion extends Pass_2021<db_project_info> {
|
||||
if ((Current.getProject().Home.getAbsolutePath().startsWith(target.Home.getAbsolutePath())))
|
||||
passes.get(PassCode_2021.CloseCurrentProject).Do();
|
||||
}
|
||||
if (CommonUtils.hasUI()) {
|
||||
if (CommonUI.isActive()) {
|
||||
UI.getVersionsWindow().RemoveVersionFromComparison(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
@@ -54,7 +55,7 @@ public class DownloadProject extends CurrentConnectionPass {
|
||||
File project = Paths.get(Global.visualiser.getWorkspace().getAbsolutePath(),
|
||||
CommonUtils.getDateName(src.name)).toFile();
|
||||
if (passes.get(PassCode_2021.UnzipFolderPass).Do(local_archive.getAbsolutePath(), project.getAbsolutePath())) {
|
||||
if (UI.Question("Проект " + CommonUtils.Brackets(src.name) + " успешно загружен. Открыть его"))
|
||||
if (CommonUI.Question("Проект " + CommonUtils.Brackets(src.name) + " успешно загружен. Открыть его"))
|
||||
passes.get(PassCode_2021.OpenCurrentProject).Do(project);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -50,7 +50,7 @@ public class DownloadTest extends TestingSystemPass<Test> {
|
||||
target.getArchive().getAbsolutePath(),
|
||||
Global.visualiser.getWorkspace().getAbsolutePath(), false
|
||||
))
|
||||
if (UI.Question("Тестовый проект успешно загружен под именем\n" +
|
||||
if (CommonUI.Question("Тестовый проект успешно загружен под именем\n" +
|
||||
CommonUtils.Brackets(target.getHomePath().getName()) +
|
||||
"\nОткрыть его"))
|
||||
passes.get(PassCode_2021.OpenCurrentProject).Do(target.getHomePath());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Repository.EmailMessage;
|
||||
import Repository.Subscribes.Subscriber;
|
||||
import Repository.Subscribes.UI.SubscriberForm;
|
||||
@@ -46,13 +46,13 @@ public class EditAccount extends Email {
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
if (attempt != null) {
|
||||
if (attempt.equals(password)) {
|
||||
UI.Info("Почта успешно подтверждена!");
|
||||
CommonUI.Info("Почта успешно подтверждена!");
|
||||
return true;
|
||||
} else {
|
||||
UI.Error("Неверный код активации.\nПовторите попытку.");
|
||||
CommonUI.Error("Неверный код активации.\nПовторите попытку.");
|
||||
}
|
||||
} else {
|
||||
UI.Info("Подтверждение почты отменено");
|
||||
CommonUI.Info("Подтверждение почты отменено");
|
||||
return false;
|
||||
}
|
||||
} while (true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.SessionMaxtimeDialog;
|
||||
import Common.Visual.Windows.Dialog.SessionMaxtimeDialog;
|
||||
import Visual_DVM_2021.Passes.CurrentProjectPass;
|
||||
public class EditProjectCompilationMaxtime extends CurrentProjectPass {
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.SessionMaxtimeDialog;
|
||||
import Common.Visual.Windows.Dialog.SessionMaxtimeDialog;
|
||||
import Visual_DVM_2021.Passes.CurrentProjectPass;
|
||||
public class EditProjectRunMaxtime extends CurrentProjectPass {
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ public class EraseBadSymbols extends Transformation {
|
||||
res_text.append(CommonUtils.Translit(c));
|
||||
else res_text.append(' ');
|
||||
}
|
||||
File dst = Paths.get(target.last_version.Home.getAbsolutePath(), CommonUtils.isWindows ? file.name : file.name.replace('\\', '/')).toFile();
|
||||
File dst = Paths.get(target.last_version.Home.getAbsolutePath(), CommonUtils.isWindows() ? file.name : file.name.replace('\\', '/')).toFile();
|
||||
FileUtils.write(dst, res_text.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Files.VDirectoryChooser;
|
||||
import Common.Utils.Index;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -398,7 +398,7 @@ public class ExportDVMPackageToExcel extends Pass_2021<Vector<DVMPackage>> {
|
||||
protected void performDone() throws Exception {
|
||||
super.performDone();
|
||||
if (Desktop.isDesktopSupported()) {
|
||||
if (UI.Question("Таблица сформирована в файле\n" + CommonUtils.DQuotes(res.getAbsolutePath()) + ".\nОткрыть её"
|
||||
if (CommonUI.Question("Таблица сформирована в файле\n" + CommonUtils.DQuotes(res.getAbsolutePath()) + ".\nОткрыть её"
|
||||
)) {
|
||||
Desktop.getDesktop().open(res);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class GCOV extends Precompilation {
|
||||
return new File(workspace, getBinaryName());
|
||||
}
|
||||
protected String getBinaryName() {
|
||||
return CommonUtils.isWindows ? "0.exe" : "0";
|
||||
return CommonUtils.isWindows() ? "0.exe" : "0";
|
||||
}
|
||||
@Override
|
||||
public boolean needsConfirmations() {
|
||||
@@ -67,7 +67,7 @@ public class GCOV extends Precompilation {
|
||||
if (getBinary().exists()) {
|
||||
ShowMessage1("Запуск для GCOV");
|
||||
name_to_kill = "0.exe";
|
||||
StartProcess(CommonUtils.isWindows?"0.exe":"./0", target.run_maxtime);
|
||||
StartProcess(CommonUtils.isWindows()?"0.exe":"./0", target.run_maxtime);
|
||||
target.updateRunOut(output);
|
||||
} else {
|
||||
Log.Writeln_("Не удалось собрать проект.");
|
||||
@@ -93,7 +93,7 @@ public class GCOV extends Precompilation {
|
||||
target.db.Update(file);
|
||||
File targetGcov = Paths.get(
|
||||
target.getGCOVDirectory().getAbsolutePath(),
|
||||
(CommonUtils.isWindows?file.name:file.getUnixName()) + ".gcov").toFile();
|
||||
(CommonUtils.isWindows()?file.name:file.getUnixName()) + ".gcov").toFile();
|
||||
Files.copy(gcov.toPath(), targetGcov.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.UI.UI;
|
||||
import Visual_DVM_2021.Passes.CurrentProjectPass;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
@@ -27,7 +28,7 @@ public class GenerateParallelVariants extends CurrentProjectPass {
|
||||
Log.Writeln_("Количество вариантов " + amount + "\nпревышает 1600. Отображение запрещено.");
|
||||
return false;
|
||||
}
|
||||
return UI.Question("Будет отображено " + amount + " вариантов. Хотите продолжить");
|
||||
return CommonUI.Question("Будет отображено " + amount + " вариантов. Хотите продолжить");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.FileObject.DirInfo;
|
||||
@@ -28,7 +30,7 @@ public class GetOldBugReports extends Pass_2021<DirInfosDataSet> {
|
||||
//---
|
||||
Calendar c = new GregorianCalendar();
|
||||
c.setTimeInMillis(System.currentTimeMillis());
|
||||
c.add(Calendar.MONTH, -Global.getSetting(SettingName.BugReportsAgeLimit).toInt32());
|
||||
c.add(Calendar.MONTH, -((GlobalDatabase) CommonUtils.db).settings.get(SettingName.BugReportsAgeLimit).toInt32());
|
||||
Date date = c.getTime();
|
||||
System.out.println(date);
|
||||
long border = date.getTime();
|
||||
|
||||
@@ -17,13 +17,13 @@ public class LocalInitaliseUser extends ProcessPass<User> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
File workspace = Paths.get(CommonUtils.Home, "User").toFile();
|
||||
File workspace = new File(CommonUtils.getHomeDirectory(), "User");
|
||||
target.workspace = workspace.getAbsolutePath();
|
||||
Utils.CheckAndCleanDirectory(workspace);
|
||||
FileUtils.forceMkdir(target.getLocalProjectsDir());
|
||||
FileUtils.forceMkdir(target.getLocalModulesDir());
|
||||
//-
|
||||
if (!CommonUtils.isWindows) {
|
||||
if (!CommonUtils.isWindows()) {
|
||||
File headerCode = target.getHeaderCodeFile();
|
||||
//-
|
||||
File starterCode = target.getStarterCodeFile();
|
||||
|
||||
@@ -30,7 +30,7 @@ public class OpenBugReportTestProject extends Pass_2021<BugReport> {
|
||||
root = Paths.get(Global.visualiser.getWorkspace().getAbsolutePath(),
|
||||
target.id).toFile();
|
||||
project = Paths.get(root.getAbsolutePath(),
|
||||
CommonUtils.isWindows ? CommonUtils.toW(target.project_version)
|
||||
CommonUtils.isWindows() ? CommonUtils.toW(target.project_version)
|
||||
: CommonUtils.toU(target.project_version)).toFile();
|
||||
return true;
|
||||
}else {
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import GlobalData.Compiler.Compiler;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.CompilerEnvironment.CompilerEnvironment;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import GlobalData.Compiler.Compiler;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.CompilerEnvironment.CompilerEnvironment;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import GlobalData.Compiler.Compiler;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.CompilerOption.CompilerOption;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
@@ -49,7 +50,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = Current.getProject();
|
||||
if (CommonUtils.isWindows) {
|
||||
if (CommonUtils.isWindows()) {
|
||||
//--
|
||||
makepath = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.LocalMakePathWindows).toString();
|
||||
if (makepath.isEmpty()) {
|
||||
@@ -185,7 +186,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
if (CommonUtils.isWindows) {
|
||||
if (CommonUtils.isWindows()) {
|
||||
name_to_kill = "make.exe";
|
||||
StartProcess(CommonUtils.DQuotes(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.Kernels).toString(),
|
||||
target.compilation_maxtime);
|
||||
@@ -247,14 +248,14 @@ public class Precompilation extends Pass_2021<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
public void Interrupt() throws Exception {
|
||||
if (CommonUtils.isWindows) {
|
||||
if (CommonUtils.isWindows()) {
|
||||
if (!name_to_kill.isEmpty()) {
|
||||
killed = true;
|
||||
Process killer = Runtime.getRuntime().exec("taskkill /FI \"IMAGENAME eq " + name_to_kill + "\" /F /T");
|
||||
killer.waitFor();
|
||||
}
|
||||
} else {
|
||||
UI.Info("Прерывание процессов под Linux не реализовано");
|
||||
CommonUI.Info("Прерывание процессов под Linux не реализовано");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
@@ -32,7 +33,7 @@ public class PublishBugReport extends Pass_2021<BugReport> {
|
||||
}
|
||||
if (target.executor.isEmpty()) {
|
||||
UI.getMainWindow().getCallbackWindow().FocusRecipients();
|
||||
if (!UI.Question("Для отчёта об ошибке не назначен исполнитель.\nВсе равно опубликовать его"))
|
||||
if (!CommonUI.Question("Для отчёта об ошибке не назначен исполнитель.\nВсе равно опубликовать его"))
|
||||
return false;
|
||||
}
|
||||
if (!Current.getAccount().CheckAccessRights(target.sender_address, Log) && (BugReportInterface.CheckDraft(target, Log))) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!CommonUtils.isWindows) {
|
||||
if (!CommonUtils.isWindows()) {
|
||||
Log.Writeln_("Публикация компонент разрешена только для Windows");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.UI.UI;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -66,7 +67,7 @@ public abstract class PublishTests extends TestingSystemPass<Vector<Test>> {
|
||||
return false;
|
||||
}
|
||||
//---
|
||||
return UI.Question("В группу " + CommonUtils.Brackets(group.description) +
|
||||
return CommonUI.Question("В группу " + CommonUtils.Brackets(group.description) +
|
||||
"\nбудет добавлено " + target.size() + " тестов.\nПродолжить");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Text.FileNameForm;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import Visual_DVM_2021.Passes.ChangeFilePass;
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Text.FileNameForm;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.FileType;
|
||||
import Visual_DVM_2021.Passes.ChangeFilePass;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Files.VFileChooser;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Settings.SettingName;
|
||||
@@ -92,7 +92,7 @@ public class ReplaceTestsFromFiles extends TestingSystemPass<Vector<Test>> {
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if (UI.Question(
|
||||
if (CommonUI.Question(
|
||||
testForReplaceNames.size() + " тестов будет заменено,\n" +
|
||||
newTestsNames.size() + " тестов будет добавлено.\n" +
|
||||
"Продолжить"
|
||||
|
||||
@@ -4,7 +4,7 @@ import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Menus_2023.PassMenuItem;
|
||||
import Common_old.UI.Trees.DataTree;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import Repository.Server.ServerCode;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class Run extends Pass_2021<db_project_info> {
|
||||
protected void body() throws Exception {
|
||||
switch (Current.getMachine().type) {
|
||||
case Local:
|
||||
if (CommonUtils.isWindows) {
|
||||
if (CommonUtils.isWindows()) {
|
||||
subpass = passes.get(PassCode_2021.WindowsLocalRun);
|
||||
} else
|
||||
subpass = passes.get(PassCode_2021.LinuxLocalRun);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Mode;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import ProjectData.SapforData.Variants.ParallelVariant;
|
||||
import Repository.Component.Sapfor.TransformationPermission;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
@@ -66,15 +65,11 @@ public class SPF_CreateParallelVariant extends SapforTransformation {
|
||||
protected void performDone() throws Exception {
|
||||
Global.transformationPermission = TransformationPermission.VariantsOnly;
|
||||
target.migrateFilesSettings(target.last_version, true, true);
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
variant.UpdateStats(sapfor.getPredictorStats(), target.last_version.name);
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
//в пакетном режиме вариант всегда один. поэтому, сообщения надо распаковать сразу.
|
||||
if (CommonUtils.mode.equals(Mode.Package))
|
||||
super.performFinish();
|
||||
}
|
||||
protected void performFinish() throws Exception {}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.UI.UI;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
@@ -30,7 +31,7 @@ public class SPF_GetArrayDistribution extends SPF_GetArrayDistributionOnlyAnalys
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.MPI_PROGRAM).toBoolean()) {
|
||||
UI.Info("Включена настройка SAPFOR 'MPI программа'." +
|
||||
CommonUI.Info("Включена настройка SAPFOR 'MPI программа'." +
|
||||
"\nПостроение распределения данных невозможно.");
|
||||
passes.get(PassCode_2021.SPF_SharedMemoryParallelization).Do();
|
||||
return false;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Visual_DVM_2021.Passes.PassState;
|
||||
import Common_old.UI.Menus_2023.PassControl;
|
||||
import Common_old.UI.UI;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.SilentSapforPass;
|
||||
@@ -21,7 +21,7 @@ public class SPF_GetGCovInfo extends SilentSapforPass {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (UI.Question("Все анализы будут сброшены.Продолжить")) {
|
||||
if (CommonUI.Question("Все анализы будут сброшены.Продолжить")) {
|
||||
SPF_ParseFilesWithOrder.silent = true;
|
||||
return super.canStart(args) && passes.get(PassCode_2021.GCOV).Do()&&passes.get(PassCode_2021.SPF_ParseFilesWithOrder).Do();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import ProjectData.SapforData.Arrays.Distribution.Dimension;
|
||||
import ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import ProjectData.SapforData.Regions.ParallelRegion;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -43,7 +45,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
|
||||
precompilation_done = false;
|
||||
boolean res = (
|
||||
silent ||
|
||||
(!Global.getSetting(SettingName.Precompilation).toBoolean() ||
|
||||
(!((GlobalDatabase)CommonUtils.db).settings.get(SettingName.Precompilation).toBoolean() ||
|
||||
(precompilation_done = passes.get(PassCode_2021.Precompilation).Do())))
|
||||
&& super.canStart(args) && checkActiveFiles();
|
||||
return res;
|
||||
@@ -111,7 +113,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
|
||||
protected void performPreparation() throws Exception {
|
||||
super.performPreparation(); //удаление интеррупта.
|
||||
//------------------------------------------------------------------------------------------>>> пакетный режим.
|
||||
if (!precompilation_done && CommonUtils.hasUI()) {
|
||||
if (!precompilation_done && CommonUI.isActive()) {
|
||||
passes.get(PassCode_2021.Save).Do();
|
||||
target.CleanAnalyses();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
@@ -63,6 +64,6 @@ public class SaveGraph extends Pass_2021<File> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.Info("Граф успешно сохранен в файл: " + CommonUtils.Brackets(target.getAbsolutePath()));
|
||||
CommonUI.Info("Граф успешно сохранен в файл: " + CommonUtils.Brackets(target.getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import GlobalData.Compiler.Compiler;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import GlobalData.Compiler.Compiler;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Machine.MachineType;
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.Component.Component;
|
||||
import Repository.Server.ServerCode;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common_old.UI.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import Repository.Server.ServerCode;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.User.UserState;
|
||||
@@ -63,6 +63,6 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
|
||||
Log.Writeln_("Задач не найдено.");
|
||||
return false;
|
||||
}
|
||||
return UI.Question("Будет запущено " + target.tasksCount + " задач. Продолжить");
|
||||
return CommonUI.Question("Будет запущено " + target.tasksCount + " задач. Продолжить");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
|
||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
@@ -50,6 +50,6 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
|
||||
Log.Writeln_("Не сформировано ни одной новой задачи.");
|
||||
return false;
|
||||
}
|
||||
return (UI.Question("Будет запущено " + target.tasksCount + " задач. Продолжить"));
|
||||
return (CommonUI.Question("Будет запущено " + target.tasksCount + " задач. Продолжить"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.PercentsForm;
|
||||
import Common.Visual.Windows.Dialog.PercentsForm;
|
||||
public class UpdateBugReportProgress extends UpdateBugReportField {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class UpdateComponent extends Pass_2021<Component> {
|
||||
switch (Current.getComponent().getComponentType()) {
|
||||
case Sapfor_F:
|
||||
case Visualizer_2:
|
||||
subPass = CommonUtils.isWindows ? PassCode_2021.DownloadComponent : PassCode_2021.BuildComponent;
|
||||
subPass = CommonUtils.isWindows() ? PassCode_2021.DownloadComponent : PassCode_2021.BuildComponent;
|
||||
break;
|
||||
case Visualiser:
|
||||
case Instruction:
|
||||
|
||||
@@ -4,10 +4,10 @@ import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.PercentsForm;
|
||||
import Common_old.UI.Windows.Dialog.SliderNumberForm;
|
||||
import Common_old.UI.Windows.Dialog.SpinnerNumberForm;
|
||||
import Common_old.UI.Windows.Dialog.Text.TextFieldDialog;
|
||||
import Common.Visual.Windows.Dialog.PercentsForm;
|
||||
import Common.Visual.Windows.Dialog.SliderNumberForm;
|
||||
import Common.Visual.Windows.Dialog.SpinnerNumberForm;
|
||||
import Common.Visual.Windows.Dialog.Text.TextFieldDialog;
|
||||
import Common_old.Utils.Files.VDirectoryChooser;
|
||||
import Common_old.Utils.Files.VFileChooser;
|
||||
import Common_old.Utils.Utils;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Windows.Dialog.Text.FileNameForm;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import ProjectData.Project.db_project_info;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersion_json;
|
||||
@@ -35,7 +36,7 @@ public abstract class OpenSapforVersionPass extends Pass_2021<SapforVersion_json
|
||||
protected void body() throws Exception {
|
||||
SapforTask task = target.task;
|
||||
ShowMessage1("Построение дерева версий и создание баз данных...");
|
||||
File rootHome = Paths.get(Global.getSetting(SettingName.Workspace).Value,
|
||||
File rootHome = Paths.get(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.Workspace).Value,
|
||||
CommonUtils.getDateName(task.test_description)).toFile();
|
||||
for (SapforVersion_json version_json : task.versions) {
|
||||
ShowMessage2(version_json.version);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
@@ -191,30 +192,30 @@ public class Pass_2021<T> {
|
||||
//-
|
||||
private void PerformCanNotStart() throws Exception {
|
||||
performCanNotStart();
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
showCanNotStart();
|
||||
}
|
||||
protected void PerformPreparation() throws Exception {
|
||||
performPreparation();
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
showPreparation();
|
||||
}
|
||||
private void PerformFinish() throws Exception {
|
||||
performFinish();
|
||||
//-
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
showFinish();
|
||||
}
|
||||
private void PerformDone() throws Exception {
|
||||
performDone();
|
||||
//-
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
showDone();
|
||||
}
|
||||
private void PerformFail() throws Exception {
|
||||
performFail();
|
||||
//-
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
showFail();
|
||||
}
|
||||
//------
|
||||
@@ -246,7 +247,7 @@ public class Pass_2021<T> {
|
||||
Vector<String> ToPrint = new Vector<>();
|
||||
createStack_r(ToDo, ToPrint);
|
||||
if (Global.properties.ConfirmPassesStart && !ToPrint.isEmpty() &&
|
||||
!UI.Question("Выполнить проход(ы):\n" + String.join("\n", ToPrint))
|
||||
!CommonUI.Question("Выполнить проход(ы):\n" + String.join("\n", ToPrint))
|
||||
) return false;
|
||||
while (ToDo.size() > 1) {
|
||||
if (!ToDo.pop().start()) return false;
|
||||
@@ -257,7 +258,7 @@ public class Pass_2021<T> {
|
||||
//-
|
||||
if (Global.properties.ShowPassesDone && !ToPrint.isEmpty()
|
||||
) {
|
||||
UI.Info("Проход(ы)\n\n" + String.join("\n", ToPrint) +
|
||||
CommonUI.Info("Проход(ы)\n\n" + String.join("\n", ToPrint) +
|
||||
"\nуспешно выполнен(ы)!");
|
||||
}
|
||||
//-
|
||||
@@ -271,7 +272,7 @@ public class Pass_2021<T> {
|
||||
return false;
|
||||
}
|
||||
public void Interrupt() throws Exception {
|
||||
UI.Info("Проход " + CommonUtils.Brackets(getDescription()) + " не разрешено прерывать.");
|
||||
CommonUI.Info("Проход " + CommonUtils.Brackets(getDescription()) + " не разрешено прерывать.");
|
||||
}
|
||||
public boolean needsConfirmations() {
|
||||
return false;
|
||||
@@ -298,11 +299,11 @@ public class Pass_2021<T> {
|
||||
timer.Start();
|
||||
//------------------------------->
|
||||
try {
|
||||
if (CommonUtils.hasUI()) FocusBeforeStart();
|
||||
if (CommonUI.isActive()) FocusBeforeStart();
|
||||
if (canStart(args)) {
|
||||
PerformPreparation();
|
||||
//todo тут должна быть вилка на анимацию?
|
||||
if (CommonUtils.hasUI() && needsAnimation()) {
|
||||
if (CommonUI.isActive() && needsAnimation()) {
|
||||
animation_sem = new Semaphore(1);
|
||||
animation_sem.acquire();
|
||||
//---
|
||||
@@ -386,8 +387,8 @@ public class Pass_2021<T> {
|
||||
" окончен за " + timer.Print() +
|
||||
" состояние " + CommonUtils.Brackets(state.getDescription())
|
||||
);
|
||||
if (!Log.isEmpty() && CommonUtils.hasUI())
|
||||
UI.Error(
|
||||
if (!Log.isEmpty() && CommonUI.isActive())
|
||||
CommonUI.Error(
|
||||
"проход " + CommonUtils.Brackets(getDescription()) + "\n" + state.getDescription() + "\n\n" +
|
||||
Log.toString());
|
||||
}
|
||||
@@ -396,7 +397,7 @@ public class Pass_2021<T> {
|
||||
}
|
||||
//--
|
||||
public void ShowSapforMessage(String message) {
|
||||
if (CommonUtils.hasUI() && form != null) {
|
||||
if (CommonUI.isActive() && form != null) {
|
||||
String[] data = message.split(":");
|
||||
switch (data[0]) {
|
||||
case "message_1":
|
||||
|
||||
@@ -61,7 +61,7 @@ public abstract class ProcessPass<T> extends Pass_2021<T> {
|
||||
return brStdout.readLine();
|
||||
}
|
||||
public void PerformScript(String script_text) throws Exception {
|
||||
PerformScript(Utils.CreateTempFile("script", CommonUtils.isWindows ? "bat" : "", script_text), true);
|
||||
PerformScript(Utils.CreateTempFile("script", CommonUtils.isWindows() ? "bat" : "", script_text), true);
|
||||
}
|
||||
public void PerformScript(File script, boolean wait) throws Exception {
|
||||
if (!script.setExecutable(true)) throw new PassException("Не удалось создать исполняемый файл для скрипта");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.DebugPrintLevel;
|
||||
import Common_old.UI.Menus_2023.PassControl;
|
||||
@@ -48,7 +49,7 @@ public class SapforAnalysis extends SapforPass {
|
||||
@Override
|
||||
protected void PerformPreparation() throws Exception {
|
||||
//-
|
||||
if (CommonUtils.hasUI())
|
||||
if (CommonUI.isActive())
|
||||
showPreparation(); // отображение пустых данных
|
||||
//-
|
||||
performPreparation(); //в данном случае удаление данных
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import GlobalData.Settings.SettingName;
|
||||
public class SapforFilesModification extends SapforModification {
|
||||
@@ -10,7 +12,7 @@ public class SapforFilesModification extends SapforModification {
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
super.performPreparation();
|
||||
if (Global.getSetting(SettingName.SaveModifications).toBoolean()) {
|
||||
if (((GlobalDatabase) CommonUtils.db).settings.get(SettingName.SaveModifications).toBoolean()) {
|
||||
Current.getProject().createModification();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.CurrentAnchestor;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import Common.Database.Database;
|
||||
import Common_old.UI.UI;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.UI.VisualCache.VisualCaches;
|
||||
import Repository.RepositoryServer;
|
||||
import Repository.Server.ServerCode;
|
||||
@@ -37,7 +37,7 @@ public class DeleteServerObjects <S extends RepositoryServer, D extends DBObject
|
||||
DBTable table =getDb().tables.get(d);
|
||||
if (table.getCheckedCount()>0) {
|
||||
target = table.getCheckedKeys();
|
||||
return UI.Warning(table.getCheckedCount()+" объектов будет удален(о).");
|
||||
return CommonUI.Warning(table.getCheckedCount()+" объектов будет удален(о).");
|
||||
}
|
||||
else {
|
||||
if (CurrentAnchestor.Check(Log, table.CurrentName())){
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.Common.TasksPackageState;
|
||||
@@ -36,7 +36,7 @@ public abstract class StartTestingPackage<P extends TestingPackage> extends Publ
|
||||
Log.Writeln_("В пакете отсутствуют задачи.");
|
||||
return false;
|
||||
}
|
||||
if (UI.Question("Будет запущено:\n"
|
||||
if (CommonUI.Question("Будет запущено:\n"
|
||||
+ target.tasksCount + " задач.\n" +
|
||||
"Продолжить")) {
|
||||
target.state = TasksPackageState.Queued;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.UI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.TextField.StyledTextField;
|
||||
import Common_old.UI.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import Common_old.Utils.Files.VDirectoryChooser;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.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 Visual_DVM_2021.Passes.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import java.awt.event.WindowAdapter;
|
||||
|
||||
Reference in New Issue
Block a user