постепенное выведение старой концепции текущих объектов, касаемо табличных лучше держать их в интерфейсе таблиц, чтобы не писать описание объекта дважды и не мучиться с типом. некоторые фиксы
This commit is contained in:
@@ -21,9 +21,10 @@ public class GroupsForm extends DataSetControlForm<Group> {
|
||||
public GroupsForm(DataSet<?, Group> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Group;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
public class TestDialog extends DBObjectDialog<Test, TestFields> {
|
||||
public TestDialog() {
|
||||
@@ -17,8 +18,10 @@ public class TestDialog extends DBObjectDialog<Test, TestFields> {
|
||||
@Override
|
||||
public void validateFields() {
|
||||
if (!edit) {
|
||||
if (!Global.mainModule.getGroup().language.equals(Global.mainModule.getProject().languageName))
|
||||
Log.Writeln_("В текущую группу могут войти только тесты на языке " + Global.mainModule.getGroup().language);
|
||||
if (! Global.testingServer.db.getTable(Group.class).getUI().getCurrent().language.equals(Global.mainModule.getProject().languageName))
|
||||
Log.Writeln_("В текущую группу могут войти только тесты на языке "
|
||||
+
|
||||
Global.testingServer.db.getTable(Group.class).getUI().getCurrent().language);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -13,9 +14,10 @@ public class TestsForm extends DataSetControlForm<Test> {
|
||||
public TestsForm(DataSet<?, Test> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Test;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -59,7 +61,8 @@ public class TestsForm extends DataSetControlForm<Test> {
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Test object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Group, object.group_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
Global.testingServer.db.getTable(Group.class).getUI().matchCurrentID(object.group_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
|
||||
@@ -17,8 +17,8 @@ public class DVMConfigurationsForm extends DataSetControlForm<DVMConfiguration>
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.DVMConfiguration;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -23,8 +23,8 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.DVMPackage;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -31,7 +33,7 @@ public class DVMSettingsFields implements DialogFields {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
||||
if (pass.Do(Global.mainModule.getCompiler())) {
|
||||
if (pass.Do(MainModule_.instance.getDb().getTable(Compiler.class).getUI().getCurrent())) {
|
||||
tfFlags.setText((String) pass.target);
|
||||
}
|
||||
}
|
||||
@@ -40,7 +42,7 @@ public class DVMSettingsFields implements DialogFields {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerEnvironmentsForTesting);
|
||||
if (pass.Do(Global.mainModule.getCompiler()))
|
||||
if (pass.Do(MainModule_.instance.getDb().getTable(Compiler.class).getUI().getCurrent()))
|
||||
tfEnvironments.setText((String) pass.target);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -13,9 +13,10 @@ public class DVMSettingsForm extends DataSetControlForm<DVMSettings> {
|
||||
public DVMSettingsForm(DataSet<?, DVMSettings> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.DVMSettings;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -19,8 +19,8 @@ public class DVMRunTasksForm extends DataSetControlForm<DVMRunTask> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.DVMRunTask;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -18,8 +18,8 @@ public class SapforConfigurationsForm extends DataSetControlForm<SapforConfigura
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.SapforConfiguration;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -23,8 +23,8 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.SapforPackage;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -13,8 +13,8 @@ public class SapforSettingsForm extends DataSetControlForm<SapforSettings> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.SapforSettings;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsCommand;
|
||||
public class SapforSettingsCommandDialog extends DBObjectDialog<SapforSettingsCommand, SapforSettingsCommandFields> {
|
||||
public SapforSettingsCommandDialog() {
|
||||
@@ -19,6 +20,6 @@ public class SapforSettingsCommandDialog extends DBObjectDialog<SapforSettingsCo
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.passCode = (PassCode) fields.cbPassCode.getSelectedItem();
|
||||
Result.sapforsettings_id = Global.mainModule.getSapforSettings().id;
|
||||
Result.sapforsettings_id = Global.testingServer.db.getTable(SapforSettings.class).getUI().getCurrent().id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsCommand;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -14,8 +16,8 @@ public class SapforSettingsCommandsForm extends DataSetControlForm<SapforSetting
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.SapforSettingsCommand;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -45,7 +47,8 @@ public class SapforSettingsCommandsForm extends DataSetControlForm<SapforSetting
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforSettingsCommand object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.SapforSettings, object.sapforsettings_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
Global.testingServer.db.getTable(SapforSettings.class).getUI().matchCurrentID(object.sapforsettings_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
|
||||
@@ -16,8 +16,8 @@ public class ServerSapforsForm extends DataSetControlForm<ServerSapfor> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.ServerSapfor;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
Reference in New Issue
Block a user