no message

This commit is contained in:
2024-10-14 12:14:01 +03:00
parent 3a29898d5f
commit 452c4c7268
466 changed files with 1255 additions and 1100 deletions

View File

@@ -0,0 +1,48 @@
package _VisualDVM.Passes.All;
import Common.Utils.Utils_;
import _VisualDVM.Global;
import _VisualDVM.Repository.Component.Component;
import _VisualDVM.Passes.PassCode;
import Common.Passes.PassException;
import Common.Passes.Pass;
public class UpdateComponent extends Pass<Component> {
@Override
protected PassCode necessary() {
return PassCode.CreateComponentBackUp;
}
@Override
protected boolean resetsNecessary() {
return true;
}
@Override
protected void body() throws Exception {
PassCode subPassCode = null;
//<editor-fold desc="получение нового файла компонента">
switch (Global.mainModule.getComponent().getComponentType()) {
case Sapfor_F:
case Visualizer_2:
subPassCode = Utils_.isWindows() ? PassCode.DownloadComponent : PassCode.BuildComponent;
break;
case Visualiser:
case Instruction:
case PerformanceAnalyzer:
subPassCode = PassCode.DownloadComponent;
break;
}
if ((subPassCode != null) && Global.mainModule.getPass(subPassCode).Do()) {
//</editor-fold>
if (!Global.mainModule.getComponent().getNewFile().exists())
throw new PassException("Не удалось получить новый файл для компонента " + Global.mainModule.getComponent().getComponentType().getDescription());
//непосредственное обновление.
Global.mainModule.getComponent().Update();
}
}
@Override
protected void performFinish() throws Exception {
Global.mainModule.getComponent().CheckIfNeedsUpdateOrPublish();
}
@Override
protected void showDone() throws Exception {
Global.RefreshUpdatesStatus();
}
}