Добавил анимацию распаковки пакета сапфор после его скачивания.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -9,10 +8,8 @@ import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
|
||||
import TestingSystem.TasksPackage.TasksPackageState;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.TestingSystemPass;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPackage> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
@@ -55,14 +52,7 @@ public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPac
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
super.performDone();
|
||||
File packageWorkspace = SapforTasksPackageInterface.getLocalWorkspace(target);
|
||||
Utils.forceDeleteWithCheck(packageWorkspace);
|
||||
if (passes.get(PassCode_2021.UnzipFolderPass).Do(
|
||||
tmpArchive.getAbsolutePath(),
|
||||
Global.SapforPackagesDirectory.getAbsolutePath(), false
|
||||
)) {
|
||||
FileUtils.writeStringToFile(SapforTasksPackageInterface.getLoadedSign(target), new Date().toString());
|
||||
}
|
||||
passes.get(PassCode_2021.UnpackSapforTasksPackage).Do(tmpArchive, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
32
src/Visual_DVM_2021/Passes/All/UnpackSapforTasksPackage.java
Normal file
32
src/Visual_DVM_2021/Passes/All/UnpackSapforTasksPackage.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
public class UnpackSapforTasksPackage extends UnzipFolderPass<SapforTasksPackage> {
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) {
|
||||
File tmpArchive = (File) args[0];
|
||||
target = (SapforTasksPackage) args[1];
|
||||
return super.canStart(tmpArchive.getAbsolutePath(),Global.SapforPackagesDirectory.getAbsolutePath(), false);
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
super.performPreparation();
|
||||
File packageWorkspace = SapforTasksPackageInterface.getLocalWorkspace(target);
|
||||
Utils.forceDeleteWithCheck(packageWorkspace);
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
super.body();
|
||||
FileUtils.writeStringToFile(SapforTasksPackageInterface.getLoadedSign(target), new Date().toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user