no message
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user