package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.UI.UI;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import TestingSystem.TasksPackage.TasksPackageState;
import Visual_DVM_2021.Passes.Pass_2021;
public class ShowSapforTaskPackage extends Pass_2021<SapforTasksPackage> {
    @Override
    public String getIconPath() {
        return "/icons/VariantsCoverage.png";
    }
    @Override
    public String getButtonText() {
        return "";
    }
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (Current.Check(Log, Current.SapforTasksPackage)) {
            target = Current.getSapforTasksPackage();
            if (!target.state.equals(TasksPackageState.Done)) {
                Log.Writeln_("Пакет не завершен!");
            } else
                return true;
        }
        return false;
    }
    @Override
    protected void body() throws Exception {
        UI.getSapforPackageWindow().ShowDialog("Отображение пакета задач SAPFOR", target);
    }
}
