no message
This commit is contained in:
43
src/_VisualDVM/Passes/All/SPF_StatisticAnalyzer.java
Normal file
43
src/_VisualDVM/Passes/All/SPF_StatisticAnalyzer.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
import _VisualDVM.Passes.Sapfor.SilentSapforPass;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
public class SPF_StatisticAnalyzer extends SilentSapforPass {
|
||||
public RunTask task;
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (super.canStart(args)) {
|
||||
task = (RunTask) args[0];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
sapfor.RunAnalysis(
|
||||
getName(),
|
||||
-Global.messagesServer.getPort(),
|
||||
Global.packSapforSettings(),
|
||||
Utils_.DQuotes(task.getLocalStsFile().getAbsolutePath()) +
|
||||
" "
|
||||
+ Utils_.DQuotes(target.getStsFile().getAbsolutePath()));
|
||||
}
|
||||
@Override
|
||||
protected boolean isGoodCode() {
|
||||
return sapfor.getErrorCode() == 0;
|
||||
}
|
||||
@Override
|
||||
public boolean needsConfirmations() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
if (target.getStsFile().exists()) {
|
||||
Files.copy(target.getStsFile().toPath(), task.getLocalStsTextFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user