2024-10-07 00:58:29 +03:00
|
|
|
|
package Common_old;
|
2024-10-08 00:39:13 +03:00
|
|
|
|
import Common.CurrentAnchestor;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
import GlobalData.Account.Account;
|
|
|
|
|
|
import GlobalData.Compiler.Compiler;
|
|
|
|
|
|
import GlobalData.Machine.Machine;
|
|
|
|
|
|
import GlobalData.Makefile.Makefile;
|
|
|
|
|
|
import GlobalData.Module.Module;
|
|
|
|
|
|
import GlobalData.RemoteFile.RemoteFile;
|
|
|
|
|
|
import GlobalData.RunConfiguration.RunConfiguration;
|
|
|
|
|
|
import GlobalData.Tasks.CompilationTask.CompilationTask;
|
|
|
|
|
|
import GlobalData.Tasks.RunTask.RunTask;
|
|
|
|
|
|
import GlobalData.User.User;
|
|
|
|
|
|
import ProjectData.Files.DBProjectFile;
|
|
|
|
|
|
import ProjectData.Project.db_project_info;
|
|
|
|
|
|
import ProjectData.SapforData.Functions.FuncInfo;
|
|
|
|
|
|
import ProjectData.SapforData.Regions.ParallelRegion;
|
2023-11-19 02:12:44 +03:00
|
|
|
|
import Repository.BugReport.BugReport;
|
|
|
|
|
|
import Repository.Subscribes.Subscriber;
|
2023-12-05 16:15:12 +03:00
|
|
|
|
import TestingSystem.Common.Test.Test;
|
2024-09-16 15:41:43 +03:00
|
|
|
|
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
|
2023-12-05 16:15:12 +03:00
|
|
|
|
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
|
2024-09-27 22:50:47 +03:00
|
|
|
|
import TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
2023-11-19 02:12:44 +03:00
|
|
|
|
import Visual_DVM_2021.Passes.UI.PassForm;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
|
|
|
|
|
|
import javax.swing.tree.DefaultMutableTreeNode;
|
|
|
|
|
|
import java.io.File;
|
2024-10-08 00:39:13 +03:00
|
|
|
|
public enum Current implements CurrentAnchestor {
|
2023-09-17 22:13:42 +03:00
|
|
|
|
//--
|
2023-12-11 02:00:28 +03:00
|
|
|
|
DVMPackage,
|
2023-12-15 18:38:05 +03:00
|
|
|
|
SapforPackage,
|
2023-12-11 02:00:28 +03:00
|
|
|
|
//--
|
2023-10-03 15:07:17 +03:00
|
|
|
|
ServerSapfor,
|
2024-10-08 00:39:13 +03:00
|
|
|
|
SapforEtalonVersion,
|
2023-10-30 22:37:03 +03:00
|
|
|
|
SapforVersion,
|
|
|
|
|
|
//--
|
2023-09-17 22:13:42 +03:00
|
|
|
|
ComponentServerBackup,
|
|
|
|
|
|
Subscriber,
|
|
|
|
|
|
FileGraphElement,
|
|
|
|
|
|
InlineGraphElement,
|
|
|
|
|
|
InlineGraphElement2,
|
|
|
|
|
|
IncludeGraphElement,
|
|
|
|
|
|
Component,
|
|
|
|
|
|
Project,
|
|
|
|
|
|
File,
|
|
|
|
|
|
Root,
|
|
|
|
|
|
Version,
|
|
|
|
|
|
BugReport,
|
|
|
|
|
|
Account,
|
|
|
|
|
|
DBArray,
|
|
|
|
|
|
ProjectArray,
|
|
|
|
|
|
ParallelRegionInfo,
|
|
|
|
|
|
ParallelVariant,
|
|
|
|
|
|
Machine,
|
|
|
|
|
|
User,
|
|
|
|
|
|
Compiler,
|
|
|
|
|
|
Makefile,
|
|
|
|
|
|
Module,
|
|
|
|
|
|
RunConfiguration,
|
|
|
|
|
|
EnvironmentValue,
|
|
|
|
|
|
CompilationTask,
|
|
|
|
|
|
RunTask,
|
|
|
|
|
|
ProjectNode, //узел в дереве проекта. нужен для отображения добавленных файлов
|
|
|
|
|
|
SelectedDirectory,
|
|
|
|
|
|
SelectedFile,
|
|
|
|
|
|
//текущий выбранный удаленный файл
|
|
|
|
|
|
RemoteFile,
|
|
|
|
|
|
PassForm, //текущее окно анимации. нужно для сообщений сапфора по сокету.
|
|
|
|
|
|
RunStsRecord,
|
|
|
|
|
|
//только для того, чтобы закодировать таблицу.
|
|
|
|
|
|
Array,
|
|
|
|
|
|
ParallelRegion,
|
|
|
|
|
|
Dimensions,
|
|
|
|
|
|
//----------
|
|
|
|
|
|
Warnings,
|
|
|
|
|
|
Errors,
|
|
|
|
|
|
Notes,
|
|
|
|
|
|
Recommendations,
|
|
|
|
|
|
//-
|
|
|
|
|
|
Sapfor,
|
|
|
|
|
|
//-
|
|
|
|
|
|
Scenario,
|
|
|
|
|
|
ScenarioCommand,
|
|
|
|
|
|
//-
|
2024-09-15 01:36:19 +03:00
|
|
|
|
DVMConfiguration,
|
2023-09-17 22:13:42 +03:00
|
|
|
|
Group,
|
|
|
|
|
|
//-
|
|
|
|
|
|
DVMParameterValue,
|
|
|
|
|
|
Test,
|
|
|
|
|
|
Function,
|
|
|
|
|
|
SelectedFunction,
|
|
|
|
|
|
//-
|
|
|
|
|
|
Credentials,
|
|
|
|
|
|
//-
|
|
|
|
|
|
PackageVersion,
|
|
|
|
|
|
SapforConfiguration,
|
|
|
|
|
|
SapforProfile,
|
|
|
|
|
|
SapforProfileSetting,
|
|
|
|
|
|
//--
|
2023-12-05 16:15:12 +03:00
|
|
|
|
ProjectView,
|
2023-12-16 15:34:29 +03:00
|
|
|
|
SubscriberWorkspace,
|
2024-09-27 22:50:47 +03:00
|
|
|
|
DVMRunTask,
|
|
|
|
|
|
SapforSettings,
|
2024-10-01 17:33:08 +03:00
|
|
|
|
SapforSettingsCommand,
|
2024-10-08 00:39:13 +03:00
|
|
|
|
DVMSettings;
|
2024-10-08 16:20:45 +03:00
|
|
|
|
@Override
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
switch (this) {
|
|
|
|
|
|
case DVMSettings:
|
|
|
|
|
|
return "Параметры тестирования DVM системы";
|
|
|
|
|
|
case SapforSettings:
|
|
|
|
|
|
return "Параметры тестирования системы SAPFOR";
|
|
|
|
|
|
case SapforSettingsCommand:
|
|
|
|
|
|
return "Команда SAPFOR";
|
|
|
|
|
|
case DVMRunTask:
|
|
|
|
|
|
return "Задача DVM тестирования";
|
|
|
|
|
|
case SapforPackage:
|
|
|
|
|
|
return "Пакет тестирования SAPFOR";
|
|
|
|
|
|
case DVMPackage:
|
|
|
|
|
|
return "Пакет тестирования DVM";
|
|
|
|
|
|
case DVMConfiguration:
|
|
|
|
|
|
return "Конфигурация тестирования";
|
|
|
|
|
|
case ServerSapfor:
|
|
|
|
|
|
return "тестовая версия SAPFOR";
|
|
|
|
|
|
case SubscriberWorkspace:
|
|
|
|
|
|
return "рабочее пространство пользователя";
|
|
|
|
|
|
case SapforProfile:
|
|
|
|
|
|
return "Профиль SAPFOR";
|
|
|
|
|
|
case SapforProfileSetting:
|
|
|
|
|
|
return "Настройка профиля SAPFOR";
|
|
|
|
|
|
case SapforEtalonVersion:
|
|
|
|
|
|
return "Версия SAPFOR(Эталон)";
|
|
|
|
|
|
case SapforVersion:
|
|
|
|
|
|
return "Версия SAPFOR";
|
|
|
|
|
|
case ComponentServerBackup:
|
|
|
|
|
|
return "Версия компонента для восстановления с сервера";
|
|
|
|
|
|
case Subscriber:
|
|
|
|
|
|
return "Адресат";
|
|
|
|
|
|
case SelectedFunction:
|
|
|
|
|
|
return "Выбранный узел графа процедур";
|
|
|
|
|
|
case SapforConfiguration:
|
|
|
|
|
|
return "Конфигурация тестирования SAPFOR";
|
|
|
|
|
|
case PackageVersion:
|
|
|
|
|
|
return "Версия пакетного режима";
|
|
|
|
|
|
case Credentials:
|
|
|
|
|
|
return "Учётные данные";
|
|
|
|
|
|
case Function:
|
|
|
|
|
|
return "Функция";
|
|
|
|
|
|
case DVMParameterValue:
|
|
|
|
|
|
return "Параметр DVM системы";
|
|
|
|
|
|
case ParallelRegion:
|
|
|
|
|
|
return "Область распараллеливания";
|
|
|
|
|
|
case Group:
|
|
|
|
|
|
return "Группа тестов DVM";
|
|
|
|
|
|
case Scenario:
|
|
|
|
|
|
return "Сценарий";
|
|
|
|
|
|
case ScenarioCommand:
|
|
|
|
|
|
return "Команда сценария";
|
|
|
|
|
|
case ProjectNode:
|
|
|
|
|
|
return "текущий узел дерева проектов"; //служебка
|
|
|
|
|
|
case Test:
|
|
|
|
|
|
return "Тест";
|
|
|
|
|
|
case Sapfor:
|
|
|
|
|
|
return "SAPFOR";
|
|
|
|
|
|
case EnvironmentValue:
|
|
|
|
|
|
return "Значение переменной окружения";
|
|
|
|
|
|
case SelectedDirectory:
|
|
|
|
|
|
return "Папка проекта";
|
|
|
|
|
|
case SelectedFile:
|
|
|
|
|
|
return "Файл проекта";
|
|
|
|
|
|
case RunConfiguration:
|
|
|
|
|
|
return "Конфигурация запуска";
|
|
|
|
|
|
case RunTask:
|
|
|
|
|
|
return "Задача на запуск";
|
|
|
|
|
|
case CompilationTask:
|
|
|
|
|
|
return "Задача на компиляцию";
|
|
|
|
|
|
case Makefile:
|
|
|
|
|
|
return "Мейкфайл";
|
|
|
|
|
|
case Module:
|
|
|
|
|
|
return "Языковой модуль мейкфайла";
|
|
|
|
|
|
case RemoteFile:
|
|
|
|
|
|
return "Удалённый файл";
|
|
|
|
|
|
case Component:
|
|
|
|
|
|
return "Компонент";
|
|
|
|
|
|
case Project:
|
|
|
|
|
|
return "Проект";
|
|
|
|
|
|
case File:
|
|
|
|
|
|
return "Файл";
|
|
|
|
|
|
case Root:
|
|
|
|
|
|
return "Корень дерева версий";
|
|
|
|
|
|
case Version:
|
|
|
|
|
|
return "Версия";
|
|
|
|
|
|
case BugReport:
|
|
|
|
|
|
return "Отчёт об ошибке";
|
|
|
|
|
|
case Account:
|
|
|
|
|
|
return "Аккаунт";
|
|
|
|
|
|
case Machine:
|
|
|
|
|
|
return "Машина";
|
|
|
|
|
|
case User:
|
|
|
|
|
|
return "Пользователь";
|
|
|
|
|
|
case Compiler:
|
|
|
|
|
|
return "Компилятор";
|
|
|
|
|
|
default:
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//------------------------------------------------------------------------------------->>
|
2023-09-17 22:13:42 +03:00
|
|
|
|
public static boolean HasProject() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Project) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasFile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(File) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasSelectedFile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(SelectedFile) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasAccount() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Account) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasMachine() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Machine) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasUser() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(User) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasCompiler() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Compiler) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasRemoteFile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(RemoteFile) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasMakefile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Makefile) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasRunConfiguration() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(RunConfiguration) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasCompilationTask() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(CompilationTask) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasRunTask() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(RunTask) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasPassForm() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(PassForm) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasProjectView() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(ProjectView) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2024-09-27 22:50:47 +03:00
|
|
|
|
public static SapforSettings getSapforSettings() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (SapforSettings) CurrentAnchestor.get(SapforSettings);
|
2024-09-27 22:50:47 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasSapforSettings() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(SapforSettings) != null;
|
2024-09-27 22:50:47 +03:00
|
|
|
|
}
|
2023-09-17 22:13:42 +03:00
|
|
|
|
public static db_project_info getProject() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (db_project_info) CurrentAnchestor.get(Project);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static DBProjectFile getFile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (DBProjectFile) CurrentAnchestor.get(File);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-11-19 02:12:44 +03:00
|
|
|
|
public static Repository.Component.Component getComponent() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Repository.Component.Component) CurrentAnchestor.get(Component);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-11-19 02:12:44 +03:00
|
|
|
|
public static Repository.BugReport.BugReport getBugReport() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (BugReport) CurrentAnchestor.get(BugReport);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static db_project_info getRoot() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (db_project_info) CurrentAnchestor.get(Root);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasRoot() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Root) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static db_project_info getVersion() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (db_project_info) CurrentAnchestor.get(Version);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Account getAccount() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Account) CurrentAnchestor.get(Account);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasSubscriber() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.Subscriber) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-11-19 02:12:44 +03:00
|
|
|
|
public static Repository.Subscribes.Subscriber getSubscriber() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Subscriber) CurrentAnchestor.get(Current.Subscriber);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Machine getMachine() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Machine) CurrentAnchestor.get(Current.Machine);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static User getUser() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (User) CurrentAnchestor.get(Current.User);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Compiler getCompiler() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Compiler) CurrentAnchestor.get(Current.Compiler);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static CompilationTask getCompilationTask() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (CompilationTask) CurrentAnchestor.get(Current.CompilationTask);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static RunTask getRunTask() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (RunTask) CurrentAnchestor.get(Current.RunTask);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static RemoteFile getRemoteFile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (RemoteFile) CurrentAnchestor.get(Current.RemoteFile);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Makefile getMakefile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Makefile) CurrentAnchestor.get(Current.Makefile);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Module getModule() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Module) CurrentAnchestor.get(Current.Module);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static RunConfiguration getRunConfiguration() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (RunConfiguration) CurrentAnchestor.get(Current.RunConfiguration);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-11-19 02:12:44 +03:00
|
|
|
|
public static Repository.Component.Sapfor.Sapfor getSapfor() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Repository.Component.Sapfor.Sapfor) CurrentAnchestor.get(Current.Sapfor);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasGroup() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.Group) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-11-19 02:12:44 +03:00
|
|
|
|
public static TestingSystem.Common.Group.Group getGroup() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.Common.Group.Group) CurrentAnchestor.get(Current.Group);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasConfiguration() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.DVMConfiguration) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2024-09-15 01:36:19 +03:00
|
|
|
|
public static DVMConfiguration getDVMConfiguration() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (DVMConfiguration) CurrentAnchestor.get(Current.DVMConfiguration);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static SapforConfiguration getSapforConfiguration() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration) CurrentAnchestor.get(Current.SapforConfiguration);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Test getTest() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.Common.Test.Test) CurrentAnchestor.get(Current.Test);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasTest() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.Test) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasVersion() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.Version) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static RemoteFile getComponentServerBackup() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (RemoteFile) CurrentAnchestor.get(Current.ComponentServerBackup);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasComponentServerBackup() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.ComponentServerBackup) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static DefaultMutableTreeNode getProjectNode() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (DefaultMutableTreeNode) CurrentAnchestor.get(Current.ProjectNode);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static DefaultMutableTreeNode getProjectCurrentParentNode() {
|
|
|
|
|
|
DefaultMutableTreeNode node = Current.getProjectNode();
|
|
|
|
|
|
//если в дереве еще никто не выделялся, берем корень.
|
|
|
|
|
|
if (node == null)
|
|
|
|
|
|
return Current.getProject().filesTreeRoot;
|
|
|
|
|
|
return (node.getUserObject() instanceof DBProjectFile) ? (DefaultMutableTreeNode) node.getParent() : node;
|
|
|
|
|
|
}
|
|
|
|
|
|
public static File getSelectedDirectory() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (File) CurrentAnchestor.get(Current.SelectedDirectory);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static DBProjectFile getSelectedFile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (DBProjectFile) CurrentAnchestor.get(Current.SelectedFile);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasBugReport() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.BugReport) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static PassForm getPassForm() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Visual_DVM_2021.Passes.UI.PassForm) CurrentAnchestor.get(Current.PassForm);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static ParallelRegion getParallelRegion() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (ParallelRegion) CurrentAnchestor.get(Current.ParallelRegion);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasParallelRegion() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.ParallelRegion) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasFunction() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.Function) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasSelectedFunction() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.SelectedFunction) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static FuncInfo getFunction() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (FuncInfo) CurrentAnchestor.get(Current.Function);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static FuncInfo getSelectionFunction() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (FuncInfo) CurrentAnchestor.get(Current.SelectedFunction);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasScenario() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.Scenario) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static db_project_info getPackageVersion() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (db_project_info) CurrentAnchestor.get(Current.PackageVersion);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasPackageVersion() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.PackageVersion) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasSapforConfiguration() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.SapforConfiguration) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static ProjectData.ProjectView getProjectView() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (ProjectData.ProjectView) CurrentAnchestor.get(ProjectView);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static boolean HasSapforProfile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.SapforProfile) != null;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-09-27 00:43:23 +03:00
|
|
|
|
public static GlobalData.SapforProfile.SapforProfile getSapforProfile() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (GlobalData.SapforProfile.SapforProfile) CurrentAnchestor.get(Current.SapforProfile);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2023-10-03 15:07:17 +03:00
|
|
|
|
public static boolean HasServerSapfor() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.ServerSapfor) != null;
|
2023-10-03 15:07:17 +03:00
|
|
|
|
}
|
2023-11-19 02:12:44 +03:00
|
|
|
|
public static TestingSystem.SAPFOR.ServerSapfor.ServerSapfor getServerSapfor() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.SAPFOR.ServerSapfor.ServerSapfor) CurrentAnchestor.get(Current.ServerSapfor);
|
2023-10-03 15:07:17 +03:00
|
|
|
|
}
|
2023-12-05 16:15:12 +03:00
|
|
|
|
public static boolean HasSubscriberWorkspace() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.SubscriberWorkspace) != null;
|
2023-12-05 16:15:12 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static Repository.SubscriberWorkspace.SubscriberWorkspace getSubscriberWorkspace() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (Repository.SubscriberWorkspace.SubscriberWorkspace) CurrentAnchestor.get(Current.SubscriberWorkspace);
|
2023-12-05 16:15:12 +03:00
|
|
|
|
}
|
2023-12-11 02:00:28 +03:00
|
|
|
|
public static boolean HasDVMPackage() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.DVMPackage) != null;
|
2023-12-11 02:00:28 +03:00
|
|
|
|
}
|
|
|
|
|
|
public static TestingSystem.DVM.DVMPackage.DVMPackage getDVMPackage() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.DVM.DVMPackage.DVMPackage) CurrentAnchestor.get(Current.DVMPackage);
|
2023-12-11 02:00:28 +03:00
|
|
|
|
}
|
2023-12-15 18:38:05 +03:00
|
|
|
|
public static boolean HasSapforPackage() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.SapforPackage) != null;
|
2023-12-15 18:38:05 +03:00
|
|
|
|
}
|
2024-10-08 16:20:45 +03:00
|
|
|
|
public static TestingSystem.SAPFOR.SapforPackage.SapforPackage getSapforPackage() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.SAPFOR.SapforPackage.SapforPackage) CurrentAnchestor.get(Current.SapforPackage);
|
2023-12-15 18:38:05 +03:00
|
|
|
|
}
|
2023-12-16 15:34:29 +03:00
|
|
|
|
public static boolean HasDVMRunTask() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return CurrentAnchestor.get(Current.DVMRunTask) != null;
|
2023-12-16 15:34:29 +03:00
|
|
|
|
}
|
2023-12-16 16:52:17 +03:00
|
|
|
|
public static TestingSystem.DVM.DVMTasks.DVMRunTask getDVMRunTask() {
|
2024-10-08 00:39:13 +03:00
|
|
|
|
return (TestingSystem.DVM.DVMTasks.DVMRunTask) CurrentAnchestor.get(Current.DVMRunTask);
|
2023-12-16 15:34:29 +03:00
|
|
|
|
}
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|