Учет настроек сравнения при сравнении пакетов сапфор
This commit is contained in:
2024-05-24 16:10:18 +03:00
parent edb6714ea8
commit 2983d5c579
5 changed files with 133 additions and 113 deletions

View File

@@ -49,7 +49,6 @@ public class SapforVersion_json implements Serializable {
version = version_in.substring(root_in.length() + 1);
description = description_in;
}
public void getFiles(File configurationRoot) {
//--
state = SapforVersionState.Empty;
@@ -78,12 +77,12 @@ public class SapforVersion_json implements Serializable {
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){
Vector<File> out_files = new Vector<>();
out_files.add(parse_out.file);
out_files.add(parse_err.file);
out_files.add(out.file);
out_files.add(err.file);
for (File file : out_files) {
try {
if (file.exists()) {
Vector<String> lines = new Vector<>(FileUtils.readLines(file));
@@ -92,8 +91,7 @@ public class SapforVersion_json implements Serializable {
return;
}
}
}
catch (Exception ex){
} catch (Exception ex) {
ex.printStackTrace();
}
}
@@ -129,7 +127,7 @@ public class SapforVersion_json implements Serializable {
} catch (Exception ex) {
ex.printStackTrace();
}
if (!text1.equals(text2)) {
if (!Utils.compareFortranTexts(text1, text2)) {
System.out.println("различие текста файла " + Utils.Brackets(file1.file.getName()));
return false;
}
@@ -312,6 +310,6 @@ public class SapforVersion_json implements Serializable {
}
@Override
public String toString() {
return Home.getName() + " : " + Utils.Brackets(description)+" файлы: " +files.size();
return Home.getName() + " : " + Utils.Brackets(description) + " файлы: " + files.size();
}
}