Files
VisualSapfor/src/_VisualDVM/Passes/All/ApplyBugReportSettings.java
2025-03-27 12:45:55 +03:00

37 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package _VisualDVM.Passes.All;
import Common.Passes.Pass;
import _VisualDVM.ComponentsServer.BugReport.BugReport;
import _VisualDVM.Global;
public class ApplyBugReportSettings extends Pass<BugReport> {
@Override
public String getIconPath() {
return "/Common/icons/Apply.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
public boolean needsConfirmations() {
return true;
}
@Override
protected boolean canStart(Object... args) {
if (Global.componentsServer.db.bugReports.getUI().CheckCurrent(Log)) {
target = Global.componentsServer.db.bugReports.getUI().getCurrent();
long vv = target.visualiser_version;
if (vv < 500) {
Log.Writeln_("Автоматическое применение настроек поддерживается только в отчётах об ошибках,\n" +
"отправленных с версии визуализатора 500 и выше");
return false;
}
return true;
}
return false;
}
@Override
protected void body() throws Exception {
Global.mainModule.getProject().sapforProperties.applyBugReportSettings(target);
}
}