2024-10-14 12:14:01 +03:00
|
|
|
package _VisualDVM.Passes.All;
|
2024-10-07 00:58:29 +03:00
|
|
|
import _VisualDVM.Global;
|
2024-10-14 12:14:01 +03:00
|
|
|
import _VisualDVM.Passes.PassCode;
|
|
|
|
|
import _VisualDVM.Passes.Sapfor.SilentSapforPass;
|
2023-09-17 22:13:42 +03:00
|
|
|
public class SPF_GetMaxMinBlockDistribution extends SilentSapforPass {
|
|
|
|
|
@Override
|
|
|
|
|
public boolean needsConfirmations() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean needsAnimation() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) throws Exception {
|
2024-10-14 15:19:13 +03:00
|
|
|
if (super.canStart(args)) {
|
2023-09-17 22:13:42 +03:00
|
|
|
SPF_ParseFilesWithOrder.silent = true;
|
2024-10-14 15:19:13 +03:00
|
|
|
return (Global.mainModule.getPass(PassCode.SPF_ParseFilesWithOrder).isDone() || Global.mainModule.getPass(PassCode.SPF_ParseFilesWithOrder).Do());
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void body() throws Exception {
|
|
|
|
|
sapfor.RunAnalysis(
|
|
|
|
|
getSapforPassName(),
|
|
|
|
|
-Global.messagesServer.getPort(),
|
2025-01-16 02:26:51 +03:00
|
|
|
target.sapforProperties.pack(),
|
2023-09-17 22:13:42 +03:00
|
|
|
target.getProjFile().getAbsolutePath());
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void performFinish() throws Exception {
|
|
|
|
|
super.performFinish();
|
|
|
|
|
SPF_ParseFilesWithOrder.silent = false;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void performDone() throws Exception {
|
|
|
|
|
super.performDone();
|
|
|
|
|
target.testMaxDim = 0;
|
|
|
|
|
String packed = sapfor.getResult();
|
2024-10-14 15:19:13 +03:00
|
|
|
String[] data = packed.split(" ");
|
|
|
|
|
if (data.length > 0)
|
|
|
|
|
target.testMaxDim = Integer.parseInt(data[data.length - 1]);
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
}
|