package Visual_DVM_2021.Passes.All;
import Common.Current_;
import _VisualDVM.Current;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.Makefile.UI.MakefilePreviewForm;
import _VisualDVM.ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.PassCode;
import Common.Passes.Pass;
public class ShowMakefilePreview extends Pass<db_project_info> {
    @Override
    public String getIconPath() {
        return "/icons/ShowPassword.png";
    }
    @Override
    public String getButtonText() {
        return "";
    }
    @Override
    protected PassCode necessary() {
        return PassCode.SPF_ParseFilesWithOrder;
    }
    @Override
    protected boolean canStart(Object... args) {
        if (Global.mainModule.Check(Log, Current.Project, Current.Makefile)) {
            target = Global.mainModule.getProject();
            return true;
        }
        return false;
    }
    @Override
    protected void body() throws Exception {
        new MakefilePreviewForm().ShowDialog("Предпросмотр мейкфайла для текущего проекта",
                Global.mainModule.getMakefile().Generate(target));
    }
}
