package _VisualDVM.Passes.All;
import Common.Passes.Pass;
import _VisualDVM.Current;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.ProjectData.Project.db_project_info;
public class OpenProject extends Pass<db_project_info> {
    @Override
    protected boolean canStart(Object... args) throws Exception {
        target = (db_project_info) args[0];
        return true;
    }
    @Override
    protected void performPreparation() throws Exception {
        Global.mainModule.getPass(PassCode.CloseProject).Do();
    }
    @Override
    protected void body() throws Exception {
        target.CreateVersionsTree();
        target.Open();
    }
    @Override
    protected void performDone() throws Exception {
        Global.mainModule.set(Current.Project, target);
        /*
        пока непонятно надо
        Pass_2021.passes.get(PassCode_2021.UpdateSetting).Do(
                SettingName.FREE_FORM, target.style.equals(LanguageStyle.free) ? "1" : "0");
         */
    }
}