подсветка версий с ошибками в журнале
This commit is contained in:
@@ -2,5 +2,6 @@ package TestingSystem.SAPFOR.Json;
|
||||
import java.io.Serializable;
|
||||
public enum SapforVersionState implements Serializable {
|
||||
Empty, //версия оказалась пуста.
|
||||
Normal //версия построена
|
||||
Normal, //версия построена
|
||||
HasErrors //версия построена, но в журналах есть ошибка.
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import ProjectData.Files.ProjectFile;
|
||||
import ProjectData.LanguageName;
|
||||
import ProjectData.Messages.Errors.MessageError;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import Repository.Component.Sapfor.Sapfor;
|
||||
import TestingSystem.SAPFOR.SapforTask.SapforTask;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
@@ -76,6 +77,26 @@ public class SapforVersion_json implements Serializable {
|
||||
parse_err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_err_file).toFile());
|
||||
out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.out_file).toFile());
|
||||
err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.err_file).toFile());
|
||||
//--
|
||||
Vector<File> files = new Vector<>();
|
||||
files.add(parse_out.file);
|
||||
files.add(parse_err.file);
|
||||
files.add(out.file);
|
||||
files.add(err.file);
|
||||
for (File file:files){
|
||||
try {
|
||||
if (file.exists()) {
|
||||
Vector<String> lines = new Vector<>(FileUtils.readLines(file));
|
||||
if (!Sapfor.checkLines(lines)) {
|
||||
state = SapforVersionState.HasErrors;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean isMatch(SapforVersion_json version_json) {
|
||||
if (!description.equals(version_json.description)) {
|
||||
|
||||
Reference in New Issue
Block a user