++
Оптимизация анализа состояния версий пакетов сапфор
This commit is contained in:
47
src/_VisualDVM/Passes/All/RefreshSapforPackageResults.java
Normal file
47
src/_VisualDVM/Passes/All/RefreshSapforPackageResults.java
Normal file
@@ -0,0 +1,47 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Server.TestingServerPass;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import java.io.File;
|
||||
public class RefreshSapforPackageResults extends TestingServerPass<SapforPackage> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/Menu/Undo.png";
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Global.testingServer.db.sapforPackages.getUI().CheckCurrent(Log))
|
||||
return false;
|
||||
target = Global.testingServer.db.sapforPackages.getUI().getCurrent();
|
||||
if (!new File(target.getLocalWorkspace(), CommonConstants.LOADED).exists()) {
|
||||
Log.Writeln_("Пакет не загружен!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
target.checkFinishState();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
SendRequest(ServerCode.ReplaceSapforPackageResults, "",
|
||||
new Pair<>(
|
||||
target,
|
||||
Utils_.fileToBytes(target.getJsonFile())
|
||||
)
|
||||
);
|
||||
Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user