постепенное выведение старой концепции текущих объектов, касаемо табличных лучше держать их в интерфейсе таблиц, чтобы не писать описание объекта дважды и не мучиться с типом. некоторые фиксы
This commit is contained in:
@@ -5,6 +5,7 @@ import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.Validators.PathValidator;
|
||||
public class CompilerDialog extends DBObjectDialog<Compiler, CompilerFields> {
|
||||
@@ -75,7 +76,7 @@ public class CompilerDialog extends DBObjectDialog<Compiler, CompilerFields> {
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.machine_id = Global.mainModule.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Result.description = fields.tfDescription.getText();
|
||||
Result.call_command = fields.tfCallCommand.getText();
|
||||
Result.help_command = fields.tfHelpCommand.getText();
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -30,7 +31,7 @@ public class CompilerFields implements DialogFields {
|
||||
CompilerType type = (CompilerType) cbCompilerType.getSelectedItem();
|
||||
if (type == CompilerType.dvm) {
|
||||
String dst = null;
|
||||
if (Global.mainModule.getMachine().type.equals(MachineType.Local)) {
|
||||
if (Global.mainModule.getDb().getTable(Machine.class).getUI().getCurrent().type.equals(MachineType.Local)) {
|
||||
File file = directoryChooser.ShowDialog();
|
||||
if (file != null)
|
||||
dst = file.getAbsolutePath();
|
||||
|
||||
@@ -7,6 +7,7 @@ import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -15,8 +16,8 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Compiler;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -68,7 +69,8 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Compiler object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
Global.mainModule.getDb().getTable(Machine.class).getUI().matchCurrentID(object.machine_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
|
||||
Reference in New Issue
Block a user