package Visual_DVM_2021.Passes.All;
import Common.Current_;
import Common.Utils.Utils_;
import _VisualDVM.Current;
import Visual_DVM_2021.Passes.CurrentProjectPass;
import Visual_DVM_2021.Passes.PassCode;
import _VisualDVM.Global;
public class ResetCurrentProject extends CurrentProjectPass {
    @Override
    protected void performPreparation() throws Exception {
        Global.mainModule.getPass(PassCode.DeleteDebugResults).Do();
        Global.mainModule.getPass(PassCode.CloseCurrentProject).Do();
        Global.mainModule.set(Current.Root, null);
    }
    @Override
    protected void body() throws Exception {
        target.CleanVersions();
        target.ResetDB();
        Global.mainModule.getDb().Delete(target.getInfo());
    }
    @Override
    protected void performDone() throws Exception {
        Global.mainModule.getPass(PassCode.OpenCurrentProject).Do(target.Home);
    }
}
