Files
VisualSapfor/src/_VisualDVM/Passes/All/CompareDVMRunTaskToEthalon.java

40 lines
1.5 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.CommonConstants;
import Common.Passes.Pass;
import Common.Utils.Utils_;
import _VisualDVM.Global;
import _VisualDVM.TestingSystem.DVM.DVMTasks.DVMRunTask;
public class CompareDVMRunTaskToEthalon extends Pass<DVMRunTask> {
DVMRunTask ethalon = null;
@Override
public String getIconPath() {
return "/icons/Comparsion.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = null;
ethalon = null;
if (Global.testingServer.db.dvmRunTasks.getUI().CheckCurrent(Log)) {
//есть ли эталон у этой задачи.
target = Global.testingServer.db.dvmRunTasks.getUI().getCurrent();
if (target.ethalon_id != CommonConstants.Nan && Global.testingServer.db.dvmRunTasks.containsKey(target.ethalon_id)) {
ethalon = Global.testingServer.db.dvmRunTasks.get(target.ethalon_id);
return true;
} else Log.Writeln_("Не найдено эталона для задачи " + Utils_.Brackets(target.id) + " !");
}
return false;
}
@Override
protected void body() throws Exception {
Global.mainModule.getUI().getMainWindow().getTestingWindow().CompareCurrentDVMTaskToEthalon(ethalon, target);
}
@Override
protected void showFinish() throws Exception {
Global.mainModule.getUI().getMainWindow().getTestingWindow().FocusTestingTasksComparison();
}
}