package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.Passes.Server.TestingServerPass;
import _VisualDVM.Repository.Server.ServerCode;

import java.util.Vector;
public class DetectSelectedTestsMinMaDim extends TestingServerPass<Vector<Object>> {
    @Override
    public String getIconPath() {
        return "/icons/Arrays.png";
    }
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (Global.testingServer.db.groups.getUI().canModifyCurrent(Log)) {
            if (!Global.testingServer.db.tests.getUI().CheckSelectedOrCurrent(Log))
                return false;
            target = Global.testingServer.db.tests.getUI().getSelectedOrCurrentKeys();
            return SendRequest(ServerCode.DetectTestsMinMaxDim, "", target);
        }
        return false;
    }
    @Override
    protected void performDone() throws Exception {
        Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
    }
}
