Files
VisualSapfor/src/_VisualDVM/Passes/All/DownloadTaskTest.java
2025-03-13 00:32:20 +03:00

25 lines
1000 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Repository.Server.ServerCode;
import _VisualDVM.TestingSystem.DVM.DVMTasks.DVMRunTask;
public class DownloadTaskTest extends DownloadTest {
@Override
public String getIconPath() {
return "/icons/OpenProject.png";
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = null;
if (Global.testingServer.db.dvmRunTasks.getUI().CheckCurrent(Log)) {
DVMRunTask task = Global.testingServer.db.dvmRunTasks.getUI().getCurrent();
if (!Global.testingServer.db.tests.containsKey(task.test_id)) {
Log.Writeln_("Теста с ключом " + task.test_id + " не существует!");
return false;
}
target = Global.testingServer.db.tests.get(task.test_id);
return SendRequest(ServerCode.DownloadTest, String.valueOf(target.id));
}
return false;
}
}