окончательное разделение таблицы и функционала видимой ее формы
This commit is contained in:
@@ -4,8 +4,4 @@ public class AccountsDBTable extends DBTable<Integer, Account> {
|
||||
public AccountsDBTable() {
|
||||
super(Integer.class, Account.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "аккаунт";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import Common.Utils.Utils_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.UI.CompilerFields;
|
||||
import _VisualDVM.GlobalData.Compiler.UI.CompilersForm;
|
||||
@@ -27,14 +26,6 @@ public class CompilersDBTable extends iDBTable<Compiler> {
|
||||
super(Compiler.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "компилятор";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "компиляторы";
|
||||
}
|
||||
@Override
|
||||
public LinkedHashMap<Class<? extends DBObject>, FKBehaviour> getFKDependencies() {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
res.put(Makefile.class, new FKBehaviour(FKDataBehaviour.DROP, FKCurrentObjectBehaviuor.PASSIVE));
|
||||
@@ -124,10 +115,6 @@ public class CompilersDBTable extends iDBTable<Compiler> {
|
||||
return new CompilersForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Compiler;
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
return PassCode.DeleteCompiler;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,18 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Compiler;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "компилятор";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "компиляторы";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -41,7 +53,7 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.AddCompiler,
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.AddCompiler,
|
||||
PassCode.EditCompiler,
|
||||
PassCode.DeleteCompiler,
|
||||
PassCode.ShowCompilerVersion,
|
||||
|
||||
@@ -15,8 +15,4 @@ public class LastProjectsDBTable extends DBTable<String, DBLastProject> {
|
||||
public Vector<DBLastProject> getOrdered() {
|
||||
return getOrderedRecords(new SortByDate());
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "путь к проекту";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import Common.Utils.Utils_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.DVMParameter.UI.DVMParameterFields;
|
||||
import _VisualDVM.GlobalData.DVMParameter.UI.DVMParametersForm;
|
||||
@@ -18,18 +17,6 @@ public class DVMParameterDBTable extends iDBTable<DVMParameter> {
|
||||
super(DVMParameter.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "параметр DVM системы";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "параметры DVM";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMParameterValue;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DVMParametersForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.GlobalData.DVMParameter.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameter;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -11,6 +12,18 @@ public class DVMParametersForm extends DataSetControlForm<DVMParameter> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMParameterValue;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "параметр DVM системы";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "параметры DVM";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
@@ -33,7 +46,7 @@ public class DVMParametersForm extends DataSetControlForm<DVMParameter> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.AddDVMParameter,
|
||||
PassCode.EditDVMParameter,
|
||||
PassCode.DeleteDVMParameter);
|
||||
|
||||
@@ -5,7 +5,6 @@ import Common.Utils.Utils_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.UI.EnvironmentValueFields;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.UI.EnvironmentsValuesForm;
|
||||
@@ -18,14 +17,6 @@ public class EnvironmentValuesDBTable extends iDBTable<EnvironmentValue> {
|
||||
super(EnvironmentValue.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "переменная окружения";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "переменные окружения";
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<EnvironmentValue, EnvironmentValueFields> getDialog() {
|
||||
return new DBObjectDialog<EnvironmentValue, EnvironmentValueFields>(EnvironmentValueFields.class) {
|
||||
@Override
|
||||
@@ -74,10 +65,6 @@ public class EnvironmentValuesDBTable extends iDBTable<EnvironmentValue> {
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new EnvironmentsValuesForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.EnvironmentValue;
|
||||
}
|
||||
public EnvironmentValue getEnvByName(String name_in) {
|
||||
for (EnvironmentValue environmentValue : Data.values())
|
||||
if (environmentValue.name.equalsIgnoreCase(name_in)) return environmentValue;
|
||||
|
||||
@@ -13,6 +13,18 @@ public class EnvironmentsValuesForm extends DataSetControlForm<EnvironmentValue>
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.EnvironmentValue;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "переменная окружения";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "переменные окружения";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
@@ -34,7 +46,7 @@ public class EnvironmentsValuesForm extends DataSetControlForm<EnvironmentValue>
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.AddEnvironmentValue,
|
||||
PassCode.EditEnvironmentValue,
|
||||
PassCode.DeleteEnvironmentValue,
|
||||
|
||||
@@ -8,7 +8,6 @@ import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameter;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
@@ -29,14 +28,6 @@ public class MachinesDBTable extends iDBTable<Machine> {
|
||||
super(Machine.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "машина";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "машины";
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<Machine, MachineFields> getDialog() {
|
||||
return new DBObjectDialog<Machine, MachineFields>(MachineFields.class) {
|
||||
@Override
|
||||
@@ -88,10 +79,6 @@ public class MachinesDBTable extends iDBTable<Machine> {
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MachinesForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Machine;
|
||||
}
|
||||
public boolean LocalMachineExists() {
|
||||
return Data.values().stream().anyMatch(machine -> machine.type.equals(MachineType.Local));
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -15,6 +16,18 @@ public class MachinesForm extends DataSetControlForm<Machine> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Machine;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "машина";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "машины";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -40,7 +53,7 @@ public class MachinesForm extends DataSetControlForm<Machine> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.AddMachine,
|
||||
PassCode.EditMachine,
|
||||
PassCode.DeleteMachine) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Makefile.UI.MakefilesForm;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.GlobalData.Module.UI.ModuleAnchestorFields;
|
||||
@@ -22,14 +21,6 @@ public class MakefilesDBTable extends iDBTable<Makefile> {
|
||||
super(Makefile.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "мейкфайл";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "мейкфайлы";
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<Makefile, ModuleAnchestorFields> getDialog() {
|
||||
return new ModuleAnchestorForm<>();
|
||||
}
|
||||
@@ -45,10 +36,6 @@ public class MakefilesDBTable extends iDBTable<Makefile> {
|
||||
return new MakefilesForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Makefile;
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
return PassCode.DeleteMakefile;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,18 @@ public class MakefilesForm extends DataSetControlForm<Makefile> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Makefile;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "мейкфайл";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "мейкфайлы";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -43,7 +55,7 @@ public class MakefilesForm extends DataSetControlForm<Makefile> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.Compile,
|
||||
PassCode.AddMakefile,
|
||||
PassCode.EditMakefile,
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Module.UI.ModuleAnchestorForm;
|
||||
import _VisualDVM.GlobalData.Module.UI.ModulesForm;
|
||||
|
||||
@@ -13,14 +12,6 @@ public class ModulesDBTable extends iDBTable<Module> {
|
||||
super(Module.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "языковой модуль";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "языковые модули";
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<Module, ? extends DialogFields> getDialog() {
|
||||
return new ModuleAnchestorForm<>();
|
||||
}
|
||||
@@ -28,8 +19,4 @@ public class ModulesDBTable extends iDBTable<Module> {
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new ModulesForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Module;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,18 @@ public class ModulesForm extends DataSetControlForm<Module> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Module;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "языковой модуль";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "языковые модули";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -46,7 +58,7 @@ public class ModulesForm extends DataSetControlForm<Module> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.EditModule);
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.EditModule);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Module object) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
@@ -30,14 +29,6 @@ public class RunConfigurationsDBTable extends iDBTable<RunConfiguration> {
|
||||
super(RunConfiguration.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "конфигурация запуска";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "конфигурации запуска";
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<RunConfiguration, RunConfigurationFields> getDialog() {
|
||||
return new DBObjectDialog<RunConfiguration, RunConfigurationFields>(RunConfigurationFields.class) {
|
||||
@Override
|
||||
@@ -122,10 +113,6 @@ public class RunConfigurationsDBTable extends iDBTable<RunConfiguration> {
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new RunConfigurationsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.RunConfiguration;
|
||||
}
|
||||
public void Patch() throws Exception {
|
||||
for (RunConfiguration c : Data.values()) {
|
||||
c.Patch();
|
||||
|
||||
@@ -13,6 +13,18 @@ public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration>
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.RunConfiguration;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "конфигурация запуска";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "конфигурации запуска";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Команда",
|
||||
@@ -51,7 +63,7 @@ public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration>
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.Run,
|
||||
PassCode.AddRunConfiguration,
|
||||
PassCode.EditRunConfiguration,
|
||||
|
||||
@@ -7,7 +7,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.SapforProfile.UI.SapforProfileFields;
|
||||
import _VisualDVM.GlobalData.SapforProfile.UI.SapforProfilesForm;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
@@ -20,22 +19,10 @@ public class SapforProfilesDBTable extends iDBTable<SapforProfile> {
|
||||
super(SapforProfile.class);
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "профили SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "профиль SAPFOR";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SapforProfilesForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforProfile;
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<SapforProfile, SapforProfileFields> getDialog() {
|
||||
return new DBObjectDialog<SapforProfile, SapforProfileFields>(SapforProfileFields.class) {
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.GlobalData.SapforProfile.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -12,6 +13,18 @@ public class SapforProfilesForm extends DataSetControlForm<SapforProfile> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforProfile;
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "профили SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "профиль SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -35,7 +48,7 @@ public class SapforProfilesForm extends DataSetControlForm<SapforProfile> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.SaveProfile,
|
||||
PassCode.EditProfile,
|
||||
PassCode.ApplyProfile,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.GlobalData.SapforProfileSetting;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.UI.SapforProfileSettingsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -13,8 +12,4 @@ public class SapforProfileSettingsDBTable extends iDBTable<SapforProfileSetting>
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SapforProfileSettingsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforProfileSetting;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforProfileSetting;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
|
||||
@@ -10,10 +10,6 @@ public class SettingsDBTable extends DBTable<SettingName, DBSetting> {
|
||||
public SettingsDBTable() {
|
||||
super(SettingName.class, DBSetting.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "настройка";
|
||||
}
|
||||
public void AddSetting(DBSetting s) throws Exception {
|
||||
if (containsKey(s.Name)) {
|
||||
DBSetting old = get(s.Name);
|
||||
@@ -28,13 +24,13 @@ public class SettingsDBTable extends DBTable<SettingName, DBSetting> {
|
||||
} else
|
||||
this.getDb().Insert(s);
|
||||
}
|
||||
//todo все загнать в Properties
|
||||
public void AddAll() throws Exception {
|
||||
//проверка списка всех настроек.
|
||||
//<editor-fold desc="Global">
|
||||
AddSetting(new DBSetting(SettingName.ProjectsSearchDirectory, "", SettingType.StringField, ComponentType.Visualiser, false));
|
||||
AddSetting(new DBSetting(SettingName.EditorFontSize, "14", SettingType.StringField, ComponentType.Visualiser, false));
|
||||
AddSetting(new DBSetting(SettingName.DarkThemeOn, 0, SettingType.SapforFlag, ComponentType.Visualiser, false));
|
||||
// AddSetting(new DBSetting(SettingName.FocusPassesResult, 1, SettingType.SapforFlag, ComponentType.Visualiser));
|
||||
AddSetting(new DBSetting(SettingName.ShowFullArraysDeclarations, 0, SettingType.SapforFlag, ComponentType.Visualiser));
|
||||
AddSetting(new DBSetting(SettingName.ShowFullTabsNames, 0, SettingType.SapforFlag, ComponentType.Visualiser));
|
||||
AddSetting(new DBSetting(SettingName.FastAccessPassesCount, 5, SettingType.IntField, ComponentType.Visualiser));
|
||||
|
||||
@@ -6,7 +6,6 @@ import Common.Database.Tables.FKDataBehaviour;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.UI.CompilationTasksForm;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -18,14 +17,6 @@ public class CompilationTasksDBTable extends iDBTable<CompilationTask> {
|
||||
super(CompilationTask.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача на компиляцию";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи на компиляцию";
|
||||
}
|
||||
@Override
|
||||
public LinkedHashMap<Class<? extends DBObject>, FKBehaviour> getFKDependencies() {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
res.put(RunTask.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
||||
@@ -36,10 +27,6 @@ public class CompilationTasksDBTable extends iDBTable<CompilationTask> {
|
||||
return new CompilationTasksForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.CompilationTask;
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
return PassCode.DeleteCompilationTasks;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,18 @@ public class CompilationTasksForm extends DataSetControlForm<CompilationTask> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.CompilationTask;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача на компиляцию";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи на компиляцию";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -53,7 +65,7 @@ public class CompilationTasksForm extends DataSetControlForm<CompilationTask> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteCompilationTasks);
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.DeleteCompilationTasks);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(CompilationTask object) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.GlobalData.Tasks.RunTask;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.UI.RunTasksForm;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -12,22 +11,10 @@ public class RunTasksDBTable extends iDBTable<RunTask> {
|
||||
super(RunTask.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача на запуск";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи на запуск";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new RunTasksForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.RunTask;
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
return PassCode.DeleteRunTasks;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,18 @@ public class RunTasksForm extends DataSetControlForm<RunTask> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.RunTask;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача на запуск";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи на запуск";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -65,7 +77,7 @@ public class RunTasksForm extends DataSetControlForm<RunTask> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteRunTasks);
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.DeleteRunTasks);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(RunTask object) {
|
||||
|
||||
@@ -15,6 +15,18 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.User;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пользователь";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пользователи";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -52,7 +64,7 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.AddUser,
|
||||
PassCode.EditUser,
|
||||
PassCode.InitialiseUser,
|
||||
|
||||
@@ -7,7 +7,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTask;
|
||||
@@ -23,14 +22,6 @@ public class UsersDBTable extends iDBTable<User> {
|
||||
super(User.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пользователь";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пользователи";
|
||||
}
|
||||
@Override
|
||||
public LinkedHashMap<Class<? extends DBObject>, FKBehaviour> getFKDependencies() {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
res.put(CompilationTask.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
||||
@@ -77,10 +68,6 @@ public class UsersDBTable extends iDBTable<User> {
|
||||
return new UsersForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.User;
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
return PassCode.DeleteUser;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class CompareDVMRunTasks extends Pass<Vector<DVMRunTask>> {
|
||||
master = null;
|
||||
slave = null;
|
||||
//--
|
||||
target = Global.testingServer.db.dvmRunTasks.getSelectedItems();
|
||||
target = Global.testingServer.db.dvmRunTasks.getUI().getSelectedItems();
|
||||
if (target.size() == 2) {
|
||||
if (UI.Question("Назначить задачу " + Utils_.Brackets(target.get(0).getPK()) + " эталоном" +
|
||||
"\n(в случае отказа, будет назначена задача " + Utils_.Brackets(target.get(1).getPK()) + ")")) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class CompareSapforPackages extends Pass<Vector<SapforPackage>> {
|
||||
master = null;
|
||||
slave = null;
|
||||
//--
|
||||
target = Global.testingServer.db.sapforPackages.getSelectedItems();
|
||||
target = Global.testingServer.db.sapforPackages.getUI().getSelectedItems();
|
||||
if (target.size() == 2) {
|
||||
if (UI.Question("Назначить пакет " + Utils_.Brackets(target.get(0).getPK()) + " эталоном" +
|
||||
"\n(в случае отказа, будет назначен пакет " + Utils_.Brackets(target.get(1).getPK()) + ")")) {
|
||||
|
||||
@@ -58,8 +58,8 @@ public class ExportDVMPackageToExcel extends Pass<Vector<DVMPackage>> {
|
||||
styles = null;
|
||||
target = null;
|
||||
//--
|
||||
if (Global.testingServer.db.dvmPackages.getSelectedCount() > 0) {
|
||||
target = Global.testingServer.db.dvmPackages.getSelectedItems();
|
||||
if (Global.testingServer.db.dvmPackages.getUI().getSelectedCount() > 0) {
|
||||
target = Global.testingServer.db.dvmPackages.getUI().getSelectedItems();
|
||||
} else {
|
||||
if (Global.mainModule.Check(Log, Current.DVMPackage)) {
|
||||
target = new Vector<>();
|
||||
|
||||
@@ -82,7 +82,7 @@ public class Run extends Pass<db_project_info> {
|
||||
task.setProgress(i, runTasks.size());
|
||||
//-
|
||||
Global.mainModule.getDb().runTasks.RefreshUI();
|
||||
Global.mainModule.getDb().runTasks.SetCurrentObjectByUI(task.id);
|
||||
Global.mainModule.getDb().runTasks.getUI().SetCurrentByPK(task.id);
|
||||
//-
|
||||
subpass.Do(task, target);
|
||||
//-
|
||||
|
||||
@@ -58,7 +58,6 @@ public class SPF_GetArrayDistributionOnlyAnalysis extends SapforAnalysis {
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowProjectMaxDim();
|
||||
super.showDone();
|
||||
|
||||
@@ -43,10 +43,10 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
|
||||
if (!Global.mainModule.getCompiler().versionLoaded)
|
||||
Global.mainModule.getPass(PassCode.ShowCompilerVersion).Do(Global.mainModule.getCompiler(), false);
|
||||
//-----
|
||||
if (!Global.testingServer.db.dvm_configurations.CheckSelectedOrCurrent(Log)) {
|
||||
if (!Global.testingServer.db.dvm_configurations.getUI().CheckSelectedOrCurrent(Log)) {
|
||||
return false;
|
||||
}
|
||||
Vector<DVMConfiguration> configurations = Global.testingServer.db.dvm_configurations.getSelectedOrCurrent();
|
||||
Vector<DVMConfiguration> configurations = Global.testingServer.db.dvm_configurations.getUI().getSelectedOrCurrent();
|
||||
//---
|
||||
target = new DVMPackage(
|
||||
Global.mainModule.getAccount(),
|
||||
|
||||
@@ -35,10 +35,10 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if (!Global.testingServer.db.sapforConfigurations.CheckSelectedOrCurrent(Log)) {
|
||||
if (!Global.testingServer.db.sapforConfigurations.getUI().CheckSelectedOrCurrent(Log)) {
|
||||
return false;
|
||||
}
|
||||
configurations = Global.testingServer.db.sapforConfigurations.getSelectedOrCurrent();
|
||||
configurations = Global.testingServer.db.sapforConfigurations.getUI().getSelectedOrCurrent();
|
||||
target = new SapforPackage(Global.mainModule.getAccount(),
|
||||
Global.mainModule.getServerSapfor(),
|
||||
configurations,
|
||||
|
||||
@@ -22,18 +22,18 @@ public class UpdateSelectedComponents extends Pass<Vector<Component>> {
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = new Vector<>();
|
||||
//------------------------
|
||||
if (Global.Components.getSelectedCount() == 0) {
|
||||
if (Global.Components.getUI().getSelectedCount() == 0) {
|
||||
Log.Writeln_("Не отмечено ни одного компонента!");
|
||||
return false;
|
||||
}
|
||||
target = Global.Components.getSelectedItems();
|
||||
target = Global.Components.getUI().getSelectedItems();
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String getStartDescription() {
|
||||
Vector<String> question = new Vector<>();
|
||||
question.add("Обновить компоненты");
|
||||
for (Component component : Global.Components.getSelectedItems()) {
|
||||
for (Component component : Global.Components.getUI().getSelectedItems()) {
|
||||
question.add(component.getComponentType().getDescription());
|
||||
}
|
||||
return String.join("\n", question);
|
||||
|
||||
@@ -20,7 +20,7 @@ public abstract class VariantsMassPass extends CurrentProjectPass {
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
count = 0;
|
||||
if (super.canStart(args)) {
|
||||
count = target.parallelVariants.getSelectedCount();
|
||||
count = target.parallelVariants.getUI().getSelectedCount();
|
||||
if (count == 0) {
|
||||
Log.Writeln_("Не выбрано ни одного параллельного варианта");
|
||||
return false;
|
||||
|
||||
@@ -12,8 +12,8 @@ public class DeleteServerObject<S extends RepositoryServer, D extends DBObject>
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = (D) getDb().getTable(d).getCurrent();
|
||||
return getDb().getTable(d).CheckCurrent(Log) && getDb().getTable(d).ShowDeleteObjectDialog(target);
|
||||
target = (D) getDb().getTable(d).getUI().getCurrent();
|
||||
return getDb().getTable(d).getUI().CheckCurrent(Log) && getDb().getTable(d).ShowDeleteObjectDialog(target);
|
||||
}
|
||||
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
|
||||
@Override
|
||||
|
||||
@@ -36,9 +36,9 @@ public class DeleteServerObjects<S extends RepositoryServer, D extends DBObject>
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
DBTable table = getDb().getTable(d);
|
||||
if (!table.CheckSelectedOrCurrent(Log))
|
||||
if (!table.getUI().CheckSelectedOrCurrent(Log))
|
||||
return false;
|
||||
target = table.getSelectedOrCurrentKeys();
|
||||
target = table.getUI().getSelectedOrCurrentKeys();
|
||||
return table.ShowDeleteObjectsDialog(target.size());
|
||||
}
|
||||
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
|
||||
|
||||
@@ -15,8 +15,8 @@ public class EditServerObject<S extends RepositoryServer, D extends DBObject> ex
|
||||
//--
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = (D) getDb().getTable(d).getCurrent();
|
||||
return getDb().getTable(d).CheckCurrent(Log) && getDb().getTable(d).ShowEditObjectDialog(target);
|
||||
target = (D) getDb().getTable(d).getUI().getCurrent();
|
||||
return getDb().getTable(d).getUI().CheckCurrent(Log) && getDb().getTable(d).ShowEditObjectDialog(target);
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
|
||||
@@ -33,12 +33,12 @@ public abstract class SaveCurrentConfiguration<C extends Configuration, S extend
|
||||
tests = new Vector<>();
|
||||
settings = new Vector<>();
|
||||
//---
|
||||
for (Group group : Global.testingServer.db.groups.getSelectedItems()) {
|
||||
for (Group group : Global.testingServer.db.groups.getUI().getSelectedItems()) {
|
||||
groups.add(group);
|
||||
Vector<Test> groupTests = Global.testingServer.db.tests.getSelectedGroupTests(group);
|
||||
tests.addAll(groupTests);
|
||||
}
|
||||
for (Object setting : Global.testingServer.db.getTable(s).getSelectedItems()) {
|
||||
for (Object setting : Global.testingServer.db.getTable(s).getUI().getSelectedItems()) {
|
||||
settings.add((Settings) setting);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.ProjectData.DBArray;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.DBArray.UI.DBArraysForm;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -10,19 +9,7 @@ public class ArraysDBTable extends DBTable<String, DBArray> {
|
||||
super(String.class, DBArray.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "массив";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "сохранённые состояния";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DBArraysForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DBArray;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.ProjectData.DBArray.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.DBArray.DBArray;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -10,6 +11,18 @@ public class DBArraysForm extends DataSetControlForm<DBArray> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DBArray;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "массив";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "сохранённые состояния";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{"Имя"};
|
||||
}
|
||||
@@ -34,7 +47,7 @@ public class DBArraysForm extends DataSetControlForm<DBArray> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription()) {
|
||||
return new DataMenuBar(getPluralDescription()) {
|
||||
@Override
|
||||
public void createSelectionButtons(DataSet dataSet) {
|
||||
//не нужны.
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
package _VisualDVM.ProjectData.Files;
|
||||
import Common.Database.Tables.DBTable;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
public class FilesDBTable extends DBTable<String, DBProjectFile> {
|
||||
public FilesDBTable() {
|
||||
super(String.class, DBProjectFile.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "файл";
|
||||
//todo временно.когда появится общий предок у таблиц и деревьев назначать дерево как createUI
|
||||
public int getSelectedCount() {
|
||||
return (int) Data.values().stream().filter(d -> d.isSelected()).count();
|
||||
}
|
||||
public Vector<DBProjectFile> getSelectedItems() {
|
||||
return Data.values().stream().filter(d -> d.isSelected()).collect(Collectors.toCollection(Vector::new));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package _VisualDVM.ProjectData.Messages.Errors;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.Messages.MessagesControlForm;
|
||||
import _VisualDVM.ProjectData.Messages.MessagesDBTable;
|
||||
|
||||
import javax.swing.*;
|
||||
public class ErrorsDBTable extends MessagesDBTable<MessageError> {
|
||||
public ErrorsDBTable() {
|
||||
super(MessageError.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "сообщение об ошибке";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Errors;
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Errors;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class MessagesControlForm extends DataSetControlForm<Message> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
Global.mainModule.getFile().form.getEditor().gotoLine(((Message) dataSource.getCurrent()).line);
|
||||
Global.mainModule.getFile().form.getEditor().gotoLine(getCurrent().line);
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package _VisualDVM.ProjectData.Messages;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
|
||||
import javax.swing.*;
|
||||
//https://stackoverflow.com/questions/2026965/can-i-add-a-button-to-a-jtable-column-header
|
||||
//https://stackoverflow.com/questions/7137786/how-can-i-put-a-control-in-the-jtableheader-of-a-jtable/29963916#29963916
|
||||
//https://stackoverflow.com/questions/7137786/how-can-i-put-a-control-in-the-jtableheader-of-a-jtable ->>
|
||||
@@ -10,8 +7,4 @@ public class MessagesDBTable<M extends Message> extends iDBTable<M> {
|
||||
public MessagesDBTable(Class<M> d_in) {
|
||||
super(d_in);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
package _VisualDVM.ProjectData.Messages.Notes;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.Messages.MessagesControlForm;
|
||||
import _VisualDVM.ProjectData.Messages.MessagesDBTable;
|
||||
|
||||
import javax.swing.*;
|
||||
public class NotesDBTable extends MessagesDBTable<MessageNote> {
|
||||
public NotesDBTable() {
|
||||
super(MessageNote.class);
|
||||
// setUIContent(UI.getMainWindow().notesPanel);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "примечание";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Notes;
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Notes;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.ProjectData.Messages.Recommendations;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Settings.SettingName;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.Messages.Recommendations.UI.RecommendationsForm;
|
||||
@@ -18,14 +17,6 @@ public class RecommendationsDBTable extends iDBTable<MessageRecommendation> {
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new RecommendationsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "рекомендация";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Recommendations;
|
||||
}
|
||||
public void addRecommendation(int group_in) {
|
||||
MessageRecommendation result = null;
|
||||
switch (group_in) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.HeaderTextFilter;
|
||||
import Common.Visual.Tables.RendererWrapText;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.Messages.Recommendations.MessageRecommendation;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -11,6 +12,10 @@ public class RecommendationsForm extends DataSetControlForm<MessageRecommendatio
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Recommendations;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{"текст"};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
package _VisualDVM.ProjectData.Messages.Warnings;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.Messages.MessagesControlForm;
|
||||
import _VisualDVM.ProjectData.Messages.MessagesDBTable;
|
||||
|
||||
import javax.swing.*;
|
||||
public class WarningsDBTable extends MessagesDBTable<MessageWarning> {
|
||||
//https://stackoverflow.com/questions/13079777/editable-jtableheader
|
||||
public WarningsDBTable() {
|
||||
super(MessageWarning.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "предупреждение";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Warnings;
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new MessagesControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Warnings;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,4 @@ public class PredictorStatisticsDBTable extends DBTable<String, PredictorStatist
|
||||
public PredictorStatisticsDBTable() {
|
||||
super(String.class, PredictorStatistics_2021.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "статистика варианта";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,4 @@ public class ProjectInfoDBTable extends DBTable<String, db_project_info> {
|
||||
public ProjectInfoDBTable() {
|
||||
super(String.class, db_project_info.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "проект";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +1,15 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.UI.ProjectArraysForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
public class ProjectArraysSet extends DataSet<Long, ProjectArray> {
|
||||
public ProjectArraysSet() {
|
||||
super(Long.class, ProjectArray.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "массив";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "объявленные массивы";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ProjectArray;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new ProjectArraysForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public void SelectAll(boolean flag) {
|
||||
Global.mainModule.getPass(PassCode.MassSelectArrays).Do(flag, new Vector(Global.mainModule.getProject().declaratedArrays.Data.values()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,16 @@ package _VisualDVM.ProjectData.SapforData.Arrays.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.RendererHiddenList;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Settings.SettingName;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.Visual.Tables.EditorFilesHyperlinks;
|
||||
import _VisualDVM.Visual.Tables.RendererHyperlinks;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
public class ProjectArraysForm extends DataSetControlForm<ProjectArray> {
|
||||
//-
|
||||
public static String filterName = "";
|
||||
@@ -16,9 +19,23 @@ public class ProjectArraysForm extends DataSetControlForm<ProjectArray> {
|
||||
public static String filterLocationName = "";
|
||||
public static String filterFile = "";
|
||||
public static String filterRegion = "*";
|
||||
//--
|
||||
public ProjectArraysForm(DataSet<?, ProjectArray> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ProjectArray;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "массив";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "объявленные массивы";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
@@ -78,4 +95,9 @@ public class ProjectArraysForm extends DataSetControlForm<ProjectArray> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void SelectAll(boolean flag) {
|
||||
Global.mainModule.getPass(PassCode.MassSelectArrays).Do(flag,
|
||||
new Vector(Global.mainModule.getProject().declaratedArrays.Data.values()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Regions;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.UI.ParallelRegionsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -12,18 +11,6 @@ public class ParallelRegionsSet extends DataSet<BigInteger, ParallelRegion> {
|
||||
super(BigInteger.class, ParallelRegion.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ParallelRegionInfo;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "область распараллеливания";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "области распараллеливания";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new ParallelRegionsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import Common.Visual.Tables.RendererTopLeft;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -11,6 +12,18 @@ public class ParallelRegionsForm extends DataSetControlForm<ParallelRegion> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ParallelRegionInfo;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "область распараллеливания";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "области распараллеливания";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Имя",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Variants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.PredictorStatistic.PredictorStatistics_2021;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
@@ -76,11 +75,6 @@ public class ParallelVariant extends DBObject {
|
||||
public Object getPK() {
|
||||
return UniqKey;
|
||||
}
|
||||
@Override
|
||||
public void Select(boolean flag) {
|
||||
super.Select(flag);
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
}
|
||||
public File restoreProject() {
|
||||
project = null;
|
||||
if (stats != null) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Variants;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.SapforData.Variants.UI.ParallelVariantsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -10,15 +9,7 @@ public class ParallelVariantsSet extends DataSet<String, ParallelVariant> {
|
||||
super(String.class, ParallelVariant.class);
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "варианты";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new ParallelVariantsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ParallelVariant;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererMaskedNanInteger;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.SapforData.Variants.ParallelVariant;
|
||||
|
||||
@@ -14,6 +15,14 @@ public class ParallelVariantsForm extends DataSetControlForm<ParallelVariant> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ParallelVariant;
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "варианты";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -75,7 +84,7 @@ public class ParallelVariantsForm extends DataSetControlForm<ParallelVariant> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.ShowAllParallelVariants,
|
||||
PassCode.ShowParallelVariantsCoverage,
|
||||
PassCode.PredictParallelVariants,
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.Repository.BugReport;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.BugReport.UI.BugReportsForm;
|
||||
|
||||
@@ -14,21 +13,9 @@ public class BugReportsDBTable extends DBTable<String, BugReport> {
|
||||
super(String.class, BugReport.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "отчёт об ошибке";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "отчёты об ошибках";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new BugReportsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.BugReport;
|
||||
}
|
||||
public Vector<BugReport> getAllDrafts() throws Exception {
|
||||
return Data.values().stream().filter(bugReport -> bugReport.state.equals(BugReportState.draft)).collect(Collectors.toCollection(Vector::new));
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererProgressBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.BugReport.BugReport;
|
||||
@@ -24,10 +25,23 @@ public class BugReportsForm extends DataSetControlForm<BugReport> {
|
||||
public static String filterVersion = "";
|
||||
public static boolean filterOpenedOnly = false;
|
||||
public static boolean filterMyOnly = false;
|
||||
//--
|
||||
//-
|
||||
public BugReportsForm(DataSet<?, BugReport> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.BugReport;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "отчёт об ошибке";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "отчёты об ошибках";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
@@ -78,7 +92,7 @@ public class BugReportsForm extends DataSetControlForm<BugReport> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.SynchronizeBugReports,
|
||||
PassCode.DownloadAllBugReportsArchives,
|
||||
PassCode.AddBugReport,
|
||||
|
||||
@@ -1,54 +1,15 @@
|
||||
package _VisualDVM.Repository.Component;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Repository.Component.UI.ComponentsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
public class ComponentsSet extends DataSet<ComponentType, Component> {
|
||||
public ComponentsSet() {
|
||||
super(ComponentType.class, Component.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "компонент";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "компоненты";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new ComponentsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Component;
|
||||
}
|
||||
@Override
|
||||
public Vector<Component> getSelectedItems() {
|
||||
Vector<Component> target = new Vector<>();
|
||||
Component visualiser = null;
|
||||
Component server = null;
|
||||
//------------------------
|
||||
for (Component component : super.getSelectedItems()) {
|
||||
switch (component.getComponentType()) {
|
||||
case Visualizer_2:
|
||||
server = component;
|
||||
break;
|
||||
case Visualiser:
|
||||
visualiser = component;
|
||||
break;
|
||||
default:
|
||||
target.add(component);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (visualiser != null)
|
||||
target.add(visualiser);
|
||||
if (server != null)
|
||||
target.add(server);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,30 @@ import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Menus.VisualiserMenu;
|
||||
import Common.Visual.Tables.RendererMaskedNanInteger;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.Component.Component;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
public class ComponentsForm extends DataSetControlForm<Component> {
|
||||
public ComponentsForm(DataSet<?, Component> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Component;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "компонент";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "компоненты";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -55,7 +69,7 @@ public class ComponentsForm extends DataSetControlForm<Component> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.InstallComponentFromFolder,
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.InstallComponentFromFolder,
|
||||
PassCode.UpdateSelectedComponents,
|
||||
PassCode.PublishComponent,
|
||||
PassCode.ShowComponentChangesLog) {
|
||||
@@ -74,4 +88,29 @@ public class ComponentsForm extends DataSetControlForm<Component> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Vector<Component> getSelectedItems() {
|
||||
Vector<Component> target = new Vector<>();
|
||||
Component visualiser = null;
|
||||
Component server = null;
|
||||
//------------------------
|
||||
for (Component component : super.getSelectedItems()) {
|
||||
switch (component.getComponentType()) {
|
||||
case Visualizer_2:
|
||||
server = component;
|
||||
break;
|
||||
case Visualiser:
|
||||
visualiser = component;
|
||||
break;
|
||||
default:
|
||||
target.add(component);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (visualiser != null)
|
||||
target.add(visualiser);
|
||||
if (server != null)
|
||||
target.add(server);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.Repository.SubscriberWorkspace;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.SubscriberWorkspace.UI.SubscriberWorkspacesForm;
|
||||
|
||||
@@ -19,19 +18,6 @@ public class SubscriberWorkspaceDBTable extends iDBTable<SubscriberWorkspace> {
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "рабочая папка";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "рабочие папки";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SubscriberWorkspace;
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SubscriberWorkspacesForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.Repository.SubscriberWorkspace.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.SubscriberWorkspace.SubscriberWorkspace;
|
||||
@@ -12,6 +13,18 @@ public class SubscriberWorkspacesForm extends DataSetControlForm<SubscriberWorks
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SubscriberWorkspace;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "рабочая папка";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "рабочие папки";
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"URL",
|
||||
@@ -32,7 +45,7 @@ public class SubscriberWorkspacesForm extends DataSetControlForm<SubscriberWorks
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteSubscriberWorkspace);
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.DeleteSubscriberWorkspace);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SubscriberWorkspace object) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import Common.Database.Tables.FKDataBehaviour;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.SubscriberWorkspace.SubscriberWorkspace;
|
||||
import _VisualDVM.Repository.Subscribes.UI.SubscriberFields;
|
||||
@@ -21,22 +20,10 @@ public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
||||
super(String.class, Subscriber.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "адресат";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "адресаты";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SubsribersForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Subscriber;
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<Subscriber, SubscriberFields> getDialog() {
|
||||
return new SubscriberForm();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.Repository.Subscribes.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Account.AccountRole;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -13,6 +14,18 @@ public class SubsribersForm extends DataSetControlForm<Subscriber> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Subscriber;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "адресат";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "адресаты";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -45,7 +58,7 @@ public class SubsribersForm extends DataSetControlForm<Subscriber> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.SaveBugReportExecutor,
|
||||
PassCode.SaveBugReportRecipients,
|
||||
PassCode.AddSubscriber,
|
||||
|
||||
@@ -8,7 +8,6 @@ import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.GroupFields;
|
||||
@@ -25,14 +24,6 @@ public class GroupsDBTable extends iDBTable<Group> {
|
||||
}
|
||||
//------------------------------------------------>>>
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "группа тестов";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "группы";
|
||||
}
|
||||
@Override
|
||||
public LinkedHashMap<Class<? extends DBObject>, FKBehaviour> getFKDependencies() {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
res.put(Test.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
||||
@@ -43,10 +34,6 @@ public class GroupsDBTable extends iDBTable<Group> {
|
||||
return new GroupsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Group;
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<Group, GroupFields> getDialog() {
|
||||
return new DBObjectDialog<Group, GroupFields>(GroupFields.class) {
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import Common.Visual.DataSetFiltersMenu;
|
||||
import Common.Visual.FilterFlag;
|
||||
import Common.Visual.FilterMenuFlag;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
@@ -20,6 +21,18 @@ public class GroupsForm extends DataSetControlForm<Group> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Group;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "группа тестов";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "группы";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -49,7 +62,7 @@ public class GroupsForm extends DataSetControlForm<Group> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.SynchronizeTests,
|
||||
PassCode.ConvertCorrectnessTests) {
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
@@ -17,22 +16,10 @@ public class TestDBTable extends iDBTable<Test> {
|
||||
super(Test.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "тест";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "тесты";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new TestsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Test;
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<Test, TestFields> getDialog() {
|
||||
return new DBObjectDialog<Test, TestFields>(TestFields.class) {
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,18 @@ public class TestsForm extends DataSetControlForm<Test> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.Test;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "тест";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "тесты";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -45,7 +57,7 @@ public class TestsForm extends DataSetControlForm<Test> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription()) {
|
||||
return new DataMenuBar(getPluralDescription()) {
|
||||
{
|
||||
addMenus(new AddTestMenu(), new EditTestMenu());
|
||||
addPasses(PassCode.DownloadTest, PassCode.DeleteTest);
|
||||
|
||||
@@ -310,9 +310,9 @@ public class TestsDatabase extends SQLiteDatabase {
|
||||
return false;
|
||||
}
|
||||
public void UnselectAllGTC() {
|
||||
groups.SelectAll(false);
|
||||
tests.SelectAll(false);
|
||||
dvm_configurations.SelectAll(false);
|
||||
groups.getUI().SelectAll(false);
|
||||
tests.getUI().SelectAll(false);
|
||||
dvm_configurations.getUI().SelectAll(false);
|
||||
}
|
||||
public void CheckTestsPackagesDependencies(Vector<Integer> testsIds, TextLog Log) {
|
||||
//определить есть ли активные пакеты в которые входят упомянутые тесты
|
||||
|
||||
@@ -4,7 +4,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMConfiguration.UI.ConfigurationFields;
|
||||
@@ -16,18 +15,6 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
|
||||
super(DVMConfiguration.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMConfiguration;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "конфигурация";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "конфигурации";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DVMConfigurationsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ServerObjectsCache.ConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.VisualCaches;
|
||||
@@ -14,6 +15,18 @@ public class DVMConfigurationsForm extends DataSetControlForm<DVMConfiguration>
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMConfiguration;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "конфигурация";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "конфигурации";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -61,7 +74,7 @@ public class DVMConfigurationsForm extends DataSetControlForm<DVMConfiguration>
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.PublishConfiguration,
|
||||
PassCode.EditConfiguration,
|
||||
PassCode.ShowCurrentDVMConfigurationTests,
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.DVM.DVMPackage;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.UI.DVMPackagesForm;
|
||||
|
||||
@@ -12,18 +11,6 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
||||
super(DVMPackage.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMPackage;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пакет";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пакеты";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DVMPackagesForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import Common.Visual.Tables.RendererProgressBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ServerObjectsCache.PackageCache;
|
||||
@@ -22,6 +23,18 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMPackage;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пакет";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пакеты";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -83,7 +96,7 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
//--
|
||||
Global.testingServer.db.dvmRunTasks.ShowDVMPackage((DVMPackage) dataSource.getCurrent());
|
||||
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(getCurrent());
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
//--
|
||||
}
|
||||
@@ -99,7 +112,7 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription()) {
|
||||
return new DataMenuBar(getPluralDescription()) {
|
||||
{
|
||||
addPasses(PassCode.SynchronizeTests);
|
||||
addSeparator();
|
||||
|
||||
@@ -4,7 +4,6 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMSettings.UI.DVMSettingsFields;
|
||||
@@ -16,20 +15,6 @@ public class DVMSettingsDBTable extends iDBTable<DVMSettings> {
|
||||
super(DVMSettings.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMSettings;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
//--
|
||||
//-
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DVMSettingsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMSettings.DVMSettings;
|
||||
|
||||
@@ -11,6 +12,18 @@ public class DVMSettingsForm extends DataSetControlForm<DVMSettings> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMSettings;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -55,7 +68,7 @@ public class DVMSettingsForm extends DataSetControlForm<DVMSettings> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.PublishDVMSettings,
|
||||
PassCode.CloneDVMSettings,
|
||||
PassCode.EditDVMSettings,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.DVM.DVMTasks;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMTasks.UI.DVMRunTasksForm;
|
||||
|
||||
@@ -13,21 +12,9 @@ public class DVMRunTasksSet extends DataSet<Integer, DVMRunTask> {
|
||||
super(Integer.class, DVMRunTask.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DVMRunTasksForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMRunTask;
|
||||
}
|
||||
public void ShowDVMPackage(DVMPackage dvmPackage) {
|
||||
target = dvmPackage;
|
||||
ClearUI();
|
||||
|
||||
@@ -7,6 +7,7 @@ import Common.Visual.FilterMenuFlag;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererProgressBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMTasks.DVMRunTask;
|
||||
@@ -18,6 +19,18 @@ public class DVMRunTasksForm extends DataSetControlForm<DVMRunTask> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.DVMRunTask;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -77,7 +90,7 @@ public class DVMRunTasksForm extends DataSetControlForm<DVMRunTask> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.CompareDVMRunTasks, PassCode.DownloadTaskTest);
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.CompareDVMRunTasks, PassCode.DownloadTaskTest);
|
||||
}
|
||||
@Override
|
||||
protected void createFilters() {
|
||||
|
||||
@@ -4,7 +4,6 @@ import Common.Passes.PassCode_;
|
||||
import Common.Utils.Vector_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration.UI.SapforConfigurationFields;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration.UI.SapforConfigurationsForm;
|
||||
@@ -16,18 +15,6 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
|
||||
super(SapforConfiguration.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforConfiguration;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "конфигурация";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "конфигурации";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SapforConfigurationsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ServerObjectsCache.ConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.VisualCaches;
|
||||
@@ -16,6 +17,18 @@ public class SapforConfigurationsForm extends DataSetControlForm<SapforConfigura
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforConfiguration;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "конфигурация";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "конфигурации";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -65,7 +78,7 @@ public class SapforConfigurationsForm extends DataSetControlForm<SapforConfigura
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.PublishSapforConfiguration,
|
||||
PassCode.EditSapforConfiguration,
|
||||
PassCode.ShowCurrentSAPFORConfigurationTests,
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.SAPFOR.SapforPackage;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.UI.SapforPackagesForm;
|
||||
|
||||
@@ -12,18 +11,6 @@ public class SapforPackageDBTable extends iDBTable<SapforPackage> {
|
||||
super(SapforPackage.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforPackage;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пакет";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пакеты";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SapforPackagesForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforPackage.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.FilterFlag;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererMultiline;
|
||||
import Common.Visual.Tables.RendererProgressBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ServerObjectsCache.PackageCache;
|
||||
@@ -18,12 +19,22 @@ import javax.swing.*;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
public static boolean filterMyOnly = false;
|
||||
public static boolean filterActive = false;
|
||||
public SapforPackagesForm(DataSet<?, SapforPackage> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforPackage;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "пакет";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "пакеты";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -81,7 +92,7 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.SynchronizeTests) {
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.SynchronizeTests) {
|
||||
{
|
||||
addSeparator();
|
||||
addPasses(PassCode.AbortSapforPackage);
|
||||
@@ -89,37 +100,6 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
addPasses(PassCode.CompareSapforPackages);
|
||||
addSeparator();
|
||||
addPasses(PassCode.DeleteSapforPackage);
|
||||
add(new JSeparator());
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setText("Свои");
|
||||
setToolTipText("Отображать только пакеты тестов авторства пользователя");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
filterMyOnly = !filterMyOnly;
|
||||
Mark();
|
||||
Global.testingServer.db.sapforPackages.ShowUI();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils_.getIcon(filterMyOnly ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setText("Активные");
|
||||
setToolTipText("Отображать только активные пакеты тестов");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
filterActive = !filterActive;
|
||||
Mark();
|
||||
Global.testingServer.db.sapforPackages.ShowUI();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils_.getIcon(filterActive ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -133,9 +113,28 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforPackage object) {
|
||||
return super.isObjectVisible(object) &&
|
||||
(!filterMyOnly || Global.mainModule.getAccount().email.equals(object.sender_address)) &&
|
||||
(!filterActive || object.state.isActive());
|
||||
protected void createFilters() {
|
||||
AddFilter(new FilterFlag<SapforPackage>(dataSource, new MenuBarButton() {
|
||||
{
|
||||
setText("Свои");
|
||||
setToolTipText("Отображать только пакеты тестов авторства пользователя");
|
||||
}
|
||||
}, false) {
|
||||
@Override
|
||||
protected boolean validate(SapforPackage object) {
|
||||
return Global.mainModule.getAccount().email.equals(object.sender_address);
|
||||
}
|
||||
});
|
||||
AddFilter(new FilterFlag<SapforPackage>(dataSource, new MenuBarButton() {
|
||||
{
|
||||
setText("Активные");
|
||||
setToolTipText("Отображать только активные пакеты тестов");
|
||||
}
|
||||
}, false) {
|
||||
@Override
|
||||
protected boolean validate(SapforPackage object) {
|
||||
return object.state.isActive();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import Common.Passes.PassCode_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.UI.SapforSettingsFields;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.UI.SapforSettingsForm;
|
||||
@@ -21,18 +20,6 @@ public class SapforSettingsDBTable extends iDBTable<SapforSettings> {
|
||||
super(SapforSettings.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforSettings;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SapforSettingsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.TestingSystem.SAPFOR.SapforSettings.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
|
||||
@@ -11,6 +12,18 @@ public class SapforSettingsForm extends DataSetControlForm<SapforSettings> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforSettings;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "параметры тестирования";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -37,7 +50,7 @@ public class SapforSettingsForm extends DataSetControlForm<SapforSettings> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.PublishSapforSettings,
|
||||
PassCode.CloneSapforSettings,
|
||||
PassCode.EditSapforSettings,
|
||||
|
||||
@@ -4,7 +4,6 @@ import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
@@ -18,18 +17,6 @@ public class SapforSettingsCommandsDBTable extends iDBTable<SapforSettingsComman
|
||||
super(SapforSettingsCommand.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "команда";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "команды";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforSettingsCommand;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new SapforSettingsCommandsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,18 @@ public class SapforSettingsCommandsForm extends DataSetControlForm<SapforSetting
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforSettingsCommand;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "команда";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "команды";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -33,7 +45,7 @@ public class SapforSettingsCommandsForm extends DataSetControlForm<SapforSetting
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.PublishSapforSettingsCommand,
|
||||
PassCode.EditSapforSettingsCommand,
|
||||
PassCode.DeleteSapforSettingsCommand);
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.UI.ServerSapforsForm;
|
||||
|
||||
@@ -12,18 +11,6 @@ public class ServerSapforsDBTable extends iDBTable<ServerSapfor> {
|
||||
super(ServerSapfor.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "версия SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "версии SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ServerSapfor;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new ServerSapforsForm(this, mountPanel);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
@@ -15,6 +16,18 @@ public class ServerSapforsForm extends DataSetControlForm<ServerSapfor> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ServerSapfor;
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "версия SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "версии SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@@ -58,7 +71,7 @@ public class ServerSapforsForm extends DataSetControlForm<ServerSapfor> {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.CompileServerSapfor,
|
||||
PassCode.ShowSapforCompilationOut,
|
||||
PassCode.ShowSapforCompilationErr,
|
||||
|
||||
@@ -33,7 +33,6 @@ public interface ProjectWindow {
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
//----------------------------->>
|
||||
getAnalysisWindow().ShowMetrics();
|
||||
getAnalysisWindow().ShowLoopsCount();
|
||||
@@ -52,7 +51,6 @@ public interface ProjectWindow {
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoTotalVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoCheckedVariantsCount();
|
||||
getAnalysisWindow().ShowNoMetrics();
|
||||
getAnalysisWindow().ShowNoRegions();
|
||||
getAnalysisWindow().ShowLoopsCount();
|
||||
|
||||
@@ -156,7 +156,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
@Override
|
||||
public void ShowCheckedTestsCount() {
|
||||
int res = 0;
|
||||
for (Group group : Global.testingServer.db.groups.getSelectedItems()) {
|
||||
for (Group group : Global.testingServer.db.groups.getUI().getSelectedItems()) {
|
||||
Vector<Test> selected_tests = new Vector<>();
|
||||
Vector<Test> group_tests = new Vector<>();
|
||||
for (Test test : Global.testingServer.db.tests.Data.values()) {
|
||||
|
||||
Reference in New Issue
Block a user