37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
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);
|
||
}
|
||
}
|