рефакторинг сравнения

This commit is contained in:
2024-02-26 00:36:35 +03:00
parent 848d95ee14
commit 75c196f611
16 changed files with 149 additions and 119 deletions

View File

@@ -37,8 +37,8 @@ public class SapforVersion_json implements Serializable {
public SapforTask task = null; //родная задача. Нужна для построения дерева версий.
public db_project_info project = null;
//--
public SapforVersionState state = SapforVersionState.Empty;
public SapforVersionMatchState matchState = SapforVersionMatchState.Unknown;
public SapforVersionState state = null;
public VersionComparisonState comparisonState = null;
//--
public SapforVersion_json(String version_in, String description_in) {
version = version_in;
@@ -49,10 +49,10 @@ public class SapforVersion_json implements Serializable {
description = description_in;
}
public SapforVersionState init(File configurationRoot) {
public void getFiles(File configurationRoot) {
//--
state = SapforVersionState.Empty;
matchState = SapforVersionMatchState.Unknown;
comparisonState = VersionComparisonState.Unknown;
//--
String relativePath = Global.isWindows ? Utils.toW(version) : version;
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
@@ -76,7 +76,6 @@ 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());
return state;
}
public boolean isMatch(SapforVersion_json version_json) {
if (!description.equals(version_json.description)) {
@@ -292,6 +291,6 @@ public class SapforVersion_json implements Serializable {
}
@Override
public String toString() {
return Home.getName() + " : " + Utils.Brackets(description);
return Home.getName() + " : " + Utils.Brackets(description)+" файлы: " +files.size();
}
}