no message

This commit is contained in:
2024-10-12 00:17:51 +03:00
parent f317ab1aa1
commit c826b4a4bd
102 changed files with 372 additions and 520 deletions

View File

@@ -1,6 +1,7 @@
package Visual_DVM_2021.Passes.All;
import Common.Database.Database;
import Common.Utils.Utils_;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.Compiler.Compiler;
import _VisualDVM.GlobalData.Compiler.CompilerType;
import _VisualDVM.GlobalData.GlobalDatabase;
@@ -14,12 +15,12 @@ public class AddMachine extends AddObjectPass<Machine> {
}
@Override
protected Database getDb() {
return Utils_.db;
return Global.mainModule.getDb();
}
@Override
protected boolean canStart(Object... args) throws Exception {
if (super.canStart(args)) {
if (target.type.equals(MachineType.Local) && ((GlobalDatabase) Utils_.db).machines.LocalMachineExists()) {
if (target.type.equals(MachineType.Local) && Global.mainModule.getDb().machines.LocalMachineExists()) {
Log.Writeln_("Локальная машина уже добавлена.");
return false;
}